mirror of
https://github.com/linyqh/NarratoAI.git
synced 2025-12-10 18:02:51 +00:00
commit
dc60f999ed
@ -1081,7 +1081,7 @@ def should_use_azure_speech_services(voice_name: str) -> bool:
|
||||
|
||||
|
||||
def tts(
|
||||
text: str, voice_name: str, voice_rate: float, voice_pitch: float, voice_file: str, tts_engine: str = "azure"
|
||||
text: str, voice_name: str, voice_rate: float, voice_pitch: float, voice_file: str, tts_engine: str
|
||||
) -> Union[SubMaker, None]:
|
||||
logger.info(f"使用 TTS 引擎: '{tts_engine}', 语音: '{voice_name}'")
|
||||
|
||||
|
||||
@ -591,6 +591,7 @@ def render_voice_preview_new(tr, selected_engine):
|
||||
voice_rate=voice_rate,
|
||||
voice_pitch=voice_pitch,
|
||||
voice_file=audio_file,
|
||||
tts_engine=st.session_state.get('tts_engine')
|
||||
)
|
||||
|
||||
if sub_maker and os.path.exists(audio_file):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user