diff options
Diffstat (limited to 'assistant.py')
| -rw-r--r-- | assistant.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/assistant.py b/assistant.py index 49fb082..00c1081 100644 --- a/assistant.py +++ b/assistant.py @@ -17,7 +17,7 @@ """Mic button on: record. Mic button off: transcribe (whisper-server), ask the loaded llama-server model, speak the reply (Kokoro). -Run: .venv/bin/python assistant.py (--test runs the self-check) +Run: python3 assistant.py (--test runs the self-check) """ import ctypes @@ -134,12 +134,8 @@ def ask(messages): def speaker(q): - from kokoro_onnx import Kokoro, EspeakConfig - # The espeakng-loader wheel's bundled lib has a broken data path; use - # the system espeak-ng. - k = Kokoro(f"{MODELS}/kokoro/kokoro-v1.0.onnx", f"{MODELS}/kokoro/voices-v1.0.bin", - espeak_config=EspeakConfig(lib_path="/usr/lib64/libespeak-ng.so.1", - data_path="/usr/share/espeak-ng-data")) + from kokoro_onnx import Kokoro + k = Kokoro(f"{MODELS}/kokoro/kokoro-v1.0.onnx", f"{MODELS}/kokoro/voices-v1.0.bin") voices = {"it": 0.8 * k.get_voice_style("if_sara") + 0.2 * k.get_voice_style("af_bella"), "en": k.get_voice_style("af_heart")} play = None |
