Introduction
Introduction Statistics Contact Development Disclaimer Help
Add audio2txt script. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit d556f615209046531915075d96b0251be009988b
parent 240e1b3a6f61cdf1f0f96bc17d7a70c1b4f2a270
Author: Annna Robert-Houdin <[email protected]>
Date: Thu, 31 Jul 2025 19:53:03 +0200
Add audio2txt script.
Diffstat:
A audio2txt | 40 +++++++++++++++++++++++++++++…
1 file changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/audio2txt b/audio2txt
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -x
+
+export PATH="$HOME/bin:$PATH"
+
+function local_whisper() {
+ WHISPER_CPP=/br/ai/whisper.cpp
+ ffmpeg -nostdin \
+ -threads 0 \
+ -i - \
+ -f wav \
+ -ac 1 \
+ -acodec pcm_s16le \
+ -ar 16000 - 2>/dev/null \
+ | "$WHISPER_CPP/build/bin/whisper-cli" \
+ --model "$WHISPER_CPP/models/ggml-large-v3.bin" \
+ -np -otxt -nt \
+ -f -
+}
+
+function remote_whisper() {
+ WHISPER_CPP=/home/annna/scm/whisper.cpp
+ ffmpeg -nostdin \
+ -threads 0 \
+ -i - \
+ -f wav \
+ -ac 1 \
+ -acodec pcm_s16le \
+ -ar 16000 - 2>/dev/null \
+ | ollama-gpu \
+ "$WHISPER_CPP/build/bin/whisper-cli" \
+ --model "$WHISPER_CPP/models/ggml-large-v3.bin" \
+ -np -otxt -nt \
+ -f -
+}
+
+remote_whisper
+[ $? -gt 0 ] && local_whisper
+
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.