https://github.com/nc1z/audio-extraction-tool
Simple Python script to extract audio from videos
https://github.com/nc1z/audio-extraction-tool
audio-extractor
Last synced: 4 months ago
JSON representation
Simple Python script to extract audio from videos
- Host: GitHub
- URL: https://github.com/nc1z/audio-extraction-tool
- Owner: nc1z
- Created: 2023-07-22T06:43:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-22T07:39:47.000Z (about 3 years ago)
- Last Synced: 2023-07-22T08:26:50.317Z (about 3 years ago)
- Topics: audio-extractor
- Language: Python
- Homepage:
- Size: 1.87 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Audio Extraction Tool
Simple Python script to extract audio from videos
## Getting started
1. Make sure you have Python and Git installed on your computer
2. Clone the repository and navigate into the project root
```bash
$ git clone https://github.com/nc1z/audio-extraction-tool.git
$ cd audio-extraction-tool/
```
2. Run the command
```bash
$ pip install moviepy
```
3. Place your mp4 videos into `./input`
4. Run the command
```bash
$ python main.py
```
5. The extracted audio files will be found in `./output`
## Audio sampling
You might want to split the extracted audio into multiple parts for sampling purposes (e.g. training AI voice models or like Tortoise-tts)
1. Set `num_parts` in `split-audio-sampling.py` to your desired number of samples
2. Run the command
```bash
$ python split-audio-sampling.py
```
## Clean up
You might want remove the `output_samples/` directory after you are done saving the sample audio files. Simply run the command:
```bash
$ python split-audio-sampling.py
```