hotwords uses installed rust-whisper

master v0.0.1
Bel LaPointe 2023-03-31 11:03:57 -06:00
parent 9c40eae00a
commit 4e5212a9b7
2 changed files with 5 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class Parser(threading.Thread):
p = "/tmp/whisper-cpp.wav"
with open("/tmp/whisper-cpp.wav", "wb") as f:
f.write(wav)
proc = subprocess.run(f"./main -m ./models/ggml-{os.environ.get('MODEL','tiny.en')}.bin -t 4 -f {p} --no-timestamps".split(), capture_output=True)
proc = subprocess.run(f"MODEL=./models/ggml-{os.environ.get('MODEL','tiny.en')}.bin WAV={p} P=2 rust-whisper", capture_output=True, shell=True)
result = proc.stdout.decode().strip()
if os.environ.get("DEBUG", None):
log("raw transcript:", result)

View File

@ -0,0 +1,4 @@
git+https://github.com/openai/whisper.git
soundfile
PyAudio
SpeechRecognition