unijoh commited on
Commit
e0949dd
1 Parent(s): 9d3870d

Update tts.py

Browse files
Files changed (1) hide show
  1. tts.py +1 -1
tts.py CHANGED
@@ -31,8 +31,8 @@ def synthesize_speech(text):
31
 
32
  # Decode the generated speech and save to an audio file
33
  waveform = speech.cpu().numpy().flatten()
34
- # Convert waveform to audio format that Gradio can handle
35
  sf.write("output.wav", waveform, 16000)
 
36
  return "output.wav"
37
  except Exception as e:
38
  logging.error(f"Error during speech synthesis: {e}")
 
31
 
32
  # Decode the generated speech and save to an audio file
33
  waveform = speech.cpu().numpy().flatten()
 
34
  sf.write("output.wav", waveform, 16000)
35
+ logging.info("Audio file saved successfully.")
36
  return "output.wav"
37
  except Exception as e:
38
  logging.error(f"Error during speech synthesis: {e}")