openrouter-transcribe
Transcribe audio files via OpenRouter using audio-capable models (Gemini, GPT-4o-audio, etc).
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- openrouter-transcribe
- homepage
- https://openrouter.ai/docs
- metadata
- { "clawdbot": { "emoji": "?️", "requires": { "env": [ "OPENROUTER_API_KEY" ], "bins": [ "curl", "ffmpeg", "base64", "jq" ] }, "primaryEnv": "OPENROUTER_API_KEY" } }
- description
- Transcribe audio files via OpenRouter using audio-capable models (Gemini, GPT-4o-audio, etc).
02 资源文件 2
- 参考文档_meta.json338 B
- 脚本scripts/transcribe.sh3.1 KB
03 SKILL.md 正文
OpenRouter Audio Transcription
Transcribe audio files using OpenRouter's chat completions API with input_audio content type. Works with any audio-capable model.
Quick start
{baseDir}/scripts/transcribe.sh /path/to/audio.m4a
Output goes to stdout.
Useful flags
# Custom model (default: google/gemini-2.5-flash)
{baseDir}/scripts/transcribe.sh audio.ogg --model openai/gpt-4o-audio-preview
# Custom instructions
{baseDir}/scripts/transcribe.sh audio.m4a --prompt "Transcribe with speaker labels"
# Save to file
{baseDir}/scripts/transcribe.sh audio.m4a --out /tmp/transcript.txt
# Custom caller identifier (for OpenRouter dashboard)
{baseDir}/scripts/transcribe.sh audio.m4a --title "MyApp"
How it works
- Converts audio to WAV (mono, 16kHz) using ffmpeg
- Base64 encodes the audio
- Sends to OpenRouter chat completions with
input_audiocontent - Extracts transcript from response
API key
Set OPENROUTER_API_KEY env var, or configure in ~/.clawdbot/clawdbot.json:
{
skills: {
"openrouter-transcribe": {
apiKey: "YOUR_OPENROUTER_KEY"
}
}
}
Headers
The script sends identification headers to OpenRouter:
X-Title: Caller name (default: "Peanut/Clawdbot")HTTP-Referer: Reference URL (default: "https://clawdbot.com")
These show up in your OpenRouter dashboard for tracking.
Troubleshooting
ffmpeg format errors: The script uses a temp directory (not mktemp -t file.wav) because macOS's mktemp adds random suffixes after the extension, breaking format detection.
Argument list too long: Large audio files produce huge base64 strings that exceed shell argument limits. The script writes to temp files (--rawfile for jq, @file for curl) instead of passing data as arguments.
Empty response: If you get "Empty response from API", the script will dump the raw response for debugging. Common causes:
- Invalid API key
- Model doesn't support audio input
- Audio file too large or corrupted
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.