yasserrmd commited on
Commit
c5a6d28
·
verified ·
1 Parent(s): c3810e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ async def speech_to_text(file: UploadFile = File(...)):
48
  @app.post("/tts/")
49
  def text_to_speech(input_text: TextInput):
50
  """Convert text to a WAV audio file using ggwave and return as response."""
51
- encoded_waveform = ggwave.encode(instance, input_text.text.encode('utf-8'), protocolId=1, volume=100)
52
 
53
  # Convert byte data into float32 array
54
  waveform_float32 = np.frombuffer(encoded_waveform, dtype=np.float32)
 
48
  @app.post("/tts/")
49
  def text_to_speech(input_text: TextInput):
50
  """Convert text to a WAV audio file using ggwave and return as response."""
51
+ encoded_waveform = ggwave.encode(input_text.text, protocolId=1, volume=100)
52
 
53
  # Convert byte data into float32 array
54
  waveform_float32 = np.frombuffer(encoded_waveform, dtype=np.float32)