csukuangfj commited on
Commit
da1064b
1 Parent(s): 6760200

fix a typo

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. model.py +1 -1
app.py CHANGED
@@ -162,7 +162,7 @@ def process(
162
  logging.info(info)
163
  logging.info(f"\nrepo_id: {repo_id}\nDetected language: {lang}")
164
 
165
- return text, build_html_output(info)
166
 
167
 
168
  title = "# Spoken Language Identification: [Next-gen Kaldi](https://github.com/k2-fsa) + [Whisper](https://github.com/openai/whisper/)"
 
162
  logging.info(info)
163
  logging.info(f"\nrepo_id: {repo_id}\nDetected language: {lang}")
164
 
165
+ return lang, build_html_output(info)
166
 
167
 
168
  title = "# Spoken Language Identification: [Next-gen Kaldi](https://github.com/k2-fsa) + [Whisper](https://github.com/openai/whisper/)"
model.py CHANGED
@@ -58,7 +58,7 @@ def decode(
58
  slid: sherpa_onnx.SpokenLanguageIdentification,
59
  filename: str,
60
  ) -> str:
61
- s = recognizer.create_stream()
62
  samples, sample_rate = read_wave(filename)
63
  s.accept_waveform(sample_rate, samples)
64
  lang = slid.compute(s)
 
58
  slid: sherpa_onnx.SpokenLanguageIdentification,
59
  filename: str,
60
  ) -> str:
61
+ s = slid.create_stream()
62
  samples, sample_rate = read_wave(filename)
63
  s.accept_waveform(sample_rate, samples)
64
  lang = slid.compute(s)