Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|