Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
b7af941
1
Parent(s):
c64ca36
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def text_normalizer(text):
|
|
32 |
return text.translate(str.maketrans('', '', string.punctuation))
|
33 |
|
34 |
def inference(audio):
|
35 |
-
speech, rate = librosa.load(audio, sr=16000)
|
36 |
assert rate == fs, "mismatch in sampling rate"
|
37 |
nbests = speech2text(speech)
|
38 |
text, *_ = nbests[0]
|
|
|
32 |
return text.translate(str.maketrans('', '', string.punctuation))
|
33 |
|
34 |
def inference(audio):
|
35 |
+
speech, rate = librosa.load(audio.name, sr=16000)
|
36 |
assert rate == fs, "mismatch in sampling rate"
|
37 |
nbests = speech2text(speech)
|
38 |
text, *_ = nbests[0]
|