Skip to main content

A simple pip template by Abdullah Adeeb

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aa_whisper-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_whisper-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file aa_whisper-0.1.0.tar.gz.

File metadata

  • Download URL: aa_whisper-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aa_whisper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5f29c7a278e484a6260c7194c01b94681443c212d490ec4f310da3158c1ef79
MD5 ba57fb995788658974bff8aab45b6327
BLAKE2b-256 8cca88f3d5b05c03e911c1890e9eab404c123dea3f1c88b1b5915158d123daa1

See more details on using hashes here.

File details

Details for the file aa_whisper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aa_whisper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aa_whisper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a8f702f29be4318d38dae1c235d88ebce9ca7be1ea100ec6fd321cde9fc1089
MD5 98b109fd48e5573c2bb93ee8193b7d2c
BLAKE2b-256 b14711c8b12477e19f89335e1fdae10870734d18708539b2e67a86df4a549911

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page