File size: 2,899 Bytes
3e5c93e 6c26f20 3e5c93e 6c26f20 c8b48b7 523b6e3 3e5c93e 84bd0c2 3e5c93e 523b6e3 267862e 3e5c93e 523b6e3 0a57e11 3e5c93e c8b48b7 523b6e3 3e5c93e 6c26f20 3e5c93e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
---
library_name: transformers
license: mit
base_model: fahadqazi/Sindhi-TTS
tags:
- generated_from_trainer
model-index:
- name: Sindhi-TTS
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# Sindhi-TTS
This model is a fine-tuned version of [fahadqazi/Sindhi-TTS](https://huggingface.co/fahadqazi/Sindhi-TTS) on the None dataset.
It achieves the following results on the evaluation set:
- eval_loss: 0.4602
- eval_runtime: 47.8291
- eval_samples_per_second: 36.421
- eval_steps_per_second: 18.211
- epoch: 13.2653
- step: 6500
## How to use
```
from transformers import SpeechT5ForTextToSpeech, SpeechT5ForSpeechToText
from transformers import SpeechT5Processor
from transformers import AutoTokenizer
from transformers import SpeechT5HifiGan
import torch
from IPython.display import Audio as IPythonAudio
device = "cuda" if torch.cuda.is_available() else "cpu"
# imporing speech processor from another repo
processor = SpeechT5Processor.from_pretrained("Sana1207/Hindi_SpeechT5_finetuned")
# importing tokenizer and assigning it to the speech processor
tokenizer = AutoTokenizer.from_pretrained("fahadqazi/Sindhi-TTS")
processor.tokenizer = tokenizer
# importing the model
model = SpeechT5ForTextToSpeech.from_pretrained("fahadqazi/Sindhi-TTS")
# importing the vocoder from microsoft's repository
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
# loading random vocodings (the voice)
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
speaker_embeddings = embeddings_dataset[7306]["xvector"]
speaker_embeddings = torch.tensor(speaker_embeddings).to(device).unsqueeze(0)
# Generating Speech
text = "ڪهڙا حال آهن"
inputs = processor(text=text, return_tensors="pt").to(device)
speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
IPythonAudio(speech.cpu().numpy(), rate=16000, autoplay=True)
```
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 16
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 200
- training_steps: 10000
- mixed_precision_training: Native AMP
### Framework versions
- Transformers 4.46.2
- Pytorch 2.5.1+cu121
- Datasets 3.1.0
- Tokenizers 0.20.3
|