@@ -48,6 +48,8 @@ Coqui works without any configuration, to test it, you can run the following cur
48
48
49
49
You can use the env variable COQUI_LANGUAGE to set the language used by the coqui backend.
50
50
51
+ You can also use config files to configure tts models (see section below on how to use config files).
52
+
51
53
### Bark
52
54
53
55
[ Bark] ( https://github.com/suno-ai/bark ) allows to generate audio from text prompts.
@@ -150,11 +152,12 @@ name: cloned-voice
150
152
backend : vall-e-x
151
153
parameters :
152
154
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"
158
161
` ` `
159
162
160
163
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 '{
166
169
}' | aplay
167
170
```
168
171
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
170
184
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