herwoww commited on
Commit
1648f5c
โ€ข
1 Parent(s): d99f46e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -31,8 +31,8 @@ import soundfile as sf
31
 
32
  synthesiser = pipeline("text-to-speech", "MBZUAI/speecht5_tts_clartts_ar")
33
 
34
- embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
35
- speaker_embedding = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
36
  # You can replace this embedding with your own as well.
37
 
38
  speech = synthesiser("ู„ุฃู†ู‡ ู„ุง ูŠุฑู‰ ุฃู†ู‡ ุนู„ู‰ ุงู„ุณูู‡ ุซู… ู…ู† ุจุนุฏ ุฐู„ูƒ ุญุฏูŠุซ ู…ู†ุชุดุฑ", forward_params={"speaker_embeddings": speaker_embedding})
@@ -56,8 +56,8 @@ vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
56
  inputs = processor(text="ู„ุฃู†ู‡ ู„ุง ูŠุฑู‰ ุฃู†ู‡ ุนู„ู‰ ุงู„ุณูู‡ ุซู… ู…ู† ุจุนุฏ ุฐู„ูƒ ุญุฏูŠุซ ู…ู†ุชุดุฑ", return_tensors="pt")
57
 
58
  # load xvector containing speaker's voice characteristics from a dataset
59
- embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
60
- speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
61
 
62
  speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
63
 
@@ -65,7 +65,7 @@ sf.write("speech.wav", speech.numpy(), samplerate=16000)
65
  ```
66
 
67
 
68
- # Citation [optional]
69
 
70
  <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
71
 
 
31
 
32
  synthesiser = pipeline("text-to-speech", "MBZUAI/speecht5_tts_clartts_ar")
33
 
34
+ embeddings_dataset = load_dataset("herwoww/arabic_xvect_embeddings", split="validation")
35
+ speaker_embedding = torch.tensor(embeddings_dataset[1]["speaker_embeddings"]).unsqueeze(0)
36
  # You can replace this embedding with your own as well.
37
 
38
  speech = synthesiser("ู„ุฃู†ู‡ ู„ุง ูŠุฑู‰ ุฃู†ู‡ ุนู„ู‰ ุงู„ุณูู‡ ุซู… ู…ู† ุจุนุฏ ุฐู„ูƒ ุญุฏูŠุซ ู…ู†ุชุดุฑ", forward_params={"speaker_embeddings": speaker_embedding})
 
56
  inputs = processor(text="ู„ุฃู†ู‡ ู„ุง ูŠุฑู‰ ุฃู†ู‡ ุนู„ู‰ ุงู„ุณูู‡ ุซู… ู…ู† ุจุนุฏ ุฐู„ูƒ ุญุฏูŠุซ ู…ู†ุชุดุฑ", return_tensors="pt")
57
 
58
  # load xvector containing speaker's voice characteristics from a dataset
59
+ embeddings_dataset = load_dataset("herwoww/arabic_xvect_embeddings", split="validation")
60
+ speaker_embedding = torch.tensor(embeddings_dataset[1]["speaker_embeddings"]).unsqueeze(0)
61
 
62
  speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
63
 
 
65
  ```
66
 
67
 
68
+ # Citation
69
 
70
  <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
71