Spaces:
Sleeping
Sleeping
Commit
·
9400998
1
Parent(s):
ae3c63e
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,7 @@ def tts_fn(text, prompt_audio, prompt_seconds, inference_steps, inference_temper
|
|
12 |
texts = [text]
|
13 |
sr = prompt_audio[0]
|
14 |
prompt_audio = np.reshape(prompt_audio[1], (1, -1)).astype(np.float32, order='C') / 32768.0
|
15 |
-
|
16 |
-
byte_io = io.BytesIO(audio_bytes)
|
17 |
wavfile.write(byte_io, sr, prompt_audio)
|
18 |
prompt_audio_bytes = byte_io.read()
|
19 |
prompt_audio = [base64.b64encode(prompt_audio_bytes).decode('utf-8')]
|
|
|
12 |
texts = [text]
|
13 |
sr = prompt_audio[0]
|
14 |
prompt_audio = np.reshape(prompt_audio[1], (1, -1)).astype(np.float32, order='C') / 32768.0
|
15 |
+
byte_io = io.BytesIO(bytes())
|
|
|
16 |
wavfile.write(byte_io, sr, prompt_audio)
|
17 |
prompt_audio_bytes = byte_io.read()
|
18 |
prompt_audio = [base64.b64encode(prompt_audio_bytes).decode('utf-8')]
|