Merge pull request #182 from linyqh/dev072

修复试听 tts bug
This commit is contained in:
viccy 2025-09-17 00:28:14 +08:00 committed by GitHub
commit dc60f999ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -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}'")

View File

@ -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):