Podiarize (podcast + diarize) is a Python script that for extracting and stitching together the main speaker's segments from audio files, particularly useful for podcasts.
Podiarize uses speaker diarization (provided by pyannote) to identify different speakers in an audio file, then extracts and combines the segments of the primary speaker(s). This can be useful for:
- Condensing podcasts to focus on the main content
- Removing advertisements or less relevant sections
This is not a finished project, it may work for you as-is, but some podcasts may not work properly with default settings
- Speaker diarization using pyannote.audio
- Dynamic threshold calculation for speaker inclusion
- Support for various input audio formats
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt- Agree to the terms for pyannote
- Put a valid huggingface token in hftoken.txt (or change
modify_podcast.pyto use your token) - Make sure you have
ffmpegandffprobein your path.
python modify_podcast.py some_audio_file.mp3
This will output to output_some_audio_file.mp3.
The license in the LICENSE.md file applies only to the code in this repository. Be sure to review the license for pyannote and relevant models