Downloads · 30 days
11
10% of all-time downloads
blackhole33/UZBTTS
UZBTTS is a text-to-audio model from blackhole33. Use it for the text-to-audio task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
11
10% of all-time downloads
All-time downloads
112
Public
Parameters
144M
578 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors578 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of microsoft/speecht5_tts on the None dataset. It achieves the following results on the evaluation set:
UZBTTS - bu asason 250 MB Text2Audio datasetga (microsoft/speecht5_tts) modeliga fine-tuned qilindi, natija datasetga yarasha yaxshi.
Agar siz buni modelni foydalanishini xoxlasangiz.
example:
#dastlab run qiling :
!pip install transformers datasets
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech
processor = SpeechT5Processor.from_pretrained("ai-nightcoder/UZBTTS")
model = SpeechT5ForTextToSpeech.from_pretrained("ai-nightcoder/UZBTTS")
# ***************************************************************************
text = "O‘zbekistonda import qilingan sovitkich,
muzlatkich va konditsionerlarni energosamaradorlik bo‘yicha sinovdan o‘tkazish boshlandi.
Kun.uz'ga murojaat qilgan importchi tadbirkorlarga ko‘ra, bu yangilik ham vaqt,
ham naqd nuqtayi nazaridan yangi xarajatlarga olib kelgan.
Kelgusida bunday tekshiruv boshqa turdagi maishiy texnikalarga ham joriy etilishi kutilyapti."
inputs = processor(text=text, return_tensors="pt")
# ***************************************************************************
from datasets import load_dataset
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
import torch
# voice clone uchun ham ishlatilsa bo'ladi.
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
spectrogram = model.generate_speech(inputs["input_ids"], speaker_embeddings)
from transformers import SpeechT5HifiGan
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
# ****************************************************************************
speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
from IPython.display import Audio
Audio(speech, rate=16000)
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 4
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- training_steps: 4000
- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:------:|:----:|:---------------:|
| 0.479 | 137.93 | 1000 | 0.5174 |
| 0.4318 | 275.86 | 2000 | 0.5177 |
| 0.4111 | 413.79 | 3000 | 0.5302 |
| 0.4081 | 551.72 | 4000 | 0.5190 |
### Framework versions
- Transformers 4.38.1
- Pytorch 2.1.2
- Datasets 2.1.0
- Tokenizers 0.15.1