This project provides a robust audio transcription module using the Groq Cloud API and Whisper models. It includes comprehensive audio file validation, error handling, and flexible transcription options.
- Multiple Whisper model support
- Strict audio file validation
- Detailed error handling
- Command-line interface for easy transcription
- Python 3.8+
- Groq Cloud API Key
- Clone the repository
- Create a virtual environment
python3 -m venv venv
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Set up your Groq API Key
# Create a .env file in the project root
echo "GROQ_API_KEY=your_api_key_here" > .env
python transcribe.py /path/to/audio/file.mp3
from groq_transcriber import GroqTranscriber
transcriber = GroqTranscriber(model="whisper-large-v3")
result = transcriber.transcribe("audio.mp3")
print(result)
- MP3
- MP4
- MPEG
- M4A
- WAV
- WebM
- Maximum file size: 25 MB
- Minimum file length: 0.01 seconds
- Minimum billed length: 10 seconds
- Ensure your API key is valid
- Check audio file format and size
- Verify network connectivity
Pull requests are welcome. For major changes, please open an issue first to discuss proposed changes.