asffadsa commited on
Commit
bc9c6b0
1 Parent(s): d8137a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -619,8 +619,8 @@ def lang_detector(text):
619
  return f"ERROR:{str(e)}"
620
 
621
  def trim_text(text,language):
622
- limit_cj = 120 #character
623
- limit_en = 60 #words
624
  search_limit_cj = limit_cj+30
625
  search_limit_en = limit_en +30
626
  text = text.replace('\n', '').strip()
@@ -655,7 +655,7 @@ def duration(audio_file_path):
655
  return False
656
  try:
657
  audio_duration = librosa.get_duration(filename=audio_file_path)
658
- if not 3 < audio_duration < 10:
659
  wprint("The audio length must be between 3~10 seconds/音频时长须在3~10秒之间")
660
  return False
661
  return True
 
619
  return f"ERROR:{str(e)}"
620
 
621
  def trim_text(text,language):
622
+ limit_cj = 20000 #character
623
+ limit_en = 20000 #words
624
  search_limit_cj = limit_cj+30
625
  search_limit_en = limit_en +30
626
  text = text.replace('\n', '').strip()
 
655
  return False
656
  try:
657
  audio_duration = librosa.get_duration(filename=audio_file_path)
658
+ if not 1 < audio_duration < 60:
659
  wprint("The audio length must be between 3~10 seconds/音频时长须在3~10秒之间")
660
  return False
661
  return True