Omnibus commited on
Commit
a9f1358
1 Parent(s): 7442481

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,9 +45,9 @@ def load_video_yt(vid):
45
  return vid, vid_aud
46
 
47
  def trim_clip(clip):
48
- clip = "tmp_aud.mp3"
49
  # Open an mp3 file
50
- song = AudioSegment.from_file("tmp_aud.mp3",
51
  format="mp3")
52
 
53
  # start and end time
@@ -98,7 +98,7 @@ with gr.Blocks() as app:
98
 
99
  go_btn.click(run_bark,[in_text, speaker_num, speaker_lang],out_audio)
100
  load_yt_btn.click(load_video_yt, in_aud_yt, [yt_vid,in_aud_file])
101
- trim_clip_btn.click(trim_clip,yt_vid,trim_aud)
102
  #alt_go_btn.click()
103
 
104
  app.launch()
 
45
  return vid, vid_aud
46
 
47
  def trim_clip(clip):
48
+ #clip = "tmp_aud.mp3"
49
  # Open an mp3 file
50
+ song = AudioSegment.from_file(f'{clip}',
51
  format="mp3")
52
 
53
  # start and end time
 
98
 
99
  go_btn.click(run_bark,[in_text, speaker_num, speaker_lang],out_audio)
100
  load_yt_btn.click(load_video_yt, in_aud_yt, [yt_vid,in_aud_file])
101
+ trim_clip_btn.click(trim_clip,in_aud_file,trim_aud)
102
  #alt_go_btn.click()
103
 
104
  app.launch()