feat(voice): switch cloned voice speaker to Sade (Jezebel)
This commit is contained in:
parent
438bca3ba9
commit
2b6da541a4
1 changed files with 3 additions and 3 deletions
|
|
@ -129,20 +129,20 @@ async def text_to_speech_bytes(text: str) -> bytes:
|
||||||
if not speech_text:
|
if not speech_text:
|
||||||
speech_text = "Приняла, Александр. Всё проанализировано и готово."
|
speech_text = "Приняла, Александр. Всё проанализировано и готово."
|
||||||
|
|
||||||
# 1. Приоритет: локальный синтез голосом Скарлетт Йоханссон на MacMini M4 (XTTS-v2 Apple Metal)
|
# 1. Приоритет: локальный синтез голосом Шаде (Sade) на MacMini M4 (XTTS-v2 Apple Metal)
|
||||||
try:
|
try:
|
||||||
timeout = aiohttp.ClientTimeout(total=20)
|
timeout = aiohttp.ClientTimeout(total=20)
|
||||||
async with aiohttp.ClientSession(timeout=timeout) as session:
|
async with aiohttp.ClientSession(timeout=timeout) as session:
|
||||||
payload = {
|
payload = {
|
||||||
"text": speech_text,
|
"text": speech_text,
|
||||||
"language": "ru",
|
"language": "ru",
|
||||||
"speaker_wav": "/Users/matrixhasyou/scarlett_ref_15s.wav"
|
"speaker_wav": "/Users/matrixhasyou/sade_ref_15s.wav"
|
||||||
}
|
}
|
||||||
async with session.post("http://192.168.10.167:8050/tts", json=payload) as resp:
|
async with session.post("http://192.168.10.167:8050/tts", json=payload) as resp:
|
||||||
if resp.status == 200:
|
if resp.status == 200:
|
||||||
data = await resp.read()
|
data = await resp.read()
|
||||||
if len(data) > 1000:
|
if len(data) > 1000:
|
||||||
logger.info(f"🎤 Голос Скарлетт Йоханссон (XTTS-v2 MacMini) успешно синтезирован ({len(data)} байт)")
|
logger.info(f"🎤 Голос Шаде (XTTS-v2 MacMini) успешно синтезирован ({len(data)} байт)")
|
||||||
return data
|
return data
|
||||||
logger.warning(f"XTTS вернул HTTP {resp.status}, переход на Edge TTS")
|
logger.warning(f"XTTS вернул HTTP {resp.status}, переход на Edge TTS")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue