Spaces:
Running
Running
Commit
ยท
a160271
1
Parent(s):
699ea5d
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,12 @@ import gradio as gr
|
|
2 |
import requests
|
3 |
|
4 |
def generate_audio(text, voice_name):
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
voices = {
|
6 |
"์ฐจ์น์": "SKwm0HLYsVDCM2ruvw2p",
|
7 |
"๊น์ ์": "YPWL3nQPzBN1XaiZF4aj",
|
|
|
2 |
import requests
|
3 |
|
4 |
def generate_audio(text, voice_name):
|
5 |
+
|
6 |
+
MAX_CHARS = 100
|
7 |
+
# ์
๋ ฅ๋ ํ
์คํธ ๊ธธ์ด ๊ฒ์ฆ
|
8 |
+
if len(text) > MAX_CHARS:
|
9 |
+
text = text[:MAX_CHARS] # ์ต๋ ๊ธ์์๋ก ํ
์คํธ ์๋ฅด๊ธฐ
|
10 |
+
|
11 |
voices = {
|
12 |
"์ฐจ์น์": "SKwm0HLYsVDCM2ruvw2p",
|
13 |
"๊น์ ์": "YPWL3nQPzBN1XaiZF4aj",
|