shukdevdatta123 commited on
Commit
a861aa1
·
verified ·
1 Parent(s): 4b612ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -56,7 +56,8 @@ def generate_audio(text, lang_code, voice, speed):
56
  audio_data = audio
57
  # Save audio to in-memory buffer
58
  buffer = io.BytesIO()
59
- sf.write(buffer, audio_data, 24000)
 
60
  buffer.seek(0)
61
  return buffer
62
 
 
56
  audio_data = audio
57
  # Save audio to in-memory buffer
58
  buffer = io.BytesIO()
59
+ # Explicitly specify format as WAV
60
+ sf.write(buffer, audio_data, 24000, format='WAV') # Add 'format="WAV"'
61
  buffer.seek(0)
62
  return buffer
63