audio2txt - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- audio2txt (702B) --- 1 #!/bin/sh 2 3 export PATH="$HOME/bin:$PATH" 4 5 function local_whisper() { 6 WHISPER_CPP=/br/ai/whisper.cpp 7 ffmpeg -nostdin \ 8 -threads 0 \ 9 -i - \ 10 -f wav \ 11 -ac 1 \ 12 -acodec pcm_s16le \ 13 -ar 16000 - 2>/dev/null \ 14 | "$WHISPER_CPP/build/bin/whisper-cli" \ 15 --model "$WHISPER_CPP/models/ggml-large-v3.bin" \ 16 -np -otxt -nt \ 17 -f - 18 } 19 20 function remote_whisper() { 21 WHISPER_CPP=/home/annna/scm/whisper.cpp 22 ffmpeg -nostdin \ 23 -threads 0 \ 24 -i - \ 25 -f wav \ 26 -ac 1 \ 27 -acodec pcm_s16le \ 28 -ar 16000 - 2>/dev/null \ 29 | ollama-gpu \ 30 "$WHISPER_CPP/build/bin/whisper-cli" \ 31 --model "$WHISPER_CPP/models/ggml-large-v3.bin" \ 32 -np -otxt -nt \ 33 -f - 34 } 35 36 remote_whisper 37 [ $? -gt 0 ] && local_whisper 38