File tree 1 file changed +8
-5
lines changed
voicevox_engine/user_dict
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,15 @@ def __init__(
105
105
106
106
# サーバーの起動高速化のため、前回起動時にビルド済みのユーザー辞書データがあれば、そのまま pyopenjtalk に適用する
107
107
if self ._compiled_dict_path .is_file ():
108
- pyopenjtalk .update_global_jtalk_with_user_dict (
109
- str (self ._compiled_dict_path .resolve (strict = True ))
110
- )
111
- logger .info ("Compiled user dictionary applied." )
108
+ try :
109
+ pyopenjtalk .update_global_jtalk_with_user_dict (
110
+ str (self ._compiled_dict_path .resolve (strict = True ))
111
+ )
112
+ logger .info ("Compiled user dictionary applied." )
113
+ except Exception as ex :
114
+ logger .error ("Failed to apply compiled user dictionary." , exc_info = ex )
112
115
113
- # バックグラウンドで辞書更新を行う (数秒程度を要する )
116
+ # バックグラウンドで辞書更新を行う (辞書登録量によっては数秒を要する )
114
117
threading .Thread (target = self .update_dict , daemon = True ).start ()
115
118
116
119
@mutex_wrapper (mutex_user_dict )
You can’t perform that action at this time.
0 commit comments