DrishtiSharma
commited on
Commit
•
156ffda
1
Parent(s):
9c1145c
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ new_line = '\n'
|
|
28 |
|
29 |
def predict_and_ctc_lm_decode(input_file):
|
30 |
speech = load_and_fix_data(input_file, sampling_rate)
|
31 |
-
transcribed_text = asr(speech, chunk_length_s=
|
32 |
transcribed_text = transcribed_text["text"]
|
33 |
input = tokenizer(transcribed_text, return_tensors="pt")
|
34 |
output = model.generate(input["input_ids"], max_length=40, num_beams=4, early_stopping=True)
|
|
|
28 |
|
29 |
def predict_and_ctc_lm_decode(input_file):
|
30 |
speech = load_and_fix_data(input_file, sampling_rate)
|
31 |
+
transcribed_text = asr(speech, chunk_length_s=10, stride_length_s=1)
|
32 |
transcribed_text = transcribed_text["text"]
|
33 |
input = tokenizer(transcribed_text, return_tensors="pt")
|
34 |
output = model.generate(input["input_ids"], max_length=40, num_beams=4, early_stopping=True)
|