itriedcoding commited on
Commit
22bd33d
·
verified ·
1 Parent(s): 0d8044a

Add model card for Sol

Browse files
Files changed (1) hide show
  1. README.md +25 -19
README.md CHANGED
@@ -16,14 +16,14 @@ tags:
16
 
17
  # Sol
18
 
19
- **Sol** is a text-to-speech model that turns written text into natural sounding
20
- speech. It is a `SpeechT5` acoustic model that was **fine-tuned on public voice
21
- data** (a single-speaker subset of [LibriSpeech](https://www.openslr.org/12),
22
- speaker `2277`) and paired with the open `speecht5_hifigan` neural vocoder.
 
23
 
24
- Sol was trained end-to-end by this project: data collection, preprocessing,
25
- fine-tuning, evaluation and packaging. Training ran on CPU — no GPU required to
26
- reproduce.
27
 
28
  ## Model details
29
 
@@ -34,14 +34,20 @@ reproduce.
34
  | Vocoder | [`microsoft/speecht5_hifigan`](https://huggingface.co/microsoft/speecht5_hifigan) |
35
  | Training data | LibriSpeech `clean` / `validation`, speaker `2277` (public) |
36
  | Utterances | 87 |
37
- | Optimizer steps | ~250 (CPU, AdamW, lr 1e-5 → 5e-6) |
 
38
  | Sampling rate | 16 kHz |
39
  | Language | English |
40
- | Voice | single speaker via a fixed x-vector (`speaker_embedding.npy`) |
 
 
 
 
 
41
 
42
  ## Example audio
43
 
44
- These clips were generated by Sol (`<audio>` elements play on the Hub):
45
 
46
  <audio controls src="examples/hello.mp3"></audio>
47
 
@@ -71,7 +77,8 @@ processor = SpeechT5Processor.from_pretrained(repo)
71
  model = SpeechT5ForTextToSpeech.from_pretrained(repo)
72
  vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
73
 
74
- speaker = torch.tensor(np.load("speaker_embedding.npy")).unsqueeze(0) # shipped with the model
 
75
 
76
  text = "hello, i am sol."
77
  inputs = processor(text=text, return_tensors="pt")
@@ -82,22 +89,21 @@ with torch.no_grad():
82
  sf.write("sol.wav", speech.numpy(), samplerate=16000)
83
  ```
84
 
85
- The `speaker_embedding.npy` file is included in this repository so you get Sol's
86
- voice without needing a separate speaker-encoding model.
 
87
 
88
  ## Intended use & limitations
89
 
90
  - **Intended use:** research, prototyping and demos of English speech synthesis.
91
  - **Limitations:** single English speaker; no multi-speaker or multilingual
92
- support; may mispronounce rare names, numbers and unusual punctuation; can
93
- occasionally cut a sentence short. Output is not a human voice and should not
94
- be presented as one.
95
- - Do not use for impersonation or deceptive audio.
96
 
97
  ## Training data & credits
98
 
99
- - Voice data: [LibriSpeech](https://www.openslr.org/12) (`openslr/librispeech_asr`),
100
- released under CC BY 4.0.
101
  - Base model & vocoder: Microsoft Research Asia, via 🤗 Transformers.
102
  - Fine-tuned and packaged by the **Sol** project.
103
 
 
16
 
17
  # Sol
18
 
19
+ **Sol** is a text-to-speech model that turns written text into clear, natural
20
+ sounding speech. It is a `SpeechT5` acoustic model that was **fine-tuned on
21
+ public voice data** (a single-speaker subset of
22
+ [LibriSpeech](https://www.openslr.org/12), speaker `2277`) and paired with the
23
+ open `speecht5_hifigan` neural vocoder.
24
 
25
+ Sol was trained end-to-end by this project — data collection, preprocessing,
26
+ fine-tuning, evaluation and packaging — and it runs on CPU.
 
27
 
28
  ## Model details
29
 
 
34
  | Vocoder | [`microsoft/speecht5_hifigan`](https://huggingface.co/microsoft/speecht5_hifigan) |
35
  | Training data | LibriSpeech `clean` / `validation`, speaker `2277` (public) |
36
  | Utterances | 87 |
37
+ | Fine-tune | light: 80 optimizer steps, AdamW, lr 2e-6 (CPU) |
38
+ | Voice | single speaker x-vector (`speaker_embedding.npy`, shipped) |
39
  | Sampling rate | 16 kHz |
40
  | Language | English |
41
+
42
+ ## Quality
43
+
44
+ Generated speech is **clean and intelligible**. On the six example clips below,
45
+ Whisper (`openai/whisper-tiny`) transcribes Sol's output at **~6.5% WER**, with
46
+ several clips at 0% error. Outputs are trimmed of silence and peak-normalised.
47
 
48
  ## Example audio
49
 
50
+ These clips were generated by Sol:
51
 
52
  <audio controls src="examples/hello.mp3"></audio>
53
 
 
77
  model = SpeechT5ForTextToSpeech.from_pretrained(repo)
78
  vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
79
 
80
+ # Sol's voice is shipped with the model
81
+ speaker = torch.tensor(np.load("speaker_embedding.npy")).unsqueeze(0)
82
 
83
  text = "hello, i am sol."
84
  inputs = processor(text=text, return_tensors="pt")
 
89
  sf.write("sol.wav", speech.numpy(), samplerate=16000)
90
  ```
91
 
92
+ > **Tip:** keep the speaker embedding at its original scale. It is an
93
+ > x-vector with norm ≈ 320 — do **not** unit-normalise it, or the speaker
94
+ > conditioning weakens and the audio degrades.
95
 
96
  ## Intended use & limitations
97
 
98
  - **Intended use:** research, prototyping and demos of English speech synthesis.
99
  - **Limitations:** single English speaker; no multi-speaker or multilingual
100
+ support; may mispronounce rare names, numbers and unusual punctuation.
101
+ - Output is not a human voice and must not be presented as one, nor used for
102
+ impersonation or deceptive audio.
 
103
 
104
  ## Training data & credits
105
 
106
+ - Voice data: [LibriSpeech](https://www.openslr.org/12) (`openslr/librispeech_asr`), CC BY 4.0.
 
107
  - Base model & vocoder: Microsoft Research Asia, via 🤗 Transformers.
108
  - Fine-tuned and packaged by the **Sol** project.
109