amir22010 commited on
Commit
95067e0
·
verified ·
1 Parent(s): 257d7aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -47,7 +47,7 @@ llm = Llama.from_pretrained(
47
  def text_to_speech(text):
48
  with tempfile.NamedTemporaryFile(delete=False, suffix='.wav') as temp_file:
49
  with locker:
50
- audio_data, sample_rate = tts.synthesize(text, "92")
51
  audio_data_int16 = (audio_data * 32767).astype(np.int16)
52
  output_file = temp_file.name
53
  wavfile.write(output_file, sample_rate, audio_data_int16)
 
47
  def text_to_speech(text):
48
  with tempfile.NamedTemporaryFile(delete=False, suffix='.wav') as temp_file:
49
  with locker:
50
+ audio_data, sample_rate, *_ = tts.synthesize(text, "92")
51
  audio_data_int16 = (audio_data * 32767).astype(np.int16)
52
  output_file = temp_file.name
53
  wavfile.write(output_file, sample_rate, audio_data_int16)