Spaces:
Runtime error
Runtime error
jaekookang
commited on
Commit
•
4e11af0
1
Parent(s):
5058a94
removed resampling
Browse files
gradio_asr_en_libri100_word_vs_bpe.py
CHANGED
@@ -46,10 +46,10 @@ def predict(wav_file):
|
|
46 |
logger.info('wav file loaded')
|
47 |
# Load audio
|
48 |
# speech, rate = librosa.load(wav_file, sr=16000)
|
49 |
-
rate,
|
50 |
-
number_of_samples = round(len(speech_raw) * float(16000) / rate)
|
51 |
-
speech = sps.resample(speech_raw, number_of_samples)
|
52 |
-
|
53 |
# Run inference
|
54 |
W = model_word(speech)[0]
|
55 |
B = model_bpe(speech)[0]
|
|
|
46 |
logger.info('wav file loaded')
|
47 |
# Load audio
|
48 |
# speech, rate = librosa.load(wav_file, sr=16000)
|
49 |
+
rate, speech = wavfile.read(wav_file)
|
50 |
+
# number_of_samples = round(len(speech_raw) * float(16000) / rate)
|
51 |
+
# speech = sps.resample(speech_raw, number_of_samples)
|
52 |
+
|
53 |
# Run inference
|
54 |
W = model_word(speech)[0]
|
55 |
B = model_bpe(speech)[0]
|