chibop commited on
Commit
6a7f438
·
verified ·
1 Parent(s): 8f85585

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. chat.py +1 -0
chat.py CHANGED
@@ -62,6 +62,7 @@ def speak(history):
62
  text = history[-1][1]
63
  speech = client.audio.speech.create(model="tts-1", voice="alloy", input=text)
64
  data, sr = sf.read(BytesIO(speech.read()))
 
65
  print(sr, data.shape)
66
  return data, sr
67
 
 
62
  text = history[-1][1]
63
  speech = client.audio.speech.create(model="tts-1", voice="alloy", input=text)
64
  data, sr = sf.read(BytesIO(speech.read()))
65
+ data= data.reshape((-1, 1))
66
  print(sr, data.shape)
67
  return data, sr
68