Omnibus commited on
Commit
7442481
·
1 Parent(s): 13f46b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -47,7 +47,7 @@ def load_video_yt(vid):
47
  def trim_clip(clip):
48
  clip = "tmp_aud.mp3"
49
  # Open an mp3 file
50
- song = AudioSegment.from_file(clip,
51
  format="mp3")
52
 
53
  # start and end time
@@ -57,9 +57,10 @@ def trim_clip(clip):
57
  end_sec = 55
58
 
59
  # pydub does things in milliseconds, so convert time
60
- start = ((start_min*60)+start_sec)*1000
61
- end = ((end_min*60)+end_sec)*1000
62
-
 
63
  # song clip of 10 seconds from starting
64
  first_10_seconds = song[start: end]
65
 
 
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
 
57
  end_sec = 55
58
 
59
  # pydub does things in milliseconds, so convert time
60
+ #start = ((start_min*60)+start_sec)*1000
61
+ #end = ((end_min*60)+end_sec)*1000
62
+ start = 0
63
+ end = 15*1000
64
  # song clip of 10 seconds from starting
65
  first_10_seconds = song[start: end]
66