truongghieu commited on
Commit
29a3355
1 Parent(s): adfbf42

Try to convert autio file

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import speech_recognition as sr
2
  import gradio as gr
3
  def recognize_speech(audio_data):
 
4
  recognizer = sr.Recognizer()
5
 
6
  try:
 
1
  import speech_recognition as sr
2
  import gradio as gr
3
  def recognize_speech(audio_data):
4
+ audio_data = sr.AudioData(audio_data, sample_rate=16000)
5
  recognizer = sr.Recognizer()
6
 
7
  try: