-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun-stream-test.sh
30 lines (26 loc) · 1.01 KB
/
run-stream-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
echo "This script requires a microphone and will use default system settings."
echo "Your sound-cards are:"
echo ""
cat /proc/asound/cards
echo ""
echo "To test your mic you can use:"
echo "arecord -r 16000 -f S16_LE -c 1 -d 6 test.wav"
echo ""
THREADS=4
MODEL="tiny"
LANG="en"
#CAPTURE_DEVICE="-1"
AUDIO_STEP_MS=5000
AUDIO_LEN_MS=5000
VAD_THRESH=0.5
echo "Using model '$MODEL' with language '$LANG' and $THREADS threads"
echo "To see all options run './stream -h' in 'whisper.cpp' folder."
echo "To learn more visit:"
echo "https://github.com/ggerganov/whisper.cpp/tree/master/examples/stream"
echo ""
read -p "Press any key to continue (CTRL+C to abort)."
cd whisper.cpp
#./stream -m "models/ggml-${MODEL}.bin" -l $LANG -t $THREADS --step $AUDIO_STEP_MS --length $AUDIO_LEN_MS --keep-context
./stream -m "models/ggml-${MODEL}.bin" -l $LANG -t $THREADS --step $AUDIO_STEP_MS --length $AUDIO_LEN_MS
#./stream -m "models/ggml-${MODEL}.bin" -l $LANG -t $THREADS --step 0 --length $AUDIO_LEN_MS --vad-thold $VAD_THRESH