Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henrymaas/AudioSlicer
Audio Slicer that uses silence detection to split .wav audio files into multiple .wav samples.
https://github.com/henrymaas/AudioSlicer
Last synced: 7 days ago
JSON representation
Audio Slicer that uses silence detection to split .wav audio files into multiple .wav samples.
- Host: GitHub
- URL: https://github.com/henrymaas/AudioSlicer
- Owner: henrymaas
- Created: 2018-07-17T16:59:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-08T07:03:47.000Z (6 months ago)
- Last Synced: 2024-08-01T15:33:27.952Z (3 months ago)
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 283
- Watchers: 2
- Forks: 58
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
AudioSlicer
A simple Audio Slicer in Python that can split `.wav` audio files into multiple `.wav` samples, based on silence detection. Also, it dumps a `.json` file that contains the periods of time in which the slice occours, in the following format:
```json
{
"0": ["0:0:0", "0:0:3"],
"1": ["0:0:3", "0:0:10"],
"2": ["0:10:0", "0:0:22"],
"3": ["0:0:22", "0:0:32"]
}
```
The file names will also contains the parts when the video were sliced, ex.: `sample01_0349_0401.wav`Attribution
I gratefully acknowledge the original code's contribution from `/andrewphillipdoss`
AI Adaptation
This project will turn into a neural network which can detect audio silence and split the files.
It will also needs to learn to detect 'breathing noises' from the dictator and remove from it.Requirements:
+ Python 3.11.0
+ numpy - 1.24.1
+ scypi - 1.10.0
+ tqdm - 4.64.1Usage
1. Edit `AudioSeg.py` and change the input_file (full path to your original .wav file) and output_dir (folder path to the destination of the audio splits).
2. Run python -m AudioSeg.py> [!NOTE]
> Please note that in order for your audio file to be cut into samples, it should contain periods of "silence". If you are trying to extract voice samples from a song, for example, it may not work as expected.
>Depending on the level of noise in your audio, the algorithm may skip the silence windows, resulting in missed cuts. Ensure that your audio is free from unwanted noise and that the silences are clearly defined. You can adjust the parameters of >>
min_silence_length, silence_threshold, and step_duration to modify the length, amplitude, and duration of the silence window in order to better match your audio