Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
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 |
|