seawolf2357 commited on
Commit
a160271
ยท
1 Parent(s): 699ea5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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",