← ClaudeAtlas

voice-transcribelisted

Transcribe voice messages and audio files using ffmpeg and OpenAI Whisper. Use whenever a Telegram voice message arrives (attachment_kind="voice", audio/ogg), when the user sends an audio file, asks to transcribe audio, or when you receive any .oga/.ogg/.mp3/.m4a/.wav file containing speech. Automatically triggers on inbound Telegram voice messages.
0xAddict/threadwork · ★ 0 · AI & Automation · score 70
Install: claude install-skill 0xAddict/threadwork
# voice-transcribe Transcribe voice messages and audio files using ffmpeg for format conversion and OpenAI Whisper for speech-to-text. Automatically triggers on inbound Telegram voice messages so the agent can understand and respond to spoken content. ## When this triggers - A Telegram message arrives with `attachment_kind="voice"` and `attachment_mime="audio/ogg"` - The user sends any audio file and wants it transcribed - You need to understand the content of a voice message to respond - Any `.oga`/`.ogg`/`.mp3`/`.m4a`/`.wav` file containing speech arrives ## Pipeline ### Step 1: Download the audio For Telegram voice messages, use the `download_attachment` tool with the `attachment_file_id` from the inbound message metadata: ``` download_attachment(file_id=<attachment_file_id>) ``` Returns a local file path (typically `.oga` format). ### Step 2: Convert to WAV with ffmpeg Whisper works best with 16kHz mono WAV: ```bash ffmpeg -i <input_file> -ar 16000 -ac 1 /tmp/voice_<message_id>.wav -y ``` - `-ar 16000` — resample to 16kHz (Whisper's expected sample rate) - `-ac 1` — convert to mono - `-y` — overwrite without prompting ffmpeg is installed at `~/.local/bin/ffmpeg`. ### Step 3: Transcribe with Whisper ```bash python3 -c " import whisper model = whisper.load_model('base') result = model.transcribe('/tmp/voice_<message_id>.wav') print(result['text']) " ``` - Uses the `base` model — good balance of speed and accuracy - Runs on CPU (FP16 warning is expected and h