Skip to content

Commit 1302179

Browse files
committed
tts: update doc
Signed-off-by: blob42 <[email protected]>
1 parent 0a63ce4 commit 1302179

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

docs/content/docs/features/text-to-audio.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Coqui works without any configuration, to test it, you can run the following cur
4848

4949
You can use the env variable COQUI_LANGUAGE to set the language used by the coqui backend.
5050

51+
You can also use config files to configure tts models (see section below on how to use config files).
52+
5153
### Bark
5254

5355
[Bark](https://github.com/suno-ai/bark) allows to generate audio from text prompts.
@@ -150,11 +152,12 @@ name: cloned-voice
150152
backend: vall-e-x
151153
parameters:
152154
model: "cloned-voice"
153-
vall-e:
154-
# The path to the audio file to be cloned
155-
# relative to the models directory
156-
# Max 15s
157-
audio_path: "audio-sample.wav"
155+
tts:
156+
vall-e:
157+
# The path to the audio file to be cloned
158+
# relative to the models directory
159+
# Max 15s
160+
audio_path: "audio-sample.wav"
158161
```
159162
160163
Then you can specify the model name in the requests:
@@ -166,6 +169,35 @@ curl http://localhost:8080/tts -H "Content-Type: application/json" -d '{
166169
}' | aplay
167170
```
168171

169-
## Parler-tts
172+
### Parler-tts
173+
174+
`parler-tts`. It is possible to install and configure the model directly from the gallery. https://github.com/huggingface/parler-tts
175+
176+
177+
## Using config files
178+
179+
You can also use a `config-file` to specify TTS models and their parameters.
180+
181+
In the following example we define a custom config to load the `xtts_v2` model, and specify a voice and language.
182+
183+
```yaml
170184

171-
`parler-tts`. It is possible to install and configure the model directly from the gallery. https://github.com/huggingface/parler-tts
185+
name: xtts_v2
186+
backend: coqui
187+
parameters:
188+
language: fr
189+
model: tts_models/multilingual/multi-dataset/xtts_v2
190+
191+
tts:
192+
voice: Ana Florence
193+
```
194+
195+
With this config, you can now use the following curl command to generate a text-to-speech audio file:
196+
```bash
197+
curl -L http://localhost:8080/tts \
198+
-H "Content-Type: application/json" \
199+
-d '{
200+
"model": "xtts_v2",
201+
"input": "Bonjour, je suis Ana Florence. Comment puis-je vous aider?"
202+
}' | aplay
203+
```

0 commit comments

Comments
 (0)