Upload folder using huggingface_hub
Browse files
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 |
|