freddyaboulton HF staff commited on
Commit
b6d7cbe
1 Parent(s): c34843b
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -89,7 +89,7 @@ def response(audio: tuple[int, np.ndarray], conversation: list[dict], img: str |
89
  audio_data = frame.split(b'\r\n\r\n', 1)[1]
90
  # audio_data = base64.b64decode(audio_data)
91
  output_audio_bytes += audio_data
92
- audio_array = np.frombuffer(audio_data, dtype=np.int8).reshape(1, -1)
93
  yield (OUT_RATE, audio_array, "mono")
94
  elif b'Content-Type: text/plain' in frame:
95
  text_data = frame.split(b'\r\n\r\n', 1)[1].decode()
 
89
  audio_data = frame.split(b'\r\n\r\n', 1)[1]
90
  # audio_data = base64.b64decode(audio_data)
91
  output_audio_bytes += audio_data
92
+ audio_array = np.frombuffer(audio_data, dtype=np.int16).reshape(1, -1)
93
  yield (OUT_RATE, audio_array, "mono")
94
  elif b'Content-Type: text/plain' in frame:
95
  text_data = frame.split(b'\r\n\r\n', 1)[1].decode()