https://github.com/franckferman/audio_splitter
A tool to split audio files into segments using FFmpeg.
https://github.com/franckferman/audio_splitter
audio audio-processing audio-split audio-splitter ffmpeg ffmpeg-python ffmpeg-script ffmpeg-wrapper python python-3 python-ffmpeg python-script python-wrapper python-wrappings python3 split-audio wrapper-python
Last synced: 5 months ago
JSON representation
A tool to split audio files into segments using FFmpeg.
- Host: GitHub
- URL: https://github.com/franckferman/audio_splitter
- Owner: franckferman
- License: agpl-3.0
- Created: 2024-11-09T02:33:46.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T03:09:56.000Z (8 months ago)
- Last Synced: 2025-01-17T21:03:25.948Z (5 months ago)
- Topics: audio, audio-processing, audio-split, audio-splitter, ffmpeg, ffmpeg-python, ffmpeg-script, ffmpeg-wrapper, python, python-3, python-ffmpeg, python-script, python-wrapper, python-wrappings, python3, split-audio, wrapper-python
- Language: Python
- Homepage: https://github.com/franckferman/audio_splitter
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Audio Splitter
**Audio Splitter** is a tool for splitting audio files into fixed-length segments using FFmpeg. It is designed to be easy to use from the command line with customizable options.
## Features
- Splits audio files into fixed-duration segments.
- Uses `ffmpeg` for fast and precise splitting.
- Cleans up temporary files generated during execution (e.g., `.pyc` files, `__pycache__` folders, etc.).## Installation
### With Poetry
```bash
poetry install
```### With pip
For a standard installation with pip:
```bash
pip install -r requirements.txt
```### Usage
#### Splitting audio files
```bash
poetry run audio-splitter split "path/to/audio_file.mp3" "path/to/output_folder" --duration 300
```- **split**: Main command to split audio files.
- **input_file**: Path to the audio file to split.
- **output_folder**: Folder to save the split segments.
- **--duration**: Duration in seconds for each segment (optional, default: 600 seconds).#### Cleaning temporary files
To clean temporary files in the specified directory:
```bash
poetry run audio-splitter clean --directory .
```- **clean**: Removes temporary files (e.g., .pyc files, __pycache__ folders, etc.) in the specified directory (default is the current directory).
### Example Usage
```bash
# Split an audio file into 10-minute segments
poetry run audio-splitter split "./audio/example.mp3" "./output" --duration 600# Clean temporary files in the current directory
poetry run audio-splitter clean --directory .
```## Development
### Setting up the Environment
To contribute to the project, make sure to install the development dependencies:
```bash
poetry install --with dev
```Linting & Formatting
The project uses black, flake8, and mypy to maintain code quality.
- **Formatting**: `black .`
- **Static analysis**: `flake8 .`
- **Type checking**: `mypy .`## License
This project is licensed under the MIT License. See the LICENSE file for more details.