Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PodcastSplitter: Text-Based Multitrack Audio Editor

PodcastSplitter is a local, privacy-first Python command-line tool that allows you to perform "paper edits" on multitrack audio recordings. By generating a transcript and allowing you to edit the text directly, this tool orchestrates a highly optimized FFmpeg complex filtergraph to slice, normalize, and crossfade your multitrack audio seamlessly.

Key Features

  • Text-Based Editing: Transcribes audio to a text file. Delete a sentence or a filler word in the text, and the audio is automatically cut.
  • Multitrack Phase Alignment: Uses FFmpeg's atrim and asetpts to synchronously slice all tracks simultaneously, ensuring dialogue remains perfectly phase-aligned.
  • Dynamic Crossfading: Automatically calculates and applies 10ms crossfades (acrossfade) to every cut to prevent audio popping or clicking.
  • Per-Track Normalization: Individually levels out the volume of each speaker to broadcast standards (loudnorm) before mixing.
  • Preserves Multitrack Output: The final render exports as an uncompressed, polyphonic multi-channel WAV file so you can still EQ and mix individual speakers in your DAW later.
  • Privacy-First: Uses faster-whisper for local transcription. No audio is ever uploaded to the cloud.

Prerequisites

  1. Python 3.8+
  2. FFmpeg: Must be installed and added to your system PATH.
    • Windows users can install this easily via Winget:
      winget install Gyan.FFmpeg.Essentials -e --accept-package-agreements --accept-source-agreements
  3. Nvidia GPU (Optional but Recommended): For significantly faster transcription times.

Installation

  1. Clone this repository:
    git clone https://github.com/yourusername/PodcastSplitter.git
    cd PodcastSplitter
  2. Install the required Python packages:
    pip install -r requirements.txt

Workflow

The tool operates in a two-step workflow: Transcribe and Render.

1. Transcribe

Run the transcription engine on your multitrack WAV file. This will isolate the channels, transcribe them, and generate an editable script.

python text_audio_editor.py transcribe input_multitrack.wav

This generates two files:

  • script.txt: The text file you will edit.
  • reference.json: A hidden reference file containing the exact word-level timestamps.

2. Edit

Open script.txt in any text editor.

  • Delete text: Simply delete any {um}, {uh}, or full sentences you want removed.
  • Re-order: You can move paragraphs around chronologically.
  • Do NOT add new words: Because this tool maps text back to recorded timestamps, typing new words that weren't spoken will not generate audio.
  • Do NOT change Track labels: Keep the [ID:XXXX] and Track X: labels intact.

3. Render

Once you've saved your edits in script.txt, render the final audio.

python text_audio_editor.py render input_multitrack.wav script.txt

The script will parse your edits, generate a highly optimized filtergraph.txt, and execute FFmpeg to output your final edited multitrack WAV file (final_edit.wav).

How It Works (Under the Hood)

Instead of relying on heavy Python audio libraries like Pydub (which load uncompressed audio directly into RAM and quickly cause memory exhaustion), this tool acts as a headless Non-Linear Editor (NLE).

It uses Python's difflib to map your text edits back to word-level timestamps, intelligently merges overlapping "keep" windows, and writes a direct FFmpeg complex filtergraph script. This pushes all the heavy lifting to highly optimized C-libraries, keeping memory consumption near zero regardless of the podcast length.

About

Edit multitrack podcasts like a Word document. A headless, zero-memory NLE that uses Whisper to turn text deletions into perfectly synced, normalized audio cuts.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages