Pydub is a Python audio manipulation library and digital audio processor used for editing, slicing, and converting audio files and segments. It serves as a programmatic wrapper for FFmpeg to import and export a wide variety of audio formats.
The library functions as an audio signal generator capable of creating synthetic waveforms, such as sine waves and white noise. It also provides tools for digital signal processing, including the application of filters, fades, crossfades, and gain adjustments to sound signals.
Its broader capabilities cover programmatic audio editing through concatenation and mixing, automated audio analysis for metadata extraction and silence detection, and sample format conversion. The toolkit also supports frequency filtering, DC offset removal, and the generation of silent segments for spacing.
The library can route processed audio segments to system speakers using external playback drivers.