Upload folder using huggingface_hub
Browse files
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=
|
66 |
print(sr, data.shape)
|
67 |
-
return
|
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:
|