Audio Extract
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.yamlfile, 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
- FFmpeg: Must be installed on your system.
- Download link: https://www.ffmpeg.org/
- Python: Version 3.7 or newer.
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.
- Launch the GUI by running:
audio_extract_gui
- Choose the input folder, set your extraction duration, and click Process.
🖥️ Graphical Interface (GUI) - On Windows
- Download and run the standalone
audio_extract.exedirectly from the Releases page. - 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_audioand save tomy_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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file batch_audio_extract-0.7.0.tar.gz.
File metadata
- Download URL: batch_audio_extract-0.7.0.tar.gz
- Upload date:
- Size: 290.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18f52cf6857cf6ba10670428dbe0101b3d08d6c398295af5f26a93d5c4c22ba3
|
|
| MD5 |
67471210fab6611b6071868344bcb362
|
|
| BLAKE2b-256 |
9835641c48c6fc74c2f38441f971482063a2a318b36bb4e15723a683f2f7b87b
|
Provenance
The following attestation bundles were made for batch_audio_extract-0.7.0.tar.gz:
Publisher:
release.yml on makiwara-fr/audio_extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
batch_audio_extract-0.7.0.tar.gz -
Subject digest:
18f52cf6857cf6ba10670428dbe0101b3d08d6c398295af5f26a93d5c4c22ba3 - Sigstore transparency entry: 2145680043
- Sigstore integration time:
-
Permalink:
makiwara-fr/audio_extract@7e6022ded3d63e3cd00f8d0dd513578467c7bae1 -
Branch / Tag:
refs/tags/v0.7 - Owner: https://github.com/makiwara-fr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e6022ded3d63e3cd00f8d0dd513578467c7bae1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file batch_audio_extract-0.7.0-py3-none-any.whl.
File metadata
- Download URL: batch_audio_extract-0.7.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce7d33ed54e275f17b79174a7bd1f3630170cdbabd4ff15b70f3c806df09c1e6
|
|
| MD5 |
59f99c11b95938c6566010cfcc0d0bb3
|
|
| BLAKE2b-256 |
3d40606785f8e4181264be0265fa9d2d7cad8e42f77a8a19eef5b08f85647f68
|
Provenance
The following attestation bundles were made for batch_audio_extract-0.7.0-py3-none-any.whl:
Publisher:
release.yml on makiwara-fr/audio_extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
batch_audio_extract-0.7.0-py3-none-any.whl -
Subject digest:
ce7d33ed54e275f17b79174a7bd1f3630170cdbabd4ff15b70f3c806df09c1e6 - Sigstore transparency entry: 2145680072
- Sigstore integration time:
-
Permalink:
makiwara-fr/audio_extract@7e6022ded3d63e3cd00f8d0dd513578467c7bae1 -
Branch / Tag:
refs/tags/v0.7 - Owner: https://github.com/makiwara-fr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e6022ded3d63e3cd00f8d0dd513578467c7bae1 -
Trigger Event:
release
-
Statement type: