innnky commited on
Commit
a34698d
1 Parent(s): e3a7134
Files changed (3) hide show
  1. app.py +1 -2
  2. requirements.txt +1 -0
  3. text/cleaners.py +4 -5
app.py CHANGED
@@ -77,8 +77,7 @@ def tts3(text, sample):
77
  audio, _ = tts(text, int(sample))
78
  return "Success", (hps.data.sampling_rate, audio)
79
  except:
80
- return "输入参数不为整数或其他错误"
81
-
82
  app = gr.Blocks()
83
  with app:
84
  with gr.Tabs():
 
77
  audio, _ = tts(text, int(sample))
78
  return "Success", (hps.data.sampling_rate, audio)
79
  except:
80
+ return "输入参数不为整数或其他错误", None
 
81
  app = gr.Blocks()
82
  with app:
83
  with gr.Tabs():
requirements.txt CHANGED
@@ -11,3 +11,4 @@ Unidecode
11
  jieba
12
  cn2an
13
  pypinyin
 
 
11
  jieba
12
  cn2an
13
  pypinyin
14
+ pyopenjtalk
text/cleaners.py CHANGED
@@ -1,9 +1,8 @@
1
  import re
2
- try:
3
- from text.japanese import japanese_to_romaji_with_accent, japanese_to_ipa, japanese_to_ipa2, japanese_to_ipa3
4
- from text.mandarin import number_to_chinese, chinese_to_bopomofo, latin_to_bopomofo, chinese_to_romaji, chinese_to_lazy_ipa, chinese_to_ipa, chinese_to_ipa2
5
- except:
6
- pass
7
  # from text.sanskrit import devanagari_to_ipa
8
  # from text.english import english_to_lazy_ipa, english_to_ipa2, english_to_lazy_ipa2
9
  # from text.thai import num_to_thai, latin_to_thai
 
1
  import re
2
+
3
+ from text.japanese import japanese_to_romaji_with_accent, japanese_to_ipa, japanese_to_ipa2, japanese_to_ipa3
4
+ from text.mandarin import number_to_chinese, chinese_to_bopomofo, latin_to_bopomofo, chinese_to_romaji, chinese_to_lazy_ipa, chinese_to_ipa, chinese_to_ipa2
5
+
 
6
  # from text.sanskrit import devanagari_to_ipa
7
  # from text.english import english_to_lazy_ipa, english_to_ipa2, english_to_lazy_ipa2
8
  # from text.thai import num_to_thai, latin_to_thai