Edit code for success run
This commit is contained in:
@@ -2,6 +2,7 @@ import os
|
||||
import sys
|
||||
import subprocess
|
||||
import threading
|
||||
from elevenlabs import VoiceSettings
|
||||
|
||||
from .config import AUDIO_SINK, AGENTS, log
|
||||
|
||||
@@ -68,11 +69,20 @@ def _speak_elevenlabs(text: str, agent_id: str):
|
||||
print(f"⚠️ tts_voice не задан для {agent_id}")
|
||||
return
|
||||
|
||||
voice_settings = VoiceSettings(
|
||||
stability=0.5,
|
||||
similarity_boost=0.75,
|
||||
style=0.0,
|
||||
use_speaker_boost=True,
|
||||
speed=1.1 # Значение от 0.7 до 1.2. 1.1 — это ускорение на 10%
|
||||
)
|
||||
|
||||
audio_stream = client.text_to_speech.convert(
|
||||
text=text,
|
||||
voice_id=voice_id,
|
||||
model_id=ELEVENLABS_MODEL,
|
||||
output_format="mp3_44100_128",
|
||||
voice_settings=voice_settings
|
||||
)
|
||||
|
||||
with _process_lock:
|
||||
|
||||
Reference in New Issue
Block a user