Skip to main content

Audio Extract

Testing commit

A powerful, easy-to-use batch audio extraction tool wrapping FFmpeg. Extract specific segments of multiple audio files in one go, either via a graphical user interface (GUI) or a command line interface (CLI).


Features

  • Batch Processing: Extract excerpts from all audio files (e.g., MP3, WAV) in a directory simultaneously.
  • Dual Interfaces: Use the intuitive Graphical User Interface (GUI) or the automation-friendly Command Line Interface (CLI).
  • Flexible Configuration: Define settings once in a parameters.yaml file, or override them dynamically in the CLI.
  • Fade Effects: Apply smooth fade-out/fade-in transitions to extracted clips.
  • FFmpeg Integration: Auto-detects FFmpeg on your system PATH or allows specifying a custom path.

Prerequisites


Installation

From Releases (Pre-built Wheel/Executable)

Download the latest wheels or standalone executable from Releases.


Usage

🖥️ Graphical Interface (GUI) - On Linux or Mac OS

The GUI allows you to select directories, adjust start/end times, toggle fade effects, and run extractions visually.

  1. Launch the GUI by running:
    audio_extract_gui
    
  2. Choose the input folder, set your extraction duration, and click Process.

🖥️ Graphical Interface (GUI) - On Windows

  1. Download and run the standalone audio_extract.exe directly from the Releases page.
  2. Choose the input folder, set your extraction duration, and click Process.

💻 Command Line Interface (CLI)

To run the CLI, navigate to your desired directory and execute:

audio_extract

By default, the CLI will look for a parameters.yaml file in the current directory to read configuration parameters.

Configuration File (parameters.yaml)

Create a parameters.yaml file in your working directory to customize the default run behavior:

input_dir: "input"
output_dir: "output"
first_second: 0
last_second: 120
input_file_extension: ["mp3", "wav"]

YAML Configuration Parameters

Parameter Description Default Value
input_dir The directory containing the audio files to process. Current directory
output_dir The directory where the extracted audio clips will be saved. ./output/
first_second The start time (in seconds) for the audio extraction. 0
last_second The end time (in seconds) for the audio extraction. 60
input_file_extension A list of file extensions to be considered for processing. ["mp3", "wav"]
path_ffmpeg (optional) The path to the FFmpeg directory/binary if it is not in your system's PATH. Auto-detect
debug (optional) Enables debug mode for verbose logging. False

Command-Line Arguments

All parameters from parameters.yaml can be overridden using arguments:

Argument Description YAML Parameter
-i, --input Input directory containing audio files input_dir
-o, --output Output directory for extracted clips output_dir
-s, --start Starting second for the audio excerpt first_second
-e, --end Ending second for the audio excerpt last_second
-f, --fade Fade duration in seconds (0 for no fade) fade_d
-d, --debug Enable debug mode debug

To view the CLI help menu, run:

audio_extract --help

Examples

  • Extract the first 30 seconds of all files from my_audio and save to my_extracts:

    audio_extract --input my_audio --output my_extracts --start 0 --end 30
    
  • Extract from second 60 to 120 with a 3-second fade duration:

    audio_extract --start 60 --end 120 --fade 3
    
  • Run in debug mode with a custom input directory:

    audio_extract --debug --input /path/to/your/audio
    

Build from Source

For development instructions and packaging details, please refer to build.md.

Metadata

Release files for batch-audio-extract 0.7.2

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

Source distribution (sdist)

Source distribution for batch-audio-extract 0.7.2
File Size Uploaded
batch_audio_extract-0.7.2.tar.gz 271.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for batch-audio-extract 0.7.2
File Interpreter ABI Platform
batch_audio_extract-0.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 283.0 kB

Release files / batch_audio_extract-0.7.2.tar.gz

Download URL batch_audio_extract-0.7.2.tar.gz
Size 271.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d878c667765c7ac2d9081613472d70c505f2dcab7177787ab895ff8140217239
BLAKE2b-256 checksum
How to use checksums
9a530fde7527ff3b354c07a63949c9081ed2cd846bbd6655dd725567b5d9ad6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / batch_audio_extract-0.7.2-py3-none-any.whl

Download URL batch_audio_extract-0.7.2-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bed1eb24d9dada2dc9f8fbf71b94cb2035f1442453a451641c858920f2a1b99
BLAKE2b-256 checksum
How to use checksums
154754673430ad712c7760ba5745fafa8add56d346c58b03988c91e8baf17451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.2 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.1

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