juancopi81 commited on
Commit
871dc23
1 Parent(s): 7e62c39

Add start second in miliseconds

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -45,7 +45,7 @@ def get_audio(url, start_second):
45
  wav_to_cut = AudioSegment.from_file(a)
46
  # pydub does things in milliseconds
47
  ten_seconds = 10 * 1000
48
- print("Start second", start_second)
49
  first_10_seconds = wav_to_cut[start_second:start_second+ten_seconds]
50
  os.remove(new_file)
51
  first_10_seconds.export("final_audio.wav", format="wav")
 
45
  wav_to_cut = AudioSegment.from_file(a)
46
  # pydub does things in milliseconds
47
  ten_seconds = 10 * 1000
48
+ start_second = start_second * 1000
49
  first_10_seconds = wav_to_cut[start_second:start_second+ten_seconds]
50
  os.remove(new_file)
51
  first_10_seconds.export("final_audio.wav", format="wav")