Tim Luka Horstmann commited on
Commit ·
b8961cc
1
Parent(s): 245f2cf
Updated voice settings
Browse files
app.py
CHANGED
|
@@ -386,13 +386,13 @@ async def text_to_speech(request: Request, tts_request: TTSRequest):
|
|
| 386 |
response = elevenlabs_client.text_to_speech.convert(
|
| 387 |
voice_id=tts_voice_id,
|
| 388 |
model_id="eleven_flash_v2_5",
|
| 389 |
-
text=clean_text
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
)
|
| 397 |
|
| 398 |
# Convert generator to bytes
|
|
|
|
| 386 |
response = elevenlabs_client.text_to_speech.convert(
|
| 387 |
voice_id=tts_voice_id,
|
| 388 |
model_id="eleven_flash_v2_5",
|
| 389 |
+
text=clean_text,
|
| 390 |
+
voice_settings=VoiceSettings(
|
| 391 |
+
stability=0.7, # More stability = less variability; best: 0.7–0.85
|
| 392 |
+
similarity_boost=0.9, # Boost similarity to original voice
|
| 393 |
+
style=0.2, # Keep subtle emotion; increase for expressive output
|
| 394 |
+
use_speaker_boost=True # Helps preserve speaker identity better
|
| 395 |
+
)
|
| 396 |
)
|
| 397 |
|
| 398 |
# Convert generator to bytes
|