Rehman1603 commited on
Commit
91e6e4f
1 Parent(s): 3b1ac0c

Create Download_Audio.py

Browse files
Files changed (1) hide show
  1. Download_Audio.py +12 -0
Download_Audio.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from moviepy.editor import VideoFileClip
2
+ import pydub
3
+
4
+ def Downlaod_Audio(video_path):
5
+ videofileclip=VideoFileClip(video_path)
6
+ audio_file=videofileclip.audio
7
+ audio_file.write_audiofile("audio.mp3")
8
+ audio=pydub.AudioSegment.from_mp3("audio.mp3")
9
+ files=audio.export("audio.wav",format='wav')
10
+ return files.name
11
+
12
+