Spaces:
sonalkum
/
Running on Zero

sonalkum commited on
Commit
fab8b65
1 Parent(s): 87bf417

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -65,10 +65,10 @@ AUDIO_LEN = 1.0
65
 
66
  def load_audio(filename):
67
  waveform, sr = torchaudio.load(filename)
 
68
  if sr != 16000:
69
  waveform = torchaudio.functional.resample(waveform=waveform, orig_freq=sr, new_freq=16000)
70
  sr = 16000
71
- audio_info = 'Original input audio length {:.2f} seconds, number of channels: {:d}, sampling rate: {:d}.'.format(waveform.shape[1]/sr, waveform.shape[0], sr)
72
  waveform = waveform - waveform.mean()
73
  fbank = torchaudio.compliance.kaldi.fbank(waveform, htk_compat=True, sample_frequency=sr,
74
  use_energy=False, window_type='hanning',
 
65
 
66
  def load_audio(filename):
67
  waveform, sr = torchaudio.load(filename)
68
+ audio_info = 'Original input audio length {:.2f} seconds, number of channels: {:d}, sampling rate: {:d}.'.format(waveform.shape[1]/sr, waveform.shape[0], sr)
69
  if sr != 16000:
70
  waveform = torchaudio.functional.resample(waveform=waveform, orig_freq=sr, new_freq=16000)
71
  sr = 16000
 
72
  waveform = waveform - waveform.mean()
73
  fbank = torchaudio.compliance.kaldi.fbank(waveform, htk_compat=True, sample_frequency=sr,
74
  use_energy=False, window_type='hanning',