telegram-voice-transcribe
Transcribe Telegram voice messages and audio notes into text using the OpenAI Whisper API. Use when (1) a user sends a voice message or audio note via Telegram and you need to read or understand its content, (2) you receive a message with a voice file_id in the Telegram message metadata, (3) the user explicitly asks you to transcribe an audio file. Produces the transcript as plain text so you can respond naturally. Requires OPENAI_API_KEY env var and optionally TELEGRAM_BOT_TOKEN for file_id mode. NOT for live audio streams, video transcription, or non-Telegram audio pipelines (though the script supports local files and URLs too).
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- telegram-voice-transcribe
- description
- Transcribe Telegram voice messages and audio notes into text using the OpenAI Whisper API. Use when (1) a user sends a voice message or audio note via Telegram and you need to read or understand its content, (2) you receive a message with a voice file_id in the Telegram message metadata, (3) the user explicitly asks you to transcribe an audio file. Produces the transcript as plain text so you can respond naturally. Requires OPENAI_API_KEY env var and optionally TELEGRAM_BOT_TOKEN for file_id mode. NOT for live audio streams, video transcription, or non-Telegram audio pipelines (though the script supports local files and URLs too).
03 SKILL.md 正文
telegram-voice-transcribe
Transcribe Telegram voice notes into text via OpenAI Whisper (whisper-1).
Quick Workflow
- Detect a voice message: look for
voice.file_idoraudio.file_idin the inbound message metadata. - Run the transcription script:
python3 ~/openclaw/skills/telegram-voice-transcribe/scripts/transcribe.py \ --file-id <file_id> --language es - Read the JSON output —
transcriptfield contains the text. - Respond to the user based on the transcript content (treat it like typed text).
Script Modes
| Mode | Flag | When to use |
|---|---|---|
| Telegram file_id | --file-id <id> |
Standard case — voice message in Telegram |
| Local file | --file <path> |
Testing, or file already downloaded |
| URL | --url <https://...> |
Audio hosted externally |
Always pass --language es for Spanish speakers to improve speed and accuracy.
Output
{"transcript": "Hola, necesito que hagas un cambio en el juego", "language": "es", "duration_s": 4.2}
If error key is present, surface it to the user and check setup.
Environment Requirements
OPENAI_API_KEY— required (set viaopenclaw configure)TELEGRAM_BOT_TOKEN— required for--file-idmode
See references/setup.md for full setup, hooks integration, costs, and local Whisper alternative.
Error Handling
| Error | Fix |
|---|---|
OPENAI_API_KEY not set |
Configure key via openclaw configure --section env |
TELEGRAM_BOT_TOKEN required |
Add bot token to env |
openai package not installed |
pip install openai |
Telegram 400 Bad Request |
file_id expired — Telegram file_ids expire after ~48h |
| File too large | Whisper API limit is 25MB; split audio or use local Whisper |
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.