From 5c1df55989a4dd7c7a9d2d459bdfde8c55d744c9 Mon Sep 17 00:00:00 2001 From: slaesh <55546823+slaesh@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:27:19 +0200 Subject: [PATCH] Update script.sh somehow this missing "-" makes a huge difference.. :) --- examples/live-audio/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/live-audio/script.sh b/examples/live-audio/script.sh index 484ac3d0..242f1120 100644 --- a/examples/live-audio/script.sh +++ b/examples/live-audio/script.sh @@ -14,6 +14,6 @@ docker run --detach --gpus=all --publish 8000:8000 --volume ~/.cache/huggingface # or you can run it on a CPU # docker run --detach --publish 8000:8000 --volume ~/.cache/huggingface:/root/.cache/huggingface --env WHISPER__MODEL=$WHISPER__MODEL fedirz/faster-whisper-server:latest-cpu -# `pv` is used to limit the rate at which the audio is streamed to the server. Audio is being streamed at a rate of 32kb/s(16000 sample rate * 16-bit sample / 8 bits per byte = 32000 bytes per second). This emulutes live audio input from a microphone: `ffmpeg -loglevel quiet -f alsa -i default -ac 1 -ar 16000 -f s16le` +# `pv` is used to limit the rate at which the audio is streamed to the server. Audio is being streamed at a rate of 32kb/s(16000 sample rate * 16-bit sample / 8 bits per byte = 32000 bytes per second). This emulutes live audio input from a microphone: `ffmpeg -loglevel quiet -f alsa -i default -ac 1 -ar 16000 -f s16le -` # shellcheck disable=SC2002 cat audio.pcm | pv -qL 32000 | websocat --no-close --binary 'ws://localhost:8000/v1/audio/transcriptions?language=en'