Spaces:
Sleeping
Sleeping
File size: 252 Bytes
438c749 | 1 2 3 4 5 6 7 8 9 | from moviepy import VideoFileClip
def extract_audio(video_path, output_path='output/audio.wav'):
with VideoFileClip(video_path) as video:
video.audio.write_audiofile(output_path)
if __name__ == '__main__':
extract_audio('sample.mp4')
|