feat: upgrade TTS to gpt-4o-mini-tts with voice instructions
- Switch from tts-1 to gpt-4o-mini-tts for lower latency and better quality - Change voice from alloy to coral - Add Chinese speech instructions for natural tone control Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ba83e433d3
commit
705647d732
|
|
@ -168,6 +168,7 @@ async def entrypoint(ctx: JobContext) -> None:
|
||||||
tts = openai_plugin.TTS(
|
tts = openai_plugin.TTS(
|
||||||
model=settings.openai_tts_model,
|
model=settings.openai_tts_model,
|
||||||
voice=settings.openai_tts_voice,
|
voice=settings.openai_tts_voice,
|
||||||
|
instructions="用自然、友好的中文语气说话,语速适中,像真人助手一样。",
|
||||||
client=_oai_client_tts,
|
client=_oai_client_tts,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ class Settings(BaseSettings):
|
||||||
openai_api_key: str = ""
|
openai_api_key: str = ""
|
||||||
openai_base_url: str = ""
|
openai_base_url: str = ""
|
||||||
openai_stt_model: str = "gpt-4o-transcribe"
|
openai_stt_model: str = "gpt-4o-transcribe"
|
||||||
openai_tts_model: str = "tts-1"
|
openai_tts_model: str = "gpt-4o-mini-tts"
|
||||||
openai_tts_voice: str = "alloy"
|
openai_tts_voice: str = "coral"
|
||||||
|
|
||||||
# Device
|
# Device
|
||||||
device: str = "cpu" # "cpu" or "cuda"
|
device: str = "cpu" # "cpu" or "cuda"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue