Skip to content

AbdullahAdeebx/whisper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whisper

a cli tool i made for myself.

one simple way to transcribe audio from terminal.

all in native python. no subscription. blazingly fast. free. enjoy.

img

Features

  • Supports Many Formats: Works with popular audio (MP3, WAV, M4A) and video (MP4, AVI, MOV) files.
  • Automatic Audio Extraction: Extracts audio from video files on the fly using ffmpeg.
  • Different Output Options: Save transcriptions in formats like TXT, JSON, SRT, VTT, and TSV.

Installation

Prerequisites

  • Python 3.x
  • FFmpeg (for video file support)
pip install aa-whisper

Install FFmpeg

FFmpeg is required if you want to transcribe video files.

Linux:

sudo apt install ffmpeg

macOS:

brew install ffmpeg

Windows (PowerShell):

winget install FFmpeg

Configuration

Set your Groq API key as an environment variable.

Linux:

echo 'export GROQ_API_KEY="your_groq_api_key_here"' >> ~/.bashrc && source ~/.bashrc

macOS:

echo 'export GROQ_API_KEY="your_groq_api_key_here"' >> ~/.zshrc && source ~/.zshrc

Windows:

[System.Environment]::SetEnvironmentVariable("GROQ_API_KEY", "your_groq_api_key_here", "User")

Usage

whisper audio_or_video_file [options]

Options

  • --model: Whisper model to use (default: whisper-large-v3-turbo)
  • --language: Language code (optional)
  • --task: 'transcribe' or 'translate' (default: transcribe)
  • --output-dir: Output directory (default: audio_filename_transcription)
  • --response-format: 'verbose_json', 'json', 'text', 'srt', 'vtt' (default: verbose_json)
  • --version: Show version info

Examples

Transcribe audio:

whisper recording.mp3

Transcribe video:

whisper lecture.mp4

Translate to English:

whisper interview.mp3 --task translate

Multiple files at once:

whisper file1.mp3 file2.wav video1.mp4

Output Files

Each transcription will generate:

  • transcript.txt: Plain text
  • transcript.json: JSON metadata
  • transcript.srt: SubRip subtitles
  • transcript.vtt: WebVTT format
  • transcript.tsv: Timestamps and text

License

MIT

Acknowledgements

Releases

No releases published

Packages

No packages published

Languages