transcribe
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTranscribe
转录
Speech-to-text using Groq Whisper API.
使用Groq Whisper API实现语音转文字。
Setup
配置
The script needs environment variable. Check if already set:
GROQ_API_KEYbash
echo $GROQ_API_KEYIf not set, guide the user through setup:
- Ask if they have a Groq API key
- If not, have them sign up at https://console.groq.com/ and create an API key
- Have them add to their shell profile (~/.zshrc or ~/.bashrc):
bash
export GROQ_API_KEY="<their-api-key>" - Then run (or restart terminal)
source ~/.zshrc
脚本需要设置环境变量。检查是否已设置:
GROQ_API_KEYbash
echo $GROQ_API_KEY如果未设置,引导用户完成配置:
- 询问用户是否拥有Groq API密钥
- 如果没有,让他们在https://console.groq.com/注册并创建API密钥
- 让他们将以下内容添加到shell配置文件(
/.zshrc或/.bashrc)中:bashexport GROQ_API_KEY="<their-api-key>" - 然后运行(或重启终端)
source ~/.zshrc
Usage
使用方法
bash
{baseDir}/transcribe.sh <audio-file>bash
{baseDir}/transcribe.sh <音频文件>Supported Formats
支持的格式
- m4a, mp3, wav, ogg, flac, webm
- Max file size: 25MB
- m4a、mp3、wav、ogg、flac、webm
- 最大文件大小:25MB
Output
输出
Returns plain text transcription with punctuation and proper capitalization to stdout.
将带有标点和正确大小写的纯文字转录结果输出到标准输出。