Rifat Mamayusupov
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -20,17 +20,53 @@ It achieves the following results on the evaluation set:
|
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
## Training procedure
|
| 34 |
|
| 35 |
### Training hyperparameters
|
| 36 |
|
|
|
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
| 23 |
+
UZBTTS - bu asason 250 MB Text2Audio datasetga (microsoft/speecht5_tts) modeliga fine-tuned qilindi, natija datasetga yarasha yaxshi.
|
| 24 |
|
| 25 |
+
Agar siz buni modelni foydalanishini xoxlasangiz.
|
| 26 |
|
| 27 |
+
example:
|
| 28 |
+
```
|
| 29 |
+
#dastlab run qiling :
|
| 30 |
+
!pip install transformers datasets
|
| 31 |
|
| 32 |
+
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech
|
| 33 |
|
| 34 |
+
processor = SpeechT5Processor.from_pretrained("ai-nightcoder/UZBTTS")
|
| 35 |
+
model = SpeechT5ForTextToSpeech.from_pretrained("ai-nightcoder/UZBTTS")
|
| 36 |
+
|
| 37 |
+
# ***************************************************************************
|
| 38 |
+
text = "O‘zbekistonda import qilingan sovitkich,
|
| 39 |
+
muzlatkich va konditsionerlarni energosamaradorlik bo‘yicha sinovdan o‘tkazish boshlandi.
|
| 40 |
+
Kun.uz'ga murojaat qilgan importchi tadbirkorlarga ko‘ra, bu yangilik ham vaqt,
|
| 41 |
+
ham naqd nuqtayi nazaridan yangi xarajatlarga olib kelgan.
|
| 42 |
+
Kelgusida bunday tekshiruv boshqa turdagi maishiy texnikalarga ham joriy etilishi kutilyapti."
|
| 43 |
+
|
| 44 |
+
inputs = processor(text=text, return_tensors="pt")
|
| 45 |
+
|
| 46 |
+
# ***************************************************************************
|
| 47 |
+
|
| 48 |
+
from datasets import load_dataset
|
| 49 |
+
|
| 50 |
+
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
| 51 |
+
|
| 52 |
+
import torch
|
| 53 |
+
# voice clone uchun ham ishlatilsa bo'ladi.
|
| 54 |
+
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
| 55 |
+
|
| 56 |
+
spectrogram = model.generate_speech(inputs["input_ids"], speaker_embeddings)
|
| 57 |
+
|
| 58 |
+
from transformers import SpeechT5HifiGan
|
| 59 |
+
|
| 60 |
+
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
| 61 |
+
|
| 62 |
+
# ****************************************************************************
|
| 63 |
+
|
| 64 |
+
speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
|
| 65 |
+
|
| 66 |
+
from IPython.display import Audio
|
| 67 |
+
|
| 68 |
+
Audio(speech, rate=16000)
|
| 69 |
|
|
|
|
| 70 |
|
| 71 |
### Training hyperparameters
|
| 72 |
|