kevinwang676 commited on
Commit
a4cb207
1 Parent(s): 6cf376d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -60,6 +60,8 @@ def voice_change(audio_in, audio_ref):
60
 
61
 
62
  def tts(text, model, voice, api_key):
 
 
63
  if api_key == '':
64
  raise gr.Error('Please enter your OpenAI API Key')
65
  else:
 
60
 
61
 
62
  def tts(text, model, voice, api_key):
63
+ if len(text)>300:
64
+ raise gr.Error('您输入的文本字符多于300个,请缩短您的文本')
65
  if api_key == '':
66
  raise gr.Error('Please enter your OpenAI API Key')
67
  else: