File size: 2,776 Bytes
13f5a45
 
 
 
 
 
 
 
 
 
 
 
 
 
a56a21d
13f5a45
 
db5d3ee
 
13f5a45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73f7700
 
 
 
 
13f5a45
 
 
 
 
 
 
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
---
license: apache-2.0
language:
- fr
pipeline_tag: text-to-speech
tags:
- tts
- onnx
- tiny
base_model: n4ze3m/tiny-voca
---

# tiny-voca-fr

A small standard French text-to-speech model: two voices, 4.5M parameters,
18 MB with the waveform generator included. It runs on a CPU or in the browser.

French port of [tiny-voca](https://huggingface.co/n4ze3m/tiny-voca).
[Code](https://github.com/DanielSuncost/tiny-voca-fr) · [Demo](https://www.suncostlabs.com/tinyvocafr)

## Voices

| Voice | Description | Samples |
|---|---|---|
| `FR_F1` | Female, mid-forties, warm and clear | `samples/FR_F1-*.wav` |
| `FR_M1` | Male, mid-fifties, deep and calm | `samples/FR_M1-*.wav` |

## Files

| File | |
|---|---|
| `tiny-voca-fr.pt` | PyTorch inference checkpoint |
| `config.json` | Model configuration |
| `onnx/model.onnx` | ONNX export (phoneme ids in, 24 kHz audio out) |
| `onnx/model.json` | Voices, phoneme symbols and ONNX inputs |
| `samples/` | Four sentences per voice |

## Usage

```bash
git clone https://github.com/DanielSuncost/tiny-voca-fr.git && cd tiny-voca-fr
pip install -e . && sudo apt install espeak-ng
hf download DanielSuncost/tiny-voca-fr --local-dir weights
TINY_VOCA_LANGUAGE=fr python -m tiny_voca.infer --checkpoint weights/tiny-voca-fr.pt \
  --voice FR_F1 --text "Bonjour, comment allez-vous ?" --output bonjour.wav
```

ONNX inputs: `tokens` and `stress` (int64 `[1, n]`, from the eSpeak NG `fr-fr`
front end in the code repository), `voice` (int64 `[1]`, 0 = FR_F1, 1 = FR_M1),
`speed`, `pitch_shift`, `pitch_range` (float32 `[1]`). Outputs: `audio`
(float32, 24 kHz) and `durations` (frames per token).

## Training data

Synthetic. Qwen3-TTS 1.7B Base (Apache-2.0) read 9,200 sentences in two voices
designed with Qwen3-TTS VoiceDesign: 8,000 from the Common Voice sentence
collector (CC0) and 1,200 templates for numbers, prices, times and dates.
Clips were screened with Whisper large-v3-turbo and aligned with wav2vec2;
14.1 hours were used for training (100,000 steps).

## Results

Whisper large-v3-turbo word error rate: 0% for both voices on unseen
pronunciation test sentences (liaison, h aspiré, nasal vowels, *tu/tout*,
*œuf/œufs*); 0% (FR_F1) and 4.5% (FR_M1, same as the teacher) on held-out test
sentences.

## Limits

- The male voice is less natural than the female voice. Its vocoder now mixes
  noise into half of the pulse power above 1 kHz (mixed excitation, no extra
  parameters), which removes most of the earlier mechanical buzz; a faint
  trace can remain. Use the current code with these weights: older code loads
  them without the mix.
- eSpeak NG misses some liaisons (*comment‿allez*), adds a few false ones, and
  reads *fils* (son) as [fil].
- Two fixed voices. No voice cloning.

## License

Apache-2.0.