nareauow commited on
Commit
a3c53b0
·
verified ·
1 Parent(s): 7b6df09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -129,6 +129,9 @@ def recognize_speech(audio_path):
129
 
130
  try:
131
  audio_data, sr = sf.read(audio_path)
 
 
 
132
 
133
  if sr != 16000:
134
  audio_data = np.interp(
 
129
 
130
  try:
131
  audio_data, sr = sf.read(audio_path)
132
+
133
+ if len(audio_data.shape) > 1:
134
+ audio_data = np.mean(audio, axis=1)
135
 
136
  if sr != 16000:
137
  audio_data = np.interp(