Instructions to use kaanhgunay/pocket-tts-tr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pocket-TTS
How to use kaanhgunay/pocket-tts-tr with Pocket-TTS:
from pocket_tts import TTSModel import scipy.io.wavfile tts_model = TTSModel.load_model("kaanhgunay/pocket-tts-tr") voice_state = tts_model.get_state_for_audio_prompt( "hf://kyutai/tts-voices/alba-mackenna/casual.wav" ) audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.") # Audio is a 1D torch tensor containing PCM data. scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.numpy()) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +103 -0
- SHA256SUMS +3 -0
- config.yaml +55 -0
- model.safetensors +3 -0
- tokenizer.model +3 -0
- training/tr_24l_teacher.yaml +71 -0
README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- tr
|
| 5 |
+
pipeline_tag: text-to-speech
|
| 6 |
+
library_name: pocket-tts
|
| 7 |
+
datasets:
|
| 8 |
+
- serdarcaglar/turkish-tts-audiobooks
|
| 9 |
+
base_model:
|
| 10 |
+
- kyutai/pocket-tts
|
| 11 |
+
tags:
|
| 12 |
+
- pocket-tts
|
| 13 |
+
- tts
|
| 14 |
+
- turkish
|
| 15 |
+
- turkish-tts
|
| 16 |
+
- speech
|
| 17 |
+
- voice-cloning
|
| 18 |
+
---
|
| 19 |
+
# Pocket TTS Turkish — v0.1 Base
|
| 20 |
+
|
| 21 |
+
Turkish 24-layer Pocket TTS teacher model based on Kyutai Pocket TTS.
|
| 22 |
+
|
| 23 |
+
This is the **v0.1 base release**, focused on high-quality Turkish speech synthesis. It is intended both for direct Turkish TTS inference and as a base checkpoint for further fine-tuning and depth distillation.
|
| 24 |
+
|
| 25 |
+
## Model
|
| 26 |
+
|
| 27 |
+
* Architecture: Pocket TTS
|
| 28 |
+
* Language: Turkish
|
| 29 |
+
* Transformer depth: 24 layers
|
| 30 |
+
* Tokenizer: Turkish SentencePiece BPE
|
| 31 |
+
* Vocabulary size: 4,000
|
| 32 |
+
* Audio sample rate: 24 kHz
|
| 33 |
+
* Training checkpoint selected: 112,000 steps
|
| 34 |
+
* Generation temperature: 0.3
|
| 35 |
+
|
| 36 |
+
## Training data
|
| 37 |
+
|
| 38 |
+
The model was trained primarily on:
|
| 39 |
+
|
| 40 |
+
`serdarcaglar/turkish-tts-audiobooks`
|
| 41 |
+
|
| 42 |
+
A leakage-controlled training/dev/test split and additional preprocessing, normalization, alignment validation and filtering were applied before training.
|
| 43 |
+
|
| 44 |
+
## Usage
|
| 45 |
+
|
| 46 |
+
With Pocket TTS:
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
uvx pocket-tts generate \
|
| 50 |
+
--config "hf://kaanhgunay/pocket-tts-tr/config.yaml@v0.1-base" \
|
| 51 |
+
--voice "./voice.wav" \
|
| 52 |
+
--text "Merhaba, bugün güzel bir gün." \
|
| 53 |
+
--output-path output.wav
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Replace `HF_USERNAME` with the repository owner's Hugging Face username.
|
| 57 |
+
|
| 58 |
+
## Strengths
|
| 59 |
+
|
| 60 |
+
The model performs well on standard Turkish text, including:
|
| 61 |
+
|
| 62 |
+
* fluent Turkish sentences
|
| 63 |
+
* long-form sentences
|
| 64 |
+
* Turkish morphology and long agglutinative words
|
| 65 |
+
* numbers and dates when appropriately normalized
|
| 66 |
+
* punctuation and natural pauses
|
| 67 |
+
* voice-conditioned speech generation
|
| 68 |
+
|
| 69 |
+
## Known limitations
|
| 70 |
+
|
| 71 |
+
### Foreign-language words
|
| 72 |
+
|
| 73 |
+
This release is primarily trained for Turkish.
|
| 74 |
+
|
| 75 |
+
English and other foreign-language words may be pronounced according to Turkish orthographic and phonetic patterns. Code-switching is **not considered a supported capability in v0.1**.
|
| 76 |
+
|
| 77 |
+
A future release is planned to improve Turkish-English code-switching while preserving Turkish quality.
|
| 78 |
+
|
| 79 |
+
### Beginning-of-generation artifact
|
| 80 |
+
|
| 81 |
+
A short transient or pronunciation artifact may occasionally be audible around the first syllable at the beginning of generated speech.
|
| 82 |
+
|
| 83 |
+
This behavior is being investigated separately from the acoustic/language quality of the model.
|
| 84 |
+
|
| 85 |
+
## Versioning
|
| 86 |
+
|
| 87 |
+
* **v0.1-base** — Turkish 24L base teacher, 112k steps
|
| 88 |
+
* Future releases may add code-switch improvements and distilled variants.
|
| 89 |
+
|
| 90 |
+
## Attribution
|
| 91 |
+
|
| 92 |
+
This model is derived from Kyutai Pocket TTS.
|
| 93 |
+
|
| 94 |
+
Training data attribution:
|
| 95 |
+
|
| 96 |
+
Serdar I. Çağlar, *Turkish TTS Audiobooks: a 2,724-hour Turkish read-speech corpus for text-to-speech*, Hugging Face, 2026.
|
| 97 |
+
|
| 98 |
+
## License
|
| 99 |
+
|
| 100 |
+
Model weights are released under CC BY 4.0.
|
| 101 |
+
|
| 102 |
+
Users are responsible for ensuring that voice cloning and generated speech are used lawfully and with appropriate consent.
|
| 103 |
+
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
575d7a90e41de407340e8048e6c1b3d6573c36ab9054e1233d3cb0d6777eaf5f model.safetensors
|
| 2 |
+
c9ff291390865a78112e23b8ded6842300c6a88a58b0ef9694d6e8282f4ea490 tokenizer.model
|
| 3 |
+
350c8145552415cfe092c3fa8f3181715b7e3c666ee7bab46b8480b36668a553 config.yaml
|
config.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
weights_path: hf://kaanhgunay/pocket-tts-tr/model.safetensors@v0.1-base
|
| 2 |
+
weights_path_without_voice_cloning: null
|
| 3 |
+
default_temperature: 0.3
|
| 4 |
+
flow_lm:
|
| 5 |
+
insert_bos_before_voice: true
|
| 6 |
+
dtype: float32
|
| 7 |
+
flow:
|
| 8 |
+
depth: 6
|
| 9 |
+
dim: 512
|
| 10 |
+
transformer:
|
| 11 |
+
d_model: 1024
|
| 12 |
+
hidden_scale: 4
|
| 13 |
+
max_period: 10000
|
| 14 |
+
num_heads: 16
|
| 15 |
+
num_layers: 24
|
| 16 |
+
lookup_table:
|
| 17 |
+
dim: 1024
|
| 18 |
+
n_bins: 4000
|
| 19 |
+
tokenizer: sentencepiece
|
| 20 |
+
tokenizer_path: hf://kaanhgunay/pocket-tts-tr/tokenizer.model@v0.1-base
|
| 21 |
+
mimi:
|
| 22 |
+
dtype: float32
|
| 23 |
+
sample_rate: 24000
|
| 24 |
+
inner_dim: 32
|
| 25 |
+
outer_dim: 512
|
| 26 |
+
channels: 1
|
| 27 |
+
frame_rate: 12.5
|
| 28 |
+
seanet:
|
| 29 |
+
dimension: 512
|
| 30 |
+
channels: 1
|
| 31 |
+
n_filters: 64
|
| 32 |
+
n_residual_layers: 1
|
| 33 |
+
ratios:
|
| 34 |
+
- 6
|
| 35 |
+
- 5
|
| 36 |
+
- 4
|
| 37 |
+
kernel_size: 7
|
| 38 |
+
residual_kernel_size: 3
|
| 39 |
+
last_kernel_size: 3
|
| 40 |
+
dilation_base: 2
|
| 41 |
+
pad_mode: constant
|
| 42 |
+
compress: 2
|
| 43 |
+
transformer:
|
| 44 |
+
d_model: 512
|
| 45 |
+
num_heads: 8
|
| 46 |
+
num_layers: 2
|
| 47 |
+
layer_scale: 0.01
|
| 48 |
+
context: 250
|
| 49 |
+
dim_feedforward: 2048
|
| 50 |
+
input_dimension: 512
|
| 51 |
+
output_dimensions:
|
| 52 |
+
- 512
|
| 53 |
+
quantizer:
|
| 54 |
+
dimension: 32
|
| 55 |
+
output_dimension: 512
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:575d7a90e41de407340e8048e6c1b3d6573c36ab9054e1233d3cb0d6777eaf5f
|
| 3 |
+
size 1344315200
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9ff291390865a78112e23b8ded6842300c6a88a58b0ef9694d6e8282f4ea490
|
| 3 |
+
size 302928
|
training/tr_24l_teacher.yaml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model_config: pocket_tts/config/english_2026-04_24l.yaml
|
| 2 |
+
|
| 3 |
+
model_overrides:
|
| 4 |
+
flow_lm.lookup_table.tokenizer_path: data/tr/tokenizer_full.model
|
| 5 |
+
|
| 6 |
+
start_from_pretrained: true
|
| 7 |
+
reset_text_embedding: true
|
| 8 |
+
|
| 9 |
+
data:
|
| 10 |
+
train_jsonl: data/tr/alignments/train_final_aligned_clean.jsonl
|
| 11 |
+
valid_jsonl: data/tr/alignments/dev_final_aligned_clean.jsonl
|
| 12 |
+
max_duration_sec: 30.0
|
| 13 |
+
max_voice_prompt_sec: 5.0
|
| 14 |
+
shuffle: true
|
| 15 |
+
loader_procs: 3
|
| 16 |
+
|
| 17 |
+
flow:
|
| 18 |
+
type: lsd
|
| 19 |
+
kwargs: {}
|
| 20 |
+
|
| 21 |
+
flow_batch_multiplier: 4
|
| 22 |
+
eos_loss_weight: 0.1
|
| 23 |
+
|
| 24 |
+
text_dropout: 0.2
|
| 25 |
+
voice_dropout: 0.2
|
| 26 |
+
|
| 27 |
+
optim:
|
| 28 |
+
lr: 2e-4
|
| 29 |
+
weight_decay: 0.1
|
| 30 |
+
betas:
|
| 31 |
+
- 0.9
|
| 32 |
+
- 0.95
|
| 33 |
+
eps: 1e-8
|
| 34 |
+
max_norm: 1.0
|
| 35 |
+
warmup_steps: 1000
|
| 36 |
+
schedule: constant
|
| 37 |
+
lr_min_ratio: 0.0
|
| 38 |
+
|
| 39 |
+
run_dir: runs/tr_24l_teacher
|
| 40 |
+
|
| 41 |
+
# RTX 5090 / 32 GB
|
| 42 |
+
# effective batch = 16 * 4 = 64
|
| 43 |
+
batch_size: 16
|
| 44 |
+
grad_accum_steps: 4
|
| 45 |
+
|
| 46 |
+
max_steps: 250000
|
| 47 |
+
seed: 42
|
| 48 |
+
|
| 49 |
+
stats_ema_steps: 1000
|
| 50 |
+
stats_ema_decay: 0.999
|
| 51 |
+
ema_decay: 0.999
|
| 52 |
+
|
| 53 |
+
compile: true
|
| 54 |
+
|
| 55 |
+
log_freq: 50
|
| 56 |
+
valid_freq: 2500
|
| 57 |
+
num_valid_batches: 50
|
| 58 |
+
|
| 59 |
+
ckpt_freq: 1000
|
| 60 |
+
num_ckpt_keep: 6
|
| 61 |
+
|
| 62 |
+
sample_freq: 2500
|
| 63 |
+
sample_temp: 0.3
|
| 64 |
+
sample_cfg_coef: 2.0
|
| 65 |
+
|
| 66 |
+
sample_sentences:
|
| 67 |
+
- "Bugün hava oldukça güzel ve insanlar parkta yürüyüş yapıyor."
|
| 68 |
+
- "Türkçe konuşma sentezi doğal, anlaşılır ve akıcı bir ses üretmelidir."
|
| 69 |
+
- "Otuz sekiz yolcu sabah erkenden tren istasyonunda buluştu."
|
| 70 |
+
- "İnsan bazen geçmişi düşünür, sonra sessizce gülümseyerek yoluna devam eder."
|
| 71 |
+
- "Çocuk küçük kırmızı topu bahçenin öbür ucuna doğru hızla yuvarladı."
|