|
--- |
|
library_name: transformers |
|
license: mit |
|
base_model: microsoft/speecht5_tts |
|
tags: |
|
- generated_from_trainer |
|
model-index: |
|
- name: speecht5_tr_commonvoice_2 |
|
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. --> |
|
|
|
# speecht5_tr_commonvoice_2 |
|
|
|
This model is a fine-tuned version of [microsoft/speecht5_tts](https://huggingface.co/microsoft/speecht5_tts) on the None dataset. |
|
It achieves the following results on the evaluation set: |
|
- Loss: 0.5934 |
|
|
|
## Model description |
|
```python |
|
import torch |
|
from transformers import pipeline |
|
from datasets import load_dataset |
|
import soundfile as sf |
|
|
|
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation") |
|
speaker_embedding = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0) |
|
|
|
from transformers import pipeline |
|
pipe = pipeline("text-to-audio", model="Chan-Y/speecht5_finetuned_tr_commonvoice") |
|
|
|
text = "bugün okula erken geldim, çalışmam lazım. çok sıkıcı bir dersim var." |
|
result = pipe(text, forward_params={"speaker_embeddings": speaker_embedding}) |
|
|
|
sf.write("speech.wav", result["audio"], samplerate=result["sampling_rate"]) |
|
|
|
from IPython.display import Audio |
|
Audio("speech.wav") |
|
``` |
|
|
|
## Training and evaluation data |
|
|
|
I used [CommonVoice Turkish Corpus 19.0](https://commonvoice.mozilla.org/tr/datasets) |
|
|
|
## Training procedure |
|
|
|
### Training hyperparameters |
|
|
|
The following hyperparameters were used during training: |
|
- learning_rate: 1e-06 |
|
- train_batch_size: 8 |
|
- eval_batch_size: 2 |
|
- seed: 42 |
|
- gradient_accumulation_steps: 8 |
|
- total_train_batch_size: 64 |
|
- optimizer: Use OptimizerNames.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: 500 |
|
- training_steps: 4000 |
|
- mixed_precision_training: Native AMP |
|
|
|
### Training results |
|
|
|
| Training Loss | Epoch | Step | Validation Loss | |
|
|:-------------:|:------:|:----:|:---------------:| |
|
| 0.7533 | 1.2972 | 1000 | 0.6445 | |
|
| 0.6745 | 2.5945 | 2000 | 0.6106 | |
|
| 0.6535 | 3.8917 | 3000 | 0.5953 | |
|
| 0.6593 | 5.1889 | 4000 | 0.5934 | |
|
|
|
|
|
### Framework versions |
|
|
|
- Transformers 4.46.3 |
|
- Pytorch 2.5.1+cu124 |
|
- Datasets 3.1.0 |
|
- Tokenizers 0.20.3 |
|
|