diff --git a/scripts/extract_audio_from_video/README.md b/scripts/extract_audio_from_video/README.md new file mode 100644 index 0000000..350a6e9 --- /dev/null +++ b/scripts/extract_audio_from_video/README.md @@ -0,0 +1,7 @@ +# extract audio from video + +## Usage + +- Clone the repo +- download the requirements +- run `python video_to_audio.py` diff --git a/scripts/extract_audio_from_video/video_to_audio.py b/scripts/extract_audio_from_video/video_to_audio.py new file mode 100644 index 0000000..223dca7 --- /dev/null +++ b/scripts/extract_audio_from_video/video_to_audio.py @@ -0,0 +1,8 @@ +import moviepy.editor + +path_video = input("Enter the path of video: ") +video = moviepy.editor.VideoFileClip(path_video) + +audio = video.audio +path_audio = input("Enter the path of audio:") +audio.write_audiofile(path_audio)