Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast Audio Processor for LLM Transcription

Simple, fast audio processing that chunks audio files and applies optional speed adjustments for efficient LLM transcription.

Features

  • Fast Processing - No complex smart detection, just efficient chunking
  • Auto Queue Management - Processes most recent file in pending/ folder
  • Multiple Audio Formats - Supports OGG, MP3, WAV, M4A, FLAC, AAC
  • Customizable Chunks - Set chunk duration (default: 17 minutes)
  • Speed Adjustment - Optional speed modification (default: 1.0x - no change for fastest processing)
  • Auto File Management - Moves completed files to completed/ folder
  • Optimized Output - 64kbps MP3, 16kHz mono for transcription efficiency

Directory Structure

audio-process/
├── fast_processor.py      # Main processing script
├── requirements.txt       # Python dependencies
├── README.md             # This file
└── files/
    ├── output/           # Processed chunks go here
    └── queue/
        ├── pending/      # Drop audio files here
        └── completed/    # Processed files moved here

Installation

Prerequisites

Install FFmpeg (required by pydub):

macOS:

brew install ffmpeg

Ubuntu/Debian:

sudo apt update && sudo apt install ffmpeg

Python Dependencies

pip install -r requirements.txt

Usage

Quick Start

  1. Drop your audio file in files/queue/pending/
  2. Run the processor:
    python3 fast_processor.py
  3. Find your chunks in files/output/[filename]/

Command Options

# Default: 17-minute chunks, no speed change (fastest)
python3 fast_processor.py

# Custom chunk duration (10 minutes)
python3 fast_processor.py -d 10

# Custom speed (1.5x faster)
python3 fast_processor.py -s 1.5

# No speed adjustment
python3 fast_processor.py -s 1.0

# Combine options
python3 fast_processor.py -d 15 -s 1.25

Command Line Options

  • -d, --duration: Chunk duration in minutes (default: 17)
  • -s, --speed: Speed multiplier (default: 1.05)
  • --base-path: Custom path to audio-process directory

Example Output

For a 1-hour recording named meeting.ogg:

🚀 FAST Audio Processor
📁 Pending: /path/to/pending
📁 Output: /path/to/output
⚡ Mode: FAST (no smart chunking)
🔍 Processing: meeting.ogg

🚀 FAST Processing: meeting.ogg
📊 Chunk duration: 17 minutes
⚡ Speed factor: 1.05x
📥 Loading audio file...
✅ Loaded successfully
⏱️  Duration: 60.0 minutes
🔪 Creating 4 fixed chunks

⚙️  Processing chunk 1/4...
   🏃‍♂️ Applying 1.05x speed (pitch preserved)...
   ✅ meeting_chunk_01.mp3 (16.2min, 2.3MB)

⚙️  Processing chunk 2/4...
   🏃‍♂️ Applying 1.05x speed (pitch preserved)...
   ✅ meeting_chunk_02.mp3 (16.2min, 2.3MB)

⚙️  Processing chunk 3/4...
   🏃‍♂️ Applying 1.05x speed (pitch preserved)...
   ✅ meeting_chunk_03.mp3 (16.2min, 2.3MB)

⚙️  Processing chunk 4/4...
   🏃‍♂️ Applying 1.05x speed (pitch preserved)...
   ✅ meeting_chunk_04.mp3 (9.5min, 1.4MB)

🎯 Complete! 4 chunks in /path/to/output/meeting
📦 Moved to completed: meeting.ogg

🎉 SUCCESS!
   📁 Output: /path/to/output/meeting
   📊 Chunks: 4
   📦 Completed: /path/to/completed/meeting.ogg

Output Files

Files are saved with the naming pattern:

  • filename_chunk_01.mp3
  • filename_chunk_02.mp3
  • filename_chunk_03.mp3
  • etc.

Each chunk is:

  • Sped up to your specified factor (default 1.05x) with pitch preserved
  • Optimized for transcription: 64kbps, 16kHz, mono
  • Small file size for efficient API uploads
  • Properly named with zero-padded numbers for correct ordering

Workflow

  1. Record your audio (any format: OGG, MP3, WAV, M4A, etc.)
  2. Drop in pending folder: files/queue/pending/
  3. Run processor: python3 fast_processor.py
  4. Upload chunks to your transcription service
  5. Original file automatically moves to completed/

Performance

  • Fast Processing: No complex analysis, just efficient chunking
  • Large Files: 1-hour audio processes in ~1-2 minutes
  • Small Output: Optimized for transcription APIs (file size limits)
  • Reliable: Simple, robust processing with good error handling

Transcription Tips

  • 17-minute chunks work well with most LLM transcription services
  • 1.05x speed saves time while maintaining natural pitch and accuracy
  • Use 1.0x speed for difficult audio (accents, technical terms)
  • Smaller chunks (10-15 min) for better error recovery
  • Files are optimized for OpenAI Whisper, Assembly AI, etc.

Troubleshooting

File won't load?

  • Check if FFmpeg is installed: ffmpeg -version
  • File might be corrupted - try a different file

Processing too slow?

  • Use smaller chunks: -d 10
  • Skip speed adjustment: -s 1.0

Need different output quality?

  • Edit the export parameters in fast_processor.py

About

Fast audio processor for LLM transcription workflows. Chunks audio files into optimized segments for AI transcription services.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages