fix: make kokoro TTS optional

This commit is contained in:
guoyangzhen
2026-03-14 17:26:21 +08:00
parent 75ce967107
commit 53a47be80c
+2 -1
View File
@@ -11,7 +11,8 @@ try:
from IPython.display import display, Audio from IPython.display import display, Audio
import soundfile as sf import soundfile as sf
except ImportError: except ImportError:
print("Speech synthesis disabled. Please install the kokoro package.") print("Speech synthesis disabled. To enable TTS, install: pip install kokoro==0.9.4 soundfile ipython")
print("Note: kokoro requires Python <3.12 due to num2words dependency.")
IMPORT_FOUND = False IMPORT_FOUND = False
if __name__ == "__main__": if __name__ == "__main__":