File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -205,3 +205,4 @@ def token(self) -> EaseVoiceResponse:
205205
206206 with open (self .semantic_output_path , "w" , encoding = "utf8" ) as f :
207207 f .write ("\n " .join (opt ) + "\n " )
208+ return EaseVoiceResponse (ResponseStatus .SUCCESS , "success" )
Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ def __init__(self, processing_path: str):
1212 def normalize (self ) -> EaseVoiceResponse :
1313 try :
1414 normalize = Normalize (self .processing_path )
15- return normalize .text ()
15+ text_resp = normalize .text ()
16+ if text_resp .status == ResponseStatus .FAILED :
17+ return text_resp
18+ ssl_resp = normalize .ssl ()
19+ if ssl_resp .status == ResponseStatus .FAILED :
20+ return ssl_resp
21+ token_resp = normalize .token ()
22+ if token_resp .status == ResponseStatus .FAILED :
23+ return token_resp
24+ return EaseVoiceResponse (ResponseStatus .SUCCESS , "Normalization completed successfully" )
1625 except Exception as e :
1726 return EaseVoiceResponse (ResponseStatus .FAILED , str (e ))
You can’t perform that action at this time.
0 commit comments