Dubb_YouTube_Video / Download_Audio.py
Rehman1603's picture
Create Download_Audio.py
91e6e4f verified
raw
history blame
322 Bytes
from moviepy.editor import VideoFileClip
import pydub
def Downlaod_Audio(video_path):
videofileclip=VideoFileClip(video_path)
audio_file=videofileclip.audio
audio_file.write_audiofile("audio.mp3")
audio=pydub.AudioSegment.from_mp3("audio.mp3")
files=audio.export("audio.wav",format='wav')
return files.name