jaekookang commited on
Commit
9f79e93
1 Parent(s): b4ac259

add resample

Browse files
Files changed (2) hide show
  1. gradio_asr_en_libri100.py +3 -3
  2. requirements.txt +1 -0
gradio_asr_en_libri100.py CHANGED
@@ -13,7 +13,7 @@ import os
13
  from glob import glob
14
  from loguru import logger
15
  import soundfile as sf
16
- # import librosa
17
  # from scipy.io import wavfile
18
  import gradio as gr
19
 
@@ -53,8 +53,8 @@ logger.info('model loaded')
53
 
54
  def predict(wav_file):
55
  logger.info('wav file loaded')
56
- speech, rate = sf.read(wav_file)
57
- # speech, rate = librosa.load(wav_file, sr=16000)
58
  # rate, speech = wavfile.read(wav_file)
59
  nbests = model(speech)
60
  text, *_ = nbests[0]
 
13
  from glob import glob
14
  from loguru import logger
15
  import soundfile as sf
16
+ import librosa
17
  # from scipy.io import wavfile
18
  import gradio as gr
19
 
 
53
 
54
  def predict(wav_file):
55
  logger.info('wav file loaded')
56
+ # speech, rate = sf.read(wav_file)
57
+ speech, rate = librosa.load(wav_file, sr=16000)
58
  # rate, speech = wavfile.read(wav_file)
59
  nbests = model(speech)
60
  text, *_ = nbests[0]
requirements.txt CHANGED
@@ -2,4 +2,5 @@ espnet==0.10.6
2
  espnet_model_zoo==0.1.7
3
  gradio==2.7.5.2
4
  loguru==0.6.0
 
5
  soundfile
 
2
  espnet_model_zoo==0.1.7
3
  gradio==2.7.5.2
4
  loguru==0.6.0
5
+ librosa
6
  soundfile