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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,10 +1,9 @@
1
  import streamlit as st
2
  import time
3
  from transformers import pipeline
4
-
5
  from pytube import YouTube
6
  from pydub import AudioSegment
7
-
8
  from audio_extract import extract_audio
9
  import google.generativeai as google_genai
10
  import os
@@ -35,8 +34,14 @@ def youtube_video_downloader(url):
35
  return vid_dld, title
36
 
37
 
38
- def audio_extraction(video_file, output_format):
39
  audio = extract_audio(input_path=os.fspath(video_file), output_path=f"{video_file}.mp3")
 
 
 
 
 
 
40
  return audio
41
 
42
 
 
1
  import streamlit as st
2
  import time
3
  from transformers import pipeline
4
+ import ffmpeg
5
  from pytube import YouTube
6
  from pydub import AudioSegment
 
7
  from audio_extract import extract_audio
8
  import google.generativeai as google_genai
9
  import os
 
34
  return vid_dld, title
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