Text-to-Speech
Transformers
Safetensors
Cebuano
speecht5
text-to-audio
philippines
philippine-languages
single-speaker
Instructions to use Splintir/speecht5_tts-pld-ceb-solo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Splintir/speecht5_tts-pld-ceb-solo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="Splintir/speecht5_tts-pld-ceb-solo")# Load model directly from transformers import AutoProcessor, AutoModelForTextToSpectrogram processor = AutoProcessor.from_pretrained("Splintir/speecht5_tts-pld-ceb-solo") model = AutoModelForTextToSpectrogram.from_pretrained("Splintir/speecht5_tts-pld-ceb-solo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Continue-finetune on 99 ceb clips
Browse files- README.md +45 -46
- added_tokens.json +4 -0
- eval_texts.txt +2 -0
- processor_config.json +20 -0
- speaker.npy +3 -0
- spm_char.model +3 -0
- tokenizer_config.json +65 -0
README.md
CHANGED
|
@@ -1,64 +1,63 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
license: mit
|
|
|
|
|
|
|
| 4 |
base_model: Splintir/speecht5_tts-pld-ceb-v2
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
---
|
| 11 |
|
| 12 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
-
|
| 15 |
# speecht5_tts-pld-ceb-solo
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
- Loss: 0.3093
|
| 20 |
-
|
| 21 |
-
## Model description
|
| 22 |
-
|
| 23 |
-
More information needed
|
| 24 |
-
|
| 25 |
-
## Intended uses & limitations
|
| 26 |
-
|
| 27 |
-
More information needed
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
## Training procedure
|
| 34 |
|
| 35 |
-
##
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
- seed: 42
|
| 42 |
-
- gradient_accumulation_steps: 4
|
| 43 |
-
- total_train_batch_size: 16
|
| 44 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 45 |
-
- lr_scheduler_type: linear
|
| 46 |
-
- lr_scheduler_warmup_steps: 30
|
| 47 |
-
- training_steps: 300
|
| 48 |
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
| 1.1890 | 21.48 | 150 | 0.3115 |
|
| 55 |
-
| 1.1782 | 32.16 | 225 | 0.3082 |
|
| 56 |
-
| 1.2334 | 42.96 | 300 | 0.3093 |
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
-
|
| 64 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
language: ceb
|
| 3 |
license: mit
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-to-speech
|
| 6 |
base_model: Splintir/speecht5_tts-pld-ceb-v2
|
| 7 |
+
datasets:
|
| 8 |
+
- sapinsapin/pld
|
| 9 |
tags:
|
| 10 |
+
- text-to-speech
|
| 11 |
+
- philippines
|
| 12 |
+
- philippine-languages
|
| 13 |
+
- ceb
|
| 14 |
---
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
# speecht5_tts-pld-ceb-solo
|
| 17 |
|
| 18 |
+
[`Splintir/speecht5_tts-pld-ceb-v2`](https://huggingface.co/Splintir/speecht5_tts-pld-ceb-v2) continue-finetuned on **99
|
| 19 |
+
more `ceb` clips** from [`sapinsapin/pld`](https://huggingface.co/datasets/sapinsapin/pld).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
The published checkpoint was trained on ~1,800 clips for 1,000 steps. Measuring
|
| 22 |
+
it showed that speaker conditioning was the part that undertrained: most native
|
| 23 |
+
speaker embeddings collapsed the decoder into a long, quiet ramble. This run
|
| 24 |
+
keeps the same recipe and gives it the rest of the language.
|
| 25 |
|
| 26 |
+
| | |
|
| 27 |
+
|---|---|
|
| 28 |
+
| training clips | 99 |
|
| 29 |
+
| steps | 300 |
|
| 30 |
+
| batch | 4 x 4 accumulation |
|
| 31 |
+
| learning rate | 5e-06 |
|
| 32 |
+
| precision | fp32 + gradient checkpointing (fp16 NaNs SpeechT5's mel loss) |
|
| 33 |
+
| eval loss (this run) | 0.3060 |
|
| 34 |
|
|
|
|
| 35 |
|
| 36 |
+
## Usage
|
| 37 |
|
| 38 |
+
SpeechT5 holds no voice of its own -- every call needs a 512-d x-vector. None
|
| 39 |
+
ships with the original PLD checkpoints, which is why they are usually run with
|
| 40 |
+
an American speaker from the HuggingFace tutorial. **`speaker.npy` in this repo
|
| 41 |
+
is a real ceb speaker from the training data**, so you can skip that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
```python
|
| 44 |
+
import numpy as np, torch, soundfile as sf
|
| 45 |
+
from huggingface_hub import hf_hub_download
|
| 46 |
+
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor
|
| 47 |
|
| 48 |
+
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
| 49 |
+
model = SpeechT5ForTextToSpeech.from_pretrained("Splintir/speecht5_tts-pld-ceb-solo")
|
| 50 |
+
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
speaker = torch.tensor(np.load(hf_hub_download("Splintir/speecht5_tts-pld-ceb-solo", "speaker.npy")))
|
| 53 |
+
ids = processor(text="Maayong buntag sa imong tanan.", return_tensors="pt")["input_ids"]
|
| 54 |
+
sf.write("out.wav", model.generate_speech(ids, speaker, vocoder=vocoder).numpy(), 16000)
|
| 55 |
+
```
|
| 56 |
|
| 57 |
+
Spell numbers out: the tokenizer is character-level Latin and drops digits
|
| 58 |
+
silently.
|
| 59 |
|
| 60 |
+
Trained with [`scripts/train_tts.py`](https://github.com/SPlinterRed/finetune-sapin);
|
| 61 |
+
preprocessing matches `finetune_tts.py` from the
|
| 62 |
+
[halohalo](https://github.com/sapinsapin/halohalo) pipeline -- one x-vector per
|
| 63 |
+
clip, never averaged.
|
added_tokens.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<ctc_blank>": 80,
|
| 3 |
+
"<mask>": 79
|
| 4 |
+
}
|
eval_texts.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
He is not getting younger so , gikinahanglan nga mangita siya og trabaho alang kanimo ug sa iyang umaabot nga pamilya .
|
| 2 |
+
Sa mga nagmabdos na, mahimong niwang (o gamay o daot) ang gisabak, hangtod pwede pud nga malulid o abnormal.
|
processor_config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"feature_extractor": {
|
| 3 |
+
"do_normalize": false,
|
| 4 |
+
"feature_extractor_type": "SpeechT5FeatureExtractor",
|
| 5 |
+
"feature_size": 1,
|
| 6 |
+
"fmax": 7600,
|
| 7 |
+
"fmin": 80,
|
| 8 |
+
"frame_signal_scale": 1.0,
|
| 9 |
+
"hop_length": 16,
|
| 10 |
+
"mel_floor": 1e-10,
|
| 11 |
+
"num_mel_bins": 80,
|
| 12 |
+
"padding_side": "right",
|
| 13 |
+
"padding_value": 0.0,
|
| 14 |
+
"return_attention_mask": true,
|
| 15 |
+
"sampling_rate": 16000,
|
| 16 |
+
"win_function": "hann_window",
|
| 17 |
+
"win_length": 64
|
| 18 |
+
},
|
| 19 |
+
"processor_class": "SpeechT5Processor"
|
| 20 |
+
}
|
speaker.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:099d84bd036ff9783c48f3129c96631b360f1195a12c14c0a6433d13c7bfdb96
|
| 3 |
+
size 2176
|
spm_char.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fcc48f3e225f627b1641db410ceb0c8649bd2b0c982e150b03f8be3728ab560
|
| 3 |
+
size 238473
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<pad>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"79": {
|
| 36 |
+
"content": "<mask>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"80": {
|
| 44 |
+
"content": "<ctc_blank>",
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"normalized": true,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": false
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"backend": "sentencepiece",
|
| 53 |
+
"bos_token": "<s>",
|
| 54 |
+
"eos_token": "</s>",
|
| 55 |
+
"is_local": false,
|
| 56 |
+
"local_files_only": false,
|
| 57 |
+
"mask_token": "<mask>",
|
| 58 |
+
"model_max_length": 600,
|
| 59 |
+
"normalize": false,
|
| 60 |
+
"pad_token": "<pad>",
|
| 61 |
+
"processor_class": "SpeechT5Processor",
|
| 62 |
+
"sp_model_kwargs": {},
|
| 63 |
+
"tokenizer_class": "SpeechT5Tokenizer",
|
| 64 |
+
"unk_token": "<unk>"
|
| 65 |
+
}
|