MAKHLWF commited on
Commit
8b390e1
·
1 Parent(s): b7387a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ def text_to_speech(text):
10
  mp3_data = io.BytesIO()
11
  speech.save(mp3_data)
12
  mp3_data.seek(0)
13
- return mp3_data.read()
14
  except Exception as e:
15
  return str(e)
16
  else:
 
10
  mp3_data = io.BytesIO()
11
  speech.save(mp3_data)
12
  mp3_data.seek(0)
13
+ return mp3_data.getvalue() # Use getvalue() instead of read()
14
  except Exception as e:
15
  return str(e)
16
  else: