Spaces:
Running
Running
Update apis/chat_api.py
Browse files- apis/chat_api.py +2 -1
apis/chat_api.py
CHANGED
@@ -109,7 +109,8 @@ class ChatAPIApp:
|
|
109 |
mp3_fp = BytesIO()
|
110 |
#audioobj.save(fileName)
|
111 |
audioobj.write_to_fp(mp3_fp)
|
112 |
-
|
|
|
113 |
item_response = {
|
114 |
"src": base64EncodedStr
|
115 |
}
|
|
|
109 |
mp3_fp = BytesIO()
|
110 |
#audioobj.save(fileName)
|
111 |
audioobj.write_to_fp(mp3_fp)
|
112 |
+
buffer = bytearray(mp3_fp.read())
|
113 |
+
base64EncodedStr = base64.encodebytes(buffer)
|
114 |
item_response = {
|
115 |
"src": base64EncodedStr
|
116 |
}
|