lucio commited on
Commit
bb12448
1 Parent(s): f65a9c4
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -23,13 +23,8 @@ model_link = f"{storage_url}/{model_name}"
23
 
24
  def client(audio_data: np.array, sample_rate: int, use_scorer=False):
25
  output_audio = _convert_audio(audio_data, sample_rate)
26
-
27
- out_prob, score, index, text_lab = lang_classifier.classify_batch(
28
- lang_classifier.audio_normalizer(
29
- torchaudio.load(output_audio),
30
- sample_rate
31
- )
32
- )
33
 
34
  fin = wave.open(output_audio, 'rb')
35
  audio = np.frombuffer(fin.readframes(fin.getnframes()), np.int16)
 
23
 
24
  def client(audio_data: np.array, sample_rate: int, use_scorer=False):
25
  output_audio = _convert_audio(audio_data, sample_rate)
26
+ waveform, _ = torchaudio.load(output_audio)
27
+ out_prob, score, index, text_lab = lang_classifier.classify_batch(waveform)
 
 
 
 
 
28
 
29
  fin = wave.open(output_audio, 'rb')
30
  audio = np.frombuffer(fin.readframes(fin.getnframes()), np.int16)