Spaces:
Running
Running
Commit
Β·
699ea5d
1
Parent(s):
02665d5
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,14 @@ def generate_audio(text, voice_name):
|
|
28 |
response = requests.post(url, json=payload, headers=headers, stream=True)
|
29 |
|
30 |
if response.status_code == 200:
|
31 |
-
|
32 |
-
chunks = []
|
33 |
for chunk in response.iter_content(chunk_size=CHUNK_SIZE):
|
34 |
chunks.append(chunk)
|
35 |
return b''.join(chunks)
|
36 |
else:
|
37 |
raise Exception(f"μ€λ₯ λ°μ. μν μ½λ: {response.status_code}")
|
38 |
-
|
|
|
39 |
|
40 |
|
41 |
# Gradio μΈν°νμ΄μ€ μ μ
|
|
|
28 |
response = requests.post(url, json=payload, headers=headers, stream=True)
|
29 |
|
30 |
if response.status_code == 200:
|
31 |
+
chunks = []
|
|
|
32 |
for chunk in response.iter_content(chunk_size=CHUNK_SIZE):
|
33 |
chunks.append(chunk)
|
34 |
return b''.join(chunks)
|
35 |
else:
|
36 |
raise Exception(f"μ€λ₯ λ°μ. μν μ½λ: {response.status_code}")
|
37 |
+
|
38 |
+
CHUNK_SIZE = 1024
|
39 |
|
40 |
|
41 |
# Gradio μΈν°νμ΄μ€ μ μ
|