Simple Python script to extract audio from videos
-
Make sure you have Python and Git installed on your computer
-
Clone the repository and navigate into the project root
$ git clone https://github.com/nc1z/audio-extraction-tool.git $ cd audio-extraction-tool/
-
Run the command
$ pip install moviepy
-
Place your mp4 videos into
./input
-
Run the command
$ python main.py
-
The extracted audio files will be found in
./output
You might want to split the extracted audio into multiple parts for sampling purposes (e.g. training AI voice models or like Tortoise-tts)
-
Set
num_parts
insplit-audio-sampling.py
to your desired number of samples -
Run the command
$ python split-audio-sampling.py
You might want remove the output_samples/
directory after you are done saving the sample audio files. Simply run the command:
$ python split-audio-sampling.py