This commit is contained in:
pporcheret
2026-10-30 22:10:03 +01:00
parent 7f26f9b015
commit 90ffa635a0
161 changed files with 19042 additions and 111 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ def _vosk_recognizer(rate, *, wake_only=False, wake_word=''):
from vosk import KaldiRecognizer
from services.audio import get_vosk_model
model_path = os.getenv('WAKE_VOSK_MODEL_PATH') if wake_only else os.getenv('VOSK_MODEL_PATH')
if not model_path or not os.path.isfile(model_path):
if not model_path or not os.path.isdir(model_path):
raise RuntimeError('Modele Vosk requis introuvable : ' + str(model_path))
if wake_only:
words = [wake_word, *STOP_PHRASES, *LEAD_WORDS, '[unk]']