Edit model card

UzbTTS

This model is a fine-tuned version of microsoft/speecht5_tts on the None dataset. It achieves the following results on the evaluation set:

  • Loss: 0.5190

Model description

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
Downloads last month
15
Safetensors
Model size
144M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for blackhole33/UZBTTS

Finetuned
(750)
this model