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