Spaces:
Sleeping
Sleeping
Commit
·
ae3c63e
1
Parent(s):
ccbb9b9
Fixed read back to bytes
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ def tts_fn(text, prompt_audio, prompt_seconds, inference_steps, inference_temper
|
|
15 |
audio_bytes = bytes()
|
16 |
byte_io = io.BytesIO(audio_bytes)
|
17 |
wavfile.write(byte_io, sr, prompt_audio)
|
18 |
-
|
|
|
19 |
|
20 |
response = requests.post(
|
21 |
f'{base_url}',
|
|
|
15 |
audio_bytes = bytes()
|
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')]
|
20 |
|
21 |
response = requests.post(
|
22 |
f'{base_url}',
|