tensorkelechi commited on
Commit
b798128
·
verified ·
1 Parent(s): 72f25c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -35,14 +35,14 @@ def youtube_video_downloader(url):
35
 
36
 
37
  def audio_extraction(video_file):
38
- audio = extract_audio(input_path=os.fspath(video_file), output_path=f"{video_file}.mp3")
39
- # input_file = ffmpeg.input(video_file)
40
-
41
- # Extract the audio and save it as an MP3 file
42
- # mp3_path = 'audio.mp3'
43
- # audio_extracted = input_file.output(mp3_path, acodec='mp3').run()
44
- # return mp3_path
45
- return audio
46
 
47
 
48
  def audio_processing(mp3_audio):
 
35
 
36
 
37
  def audio_extraction(video_file):
38
+ # audio = extract_audio(input_path=os.fspath(video_file), output_path=f"{video_file}.mp3")
39
+ input_file = ffmpeg.input(video_file)
40
+
41
+ Extract the audio and save it as an MP3 file
42
+ mp3_path = 'audio.mp3'
43
+ audio_extracted = input_file.output(mp3_path, acodec='mp3').run()
44
+ return mp3_path
45
+ # return audio
46
 
47
 
48
  def audio_processing(mp3_audio):