]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Update README.md
authorGeorgi Gerganov <redacted>
Thu, 15 Dec 2022 18:38:08 +0000 (20:38 +0200)
committerGitHub <redacted>
Thu, 15 Dec 2022 18:38:08 +0000 (20:38 +0200)
examples/stream/README.md

index 1ca7ee295b6c8a0d5a732a977c2e74b651c93974..6d57734e27d0103eb9b334718995a0aa6a3ac0a1 100644 (file)
@@ -10,6 +10,23 @@ More info is available in [issue #10](https://github.com/ggerganov/whisper.cpp/i
 \r
 https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a80f-28ba83be7d09.mp4\r
 \r
+## Slidingwindow mode\r
+\r
+Setting the `--step` argument to `0` enables the sliding window mode:\r
+\r
+```java\r
+ ./stream -m ./models/ggml-small.en.bin -t 6 --step 0 --length 30000 -vth 0.6\r
+```\r
+\r
+In this mode, the tool will transcribe only after some speech activity is detected. A very\r
+basic VAD detector is used, but in theory a more sophisticated approach can be added. The\r
+`-vth` argument determines the VAD threshold - higher values will make it detect silence more often.\r
+It's best to tune it to the specific use case, but a value around `0.6` should be OK in general.\r
+When silence is detected, it will transcribe the last `--length` milliseconds of audio and output\r
+a transcription block that is suitable for parsing.\r
+\r
+## Building\r
+\r
 The `stream` tool depends on SDL2 library to capture audio from the microphone. You can build it like this:\r
 \r
 ```bash\r