Spaces:
Runtime error
Runtime error
SajjadAyoubi
commited on
Commit
•
0c76638
1
Parent(s):
b0a27ca
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from pyctcdecode import build_ctcdecoder
|
|
8 |
class Speech2Text:
|
9 |
def __init__(self):
|
10 |
self.vocab = list(processor.tokenizer.get_vocab().keys())
|
11 |
-
self.decoder = build_ctcdecoder(self.vocab, kenlm_model_path=
|
12 |
|
13 |
def wav2feature(self, path):
|
14 |
speech_array, sampling_rate = torchaudio.load(path)
|
@@ -41,4 +41,4 @@ gr.Interface(asr,
|
|
41 |
outputs = gr.outputs.Textbox(label="Output Text"),
|
42 |
title="Persian ASR using Wav2Vec 2.0",
|
43 |
description = "This application displays transcribed text for given audio input",
|
44 |
-
examples = [["
|
|
|
8 |
class Speech2Text:
|
9 |
def __init__(self):
|
10 |
self.vocab = list(processor.tokenizer.get_vocab().keys())
|
11 |
+
self.decoder = build_ctcdecoder(self.vocab, kenlm_model_path='kenlm.scorer')
|
12 |
|
13 |
def wav2feature(self, path):
|
14 |
speech_array, sampling_rate = torchaudio.load(path)
|
|
|
41 |
outputs = gr.outputs.Textbox(label="Output Text"),
|
42 |
title="Persian ASR using Wav2Vec 2.0",
|
43 |
description = "This application displays transcribed text for given audio input",
|
44 |
+
examples = [["example.wav"]], theme="huggingface").launch()
|