chibop commited on
Commit
b7ec722
·
verified ·
1 Parent(s): b7f1796

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. chat.py +2 -2
chat.py CHANGED
@@ -62,9 +62,9 @@ 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
- data= data.reshape((-1, 1))
66
  print(sr, data.shape)
67
- return 44100, data
68
 
69
  def vote(data: gr.LikeData):
70
  if data.liked:
 
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= np.stack((data, data), axis=1)
66
  print(sr, data.shape)
67
+ return sr, data
68
 
69
  def vote(data: gr.LikeData):
70
  if data.liked: