Spaces:
Runtime error
Runtime error
Update tts_engine.py
Browse files36 unmodified lines373839404142431 unmodified line454647484950515253545536 unmodified lineslang_code = LANG_MAP.get(lang.lower(), "en")if voice_clone and os.path.exists("my_voice.wav"):# clone your own voiceself.tts.tts_to_file(text=text,file_path=out_file,1 unmodified linelanguage=lang_code)else:# fallback to a neutral synthetic voiceself.tts.tts_to_file(text=text,file_path=out_file,speaker_wav=None, # Let model pick default embeddinglanguage=lang_code)else:36 unmodified lines373839404142431 unmodified line454647484950515253545536 unmodified lineslang_code = LANG_MAP.get(lang.lower(), "en")if voice_clone and os.path.exists("my_voice.wav"):# ✅ clone your own voiceself.tts.tts_to_file(text=text,file_path=out_file,1 unmodified linelanguage=lang_code)else:# ✅ fallback to a demo synthetic voice (pretrained speaker)self.tts.tts_to_file(text=text,file_path=out_file,speaker="female-en-5", # <-- safe defaultlanguage=lang_code)else:
tts_engine.py+3-3