radinhas commited on
Commit
34fe433
·
1 Parent(s): 61eea1a

Update apis/chat_api.py

Browse files
Files changed (1) hide show
  1. 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
- base64EncodedStr = base64.b64encode(mp3_fp.read())
 
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
  }