flozi00 commited on
Commit
7b1bed4
·
1 Parent(s): 60ce8fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ def translate(src, tgt, text):
37
  def transcribe(audio):
38
  sampling_rate = 16000
39
  audio, sr = librosa.load(audio, sr=sampling_rate)
40
- speech_timestamps = get_speech_timestamps(audio, model, sampling_rate=sampling_rate)
41
  chunks = [audio[i["start"]:i["end"]] for i in speech_timestamps]
42
  transcribed = " ".join([text["text"] for text in p(chunks, chunk_length_s=20, stride_length_s=(0, 0))])
43
 
 
37
  def transcribe(audio):
38
  sampling_rate = 16000
39
  audio, sr = librosa.load(audio, sr=sampling_rate)
40
+ speech_timestamps = get_speech_timestamps(audio, vadmodel, sampling_rate=sampling_rate)
41
  chunks = [audio[i["start"]:i["end"]] for i in speech_timestamps]
42
  transcribed = " ".join([text["text"] for text in p(chunks, chunk_length_s=20, stride_length_s=(0, 0))])
43