Irpan commited on
Commit
422a095
·
1 Parent(s): 3527591
Files changed (1) hide show
  1. tts.py +3 -0
tts.py CHANGED
@@ -43,6 +43,9 @@ text2speech = Text2Speech(
43
  text2speech.spc2wav = None ### disable griffin-lim
44
 
45
  def synthesize(text, model_id):
 
 
 
46
  if model_id == 'IS2AI-TurkicTTS':
47
  return synthesize_turkic_tts(text)
48
 
 
43
  text2speech.spc2wav = None ### disable griffin-lim
44
 
45
  def synthesize(text, model_id):
46
+ if len(text) > 200:
47
+ raise ValueError(f"Input text exceeds 200 characters. Please provide a shorter input text for faster processing.")
48
+
49
  if model_id == 'IS2AI-TurkicTTS':
50
  return synthesize_turkic_tts(text)
51