From 75ce96710710474659f6c35bd80360b9609626aa Mon Sep 17 00:00:00 2001 From: guoyangzhen Date: Sat, 14 Mar 2026 17:26:19 +0800 Subject: [PATCH 1/2] fix: make kokoro TTS optional --- requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 58e09bb..b1f8048 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -kokoro==0.9.4 certifi==2025.4.26 fastapi>=0.115.12 flask>=3.1.0 @@ -46,3 +45,6 @@ openai sniffio ordered_set pypinyin + +# Optional: TTS support (requires Python <3.12) +# pip install kokoro==0.9.4 soundfile ipython From 53a47be80cd4e411173b8bff2ef05195312da1f8 Mon Sep 17 00:00:00 2001 From: guoyangzhen Date: Sat, 14 Mar 2026 17:26:21 +0800 Subject: [PATCH 2/2] fix: make kokoro TTS optional --- sources/text_to_speech.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/text_to_speech.py b/sources/text_to_speech.py index f29dfde..42b010c 100644 --- a/sources/text_to_speech.py +++ b/sources/text_to_speech.py @@ -11,7 +11,8 @@ try: from IPython.display import display, Audio import soundfile as sf 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 if __name__ == "__main__":