Groq Whisper Transcribe
This script transcribes audio files using the Whisper model via the Groq API
Usage costs can be found at: https://console.groq.com/docs/model/whisper-large-v3
Usage
Install the Requirements
To install the necessary requirements, run the following command:
pip install groq-whisper-transcribe
FFmpeg
This tool requires FFmpeg for audio processing.
- macOS / Windows — FFmpeg is bundled automatically via the
static-ffmpegpackage. No extra installation needed. - Linux — Install FFmpeg using your system package manager:
# Debian / Ubuntu sudo apt install ffmpeg # Fedora sudo dnf install ffmpeg # Arch sudo pacman -S ffmpeg
On Linux, you can also
pip install static-ffmpegif you prefer not to use the system package.
Typical Usage
# Transcribe to SRT (English)
groq-whisper-transcribe audio.mp3
# Transcribe Spanish audio
groq-whisper-transcribe audio.aac -l es
# French audio to VTT
groq-whisper-transcribe audio.wav -f vtt -l fr
# Both SRT and VTT
groq-whisper-transcribe audio.wav -f srt vtt
# All three formats
groq-whisper-transcribe audio.wav -f srt vtt txt
# Plain text only
groq-whisper-transcribe audio.wav -f txt
# Custom output path
groq-whisper-transcribe audio.m4a -o result.srt
# Use turbo model
groq-whisper-transcribe audio.mp3 -m whisper-large-v3-turbo
# Set API key interactively
groq-whisper-transcribe --set-key
# Set API key via pipe
echo "gsk_..." | groq-whisper-transcribe --set-key
Arguments
| Argument | Description | |
|---|---|---|
| input | Input audio file path | |
| -o | --output | Output file path (default: input with new extension). Ignored when multiple formats are requested |
| -f | --format | Output format(s): srt, vtt, txt (default: srt). Multiple formats can be specified |
| -l | --language | Language code, e.g. en, es, fr, de, ja (default: en) |
| -m | --model | Whisper model name (default: whisper-large-v3) |
| --set-key | Set the GROQ_API_KEY in ~/.groq (accepts piped input or prompts interactively) |
API Key
An API Key is required to use this script, and usage incurs a cost. This tool utilizes Groq because of its high speed and low cost. However, if you have the necessary hardware, it is recommended to use the official Whisper version, which is free
The easiest way to set up your API key is using the built-in command:
# Interactive prompt (key input is hidden)
groq-whisper-transcribe --set-key
# Or pipe the key directly
echo "gsk_..." | groq-whisper-transcribe --set-key
This saves the key to ~/.groq. You can also set it manually by creating the file or using the GROQ_API_KEY environment variable.
The file path for ~/.groq varies by platform:
- Linux —
/home/<user>/.groq - macOS —
/Users/<user>/.groq - Windows —
C:\Users\<user>\.groq
The file content should look like:
GROQ_API_KEY=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
Metadata
Release files for groq-whisper-transcribe 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| groq_whisper_transcribe-1.0.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| groq_whisper_transcribe-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 kB
Release files / groq_whisper_transcribe-1.0.tar.gz
| Download URL | groq_whisper_transcribe-1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd9bb5e548224d672a3640e3c3011128d4c7ecd51792080cf853d0d0607fc472
|
|
BLAKE2b-256 checksum How to use checksums |
373dad11f8a45713fe205360a6375118c650aff6776c187a7dd216f2306c9163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / groq_whisper_transcribe-1.0-py3-none-any.whl
| Download URL | groq_whisper_transcribe-1.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7674edc4216604a8e627daa20283cb245d0b04e4a089828080b344b82aa2a1f1
|
|
BLAKE2b-256 checksum How to use checksums |
6a8eb1d7eae9b2e5df3f044ba3f3cd9266a1a6c6042ce69f0192bf8c8e25a17f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|