truongghieu commited on
Commit
868bc89
1 Parent(s): a266d09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import numpy as np
5
 
6
  def recognize_speech(audio_data):
7
  # nontype to wav
8
- audio_data = sr.AudioData(np.array(audio_data) , sample_rate=16000, sample_width=2).get_wav_data()
9
 
10
  recognizer = sr.Recognizer()
11
  try:
 
5
 
6
  def recognize_speech(audio_data):
7
  # nontype to wav
8
+ audio_data = sr.AudioData(np.array(audio_data), 16000, 2)
9
 
10
  recognizer = sr.Recognizer()
11
  try: