使用 Groq Whisper API(whisper-large-v3)转录音频文件,快速云端语音识别,无需本地模型,适用于接收语音消息。
Cloud speech-to-text via Groq's Whisper API. No local model, no GPU, no fan spin.
Get a free API key at console.groq.com
Store it: bash
mkdir -p ~/.config/groq
echo '{"api_key":"gsk_your_key_here"}' > ~/.config/groq/credentials.json
chmod 600 ~/.config/groq/credentials.json
Or set GROQ_API_KEY env var.
bash
# Transcribe an audio file
{baseDir}/scripts/transcribe.sh /path/to/audio.ogg
# Specify language (default: en)
{baseDir}/scripts/transcribe.sh /path/to/audio.ogg es
Call this script whenever you receive an audio/voice message attachment. Pass the file path directly — Groq handles ogg, mp3, wav, m4a, webm, and flac natively. No format conversion needed.
curl, jq, Groq API key