Omnibus commited on
Commit
1cb3525
1 Parent(s): 641c224

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -42,15 +42,15 @@ def run_bark(text, n, lang):
42
  def load_video_yt(vid):
43
  yt = YouTube(vid)
44
  vid = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename="tmp.mp4")
45
- vid_aud = yt.streams.filter(only_audio=True)[0].download(filename="tmp_aud.wav")
46
- return vid, vid_aud, "tmp_aud.wav"
47
 
48
  def trim_clip(clip):
49
- clip = Path("tmp_aud.wav")
50
  #clip = "tmp_aud.mp3"
51
  # Open an mp3 file
52
- song = AudioSegment.from_file("tmp_aud.wav",
53
- format="wav")
54
 
55
  # start and end time
56
  start_min = 0
 
42
  def load_video_yt(vid):
43
  yt = YouTube(vid)
44
  vid = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename="tmp.mp4")
45
+ vid_aud = yt.streams.filter(only_audio=True)[0].download(filename="tmp_aud.mp4")
46
+ return vid, vid_aud, "tmp_aud.mp4"
47
 
48
  def trim_clip(clip):
49
+ clip = Path("tmp_aud.mp4")
50
  #clip = "tmp_aud.mp3"
51
  # Open an mp3 file
52
+ song = AudioSegment.from_file("tmp_aud.mp4",
53
+ format="mp4")
54
 
55
  # start and end time
56
  start_min = 0