CLI toolkit for converting text to audio.
Project description
SonicSlicer 🎵✂️
A powerful, well-optimized Python toolkit for splitting and trimming audio files with precision and ease.
Features
- Smart Audio Splitting: Split audio files by time duration or file size
- Precision Trimming: Trim audio from start/end or specific time ranges
- Multi-format Support: Works with WAV, MP3, OGG, FLAC, and AIFF formats
- Optimized Processing: Efficient memory usage and fast processing
- Flexible Output: Customizable output format and bitrate settings
- Automatic Naming: Sequential output filenames with proper numbering
Installation
-
Install dependencies:
pip install pydub
-
Install SonicSlicer:
pip install sonicslicer
Or clone the repository:
git clone https://github.com/skye-cyber/SonicSlicer.git cd sonicslicer
Usage Examples
Splitting Audio Files
By Size:
- Split into 1mb chunks
slicer file.mp3 --split --size 1mb
- Split into 100kb chunks, discard small last chunk
slicer file.mp3 --split --size 100kb --strict -O splits
- Single split 5 minutes chunks
slicer file.mp3 --split --duration 1min
By File Time:
- Single split 5 minutes chunks
slicer file.mp3 --split --duration 5min --format ogg
- Split into 10 seconds chunks, keep smaller last chunk
slicer file.mp3 --split --duration 10sec --strict -O splits
Trimming Audio Files
- Trims from 0 to end
slicer file.mp3 --trim
- Discards the first 10 seconds
slicer fime.mp3 --trim --trim_start 10sec
- Discards the last 1 minutes
slicer fime.mp3 --trim --trim_end 1min
- Discards the first 10 and last seconds respectively
slicer fime.mp3 --trim --trim_start 10sec --trim_end 30sec
Constructor
SonicSlicer(output_format="wav", bitrate="192k")
output_format: Output audio format (wav, mp3, ogg, flac, aiff)bitrate: Bitrate for compressed formats
Performance Tips
- Use WAV for processing: Process in WAV format then convert to compressed formats
- Batch processing: Process multiple files in sequence
- Memory management: For very large files, consider smaller chunk sizes
- Output directory: Use SSDs for faster write speeds when processing large files
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
See the LICENSE file for more details. See the LICENSE file for details.
Support
If you have any questions or issues:
- Check the documentation
- Search existing issues
- Create a new issue with detailed information
Changelog
See CHANGELOG.md for version history and changes.
SonicSlicer - Making audio processing as easy as slicing pie! 🥧
Project details
Release history Release notifications | RSS feed
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 sonicslicer-1.0.0.tar.gz.
File metadata
- Download URL: sonicslicer-1.0.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
932efcd10cc839984899c71b484ae3dafc7b90f9597e8d3ffc6e878588ea9a69
|
|
| MD5 |
08dd33385249afa10aa58a925f005033
|
|
| BLAKE2b-256 |
566a6d99eb007f40817bfc4a197b1110482f4c3e97e96a9a511a0ae4c1d71b66
|
File details
Details for the file sonicslicer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sonicslicer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5ecbc67f7179ffa6a049e39cf1ee71ff39436ec608ce0fe180461186331a1f0
|
|
| MD5 |
50f58194567343afe84fcc5e03204970
|
|
| BLAKE2b-256 |
e22090621f9ef51186126f2f0234d3f147a80bf5bd55931b4b62c144659450f3
|