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