Skip to main content

Audio Text

CLI tool to transcribe YouTube videos to text, designed for IELTS listening practice.

Features

  • Transcribe YouTube videos to text with timestamps
  • Uses OpenAI Whisper for accurate speech-to-text
  • Automatic audio chunking for long videos (up to 30 minutes)
  • Interactive menu or direct CLI commands
  • Export transcripts to TXT or JSON
  • Local caching to avoid re-processing

Installation

Using Homebrew (macOS)

brew tap anhtt2211/tap
brew install audio-text-cli

Using pip

pip install audio-text-cli

Prerequisites

  • Python 3.10+
  • ffmpeg (required for audio processing)
# macOS
brew install ffmpeg

# Ubuntu/Debian
sudo apt install ffmpeg

Usage

Interactive Mode

Simply run without arguments to get an interactive menu:

audio-text
╭──────────────────────────────────────────────────────────────────────────────╮
│  ╔═╗┬ ┬┌┬┐┬┌─┐  ╔╦╗┌─┐─┐ ┬┌┬┐                                                │
│  ╠═╣│ │ ││││ │   ║ ├┤ ┌┴┬┘ │                                                 │
│  ╩ ╩└─┘─┴┘┴└─┘   ╩ └─┘┴ └─ ┴                                                 │
│                                                                              │
│ YouTube Video Transcription for IELTS Practice                               │
╰──────────────────────────────────────────────────────────────────────────────╯

  [1]    Transcribe a YouTube video
  [2]    List saved transcripts
  [3]    View a transcript
  [4]    Export transcript to file
  [5]    Delete a transcript
  [q]    Quit

Direct Commands

# Transcribe a video
audio-text transcribe https://youtube.com/watch?v=VIDEO_ID

# Transcribe with custom output directory
audio-text transcribe https://youtu.be/VIDEO_ID --output ./my-transcripts

# List saved transcripts
audio-text list

# View a transcript
audio-text view VIDEO_ID

# Export transcript (auto-generates filename from title)
audio-text export VIDEO_ID

# Export with custom filename
audio-text export VIDEO_ID ./output.txt --format txt

# Delete a transcript
audio-text delete VIDEO_ID

Output Example

╭────────────────────────────── Transcript Info ───────────────────────────────╮
│    Title: Example Video Title                                                │
│      URL: https://www.youtube.com/watch?v=VIDEO_ID                           │
│ Duration: 5m 30s                                                             │
│ Segments: 45                                                                 │
│    Model: small                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

[00:00 -> 00:05] Hello and welcome to this video.
[00:05 -> 00:12] Today we're going to discuss...

Configuration

Transcripts are saved to ~/.audio-text/transcripts/ by default.

Use --output or -o to specify a custom directory.

Limitations

  • Maximum video duration: 30 minutes
  • English language only
  • YouTube videos only (for now)

Development

# Clone the repository
git clone https://github.com/anhtt2211/audio-text.git
cd audio-text

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
ruff check src/

License

MIT License - see LICENSE for details.

Author

Anh Tran (@anhtt2211)

Metadata

Release files for audio-text-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audio-text-cli 0.1.0
File Size Uploaded
audio_text_cli-0.1.0.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for audio-text-cli 0.1.0
File Interpreter ABI Platform
audio_text_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.9 kB

Release files / audio_text_cli-0.1.0.tar.gz

Download URL audio_text_cli-0.1.0.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3427c4e58b4722047a2a4c4ad18acfcd9b8e38ca9a3e2dc726e518ee890563b2
BLAKE2b-256 checksum
How to use checksums
3a15f1791039383d598598d9d58480e20f2ba69bdf8c4c296278ad5e2205e280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / audio_text_cli-0.1.0-py3-none-any.whl

Download URL audio_text_cli-0.1.0-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fdffb1b7c9a9b03b1544ed3b58d77c9fecaffcc4b4901e3adefae45bb929ac1
BLAKE2b-256 checksum
How to use checksums
0921b3ea52d005740cd5dc45b7a9a50968269a62b7ebdad8b01abc0a71c702cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page