jaekookang commited on
Commit
b002b3d
1 Parent(s): 4e11af0

updated to wavio

Browse files
gradio_asr_en_libri100_word_vs_bpe.py CHANGED
@@ -9,8 +9,7 @@ from difflib import Differ
9
  from glob import glob
10
  from loguru import logger
11
  # import librosa
12
- from scipy.io import wavfile
13
- import scipy.signal as sps
14
  import gradio as gr
15
 
16
  from espnet2.bin.asr_inference import Speech2Text
@@ -46,7 +45,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, 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
 
 
9
  from glob import glob
10
  from loguru import logger
11
  # import librosa
12
+ import wavio
 
13
  import gradio as gr
14
 
15
  from espnet2.bin.asr_inference import Speech2Text
 
45
  logger.info('wav file loaded')
46
  # Load audio
47
  # speech, rate = librosa.load(wav_file, sr=16000)
48
+ wav = wavio.read(wav_file)
49
+ speech = wav.data
50
+ rate = wav.rate
51
+
52
  # number_of_samples = round(len(speech_raw) * float(16000) / rate)
53
  # speech = sps.resample(speech_raw, number_of_samples)
54