From dfe60af4a5de62a32683acdaba9e064efc47d9b7 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Thu, 30 Mar 2023 15:26:13 -0600 Subject: [PATCH] native supports stream --- whisper-cpp-2023/native.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/whisper-cpp-2023/native.sh b/whisper-cpp-2023/native.sh index 79eaf89..80af9e4 100644 --- a/whisper-cpp-2023/native.sh +++ b/whisper-cpp-2023/native.sh @@ -11,7 +11,14 @@ fi if [ ! -f ./main ]; then make fi +if [ ! -f ./stream ]; then + make stream +fi if [ ! -f ./models/ggml-${MODEL:-tiny.en}.bin ]; then bash ./models/download-ggml-model.sh ${MODEL:-tiny.en} fi -time ./main -m ./models/ggml-${MODEL:-tiny.en}.bin -f ./samples/gb1.wav -t 4 +if [ -n "$STREAM" ]; then + ./stream -m ./models/ggml-${MODEL:-tiny.en}.bin -t 8 --step 500 --length ${MIC_TIMEOUT:-2}000 $(test -n "$MIC_ID" && echo -c "$MIC_ID") +else + time ./main -m ./models/ggml-${MODEL:-tiny.en}.bin -f ./samples/gb1.wav -t 4 +fi