Yurii Paniv commited on
Commit
9430ecf
1 Parent(s): 1f211a9

Rollback DeepSpeech to v0.4

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -10,12 +10,12 @@ from stt import Model
10
 
11
 
12
  MODEL_NAMES = [
13
- # "With scorer",
14
  "No scorer"
15
  ]
16
 
17
  # download model
18
- version = "v0.5"
19
  storage_url = f"https://github.com/robinhad/voice-recognition-ua/releases/download/{version}"
20
  model_name = "uk.tflite"
21
  scorer_name = "kenlm.scorer"
@@ -73,8 +73,8 @@ def _convert_audio(audio_data: np.array, sample_rate: int):
73
  sample_width=2,
74
  frame_rate=sample_rate
75
  )
76
- wav_file.set_frame_rate(16000).set_channels(
77
- 1).export(output_audio, "wav", codec="pcm_s16le")
78
  output_audio.seek(0)
79
  return output_audio
80
 
@@ -98,5 +98,5 @@ iface = gr.Interface(
98
  )
99
 
100
  download(model_link, model_name)
101
- #download(scorer_link, scorer_name)
102
  iface.launch()
 
10
 
11
 
12
  MODEL_NAMES = [
13
+ "With scorer",
14
  "No scorer"
15
  ]
16
 
17
  # download model
18
+ version = "v0.4"
19
  storage_url = f"https://github.com/robinhad/voice-recognition-ua/releases/download/{version}"
20
  model_name = "uk.tflite"
21
  scorer_name = "kenlm.scorer"
 
73
  sample_width=2,
74
  frame_rate=sample_rate
75
  )
76
+ wav_file = wav_file.set_frame_rate(16000).set_channels(1)
77
+ wav_file.export(output_audio, "wav", codec="pcm_s16le")
78
  output_audio.seek(0)
79
  return output_audio
80
 
 
98
  )
99
 
100
  download(model_link, model_name)
101
+ download(scorer_link, scorer_name)
102
  iface.launch()