-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexceptions.py
22 lines (16 loc) · 1008 Bytes
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class CoreModelNotTrained(Exception):
def __init__(self, message="No saved instance of the core model was found. "
"Please make sure the model is trained and saved."):
super().__init__(message)
class SpeechRecognizerNotTrained(Exception):
def __init__(self, message="No saved instance of the speech recognizer model was found. "
"Please make sure the model is trained and saved."):
super().__init__(message)
class LanguageModelNotTrained(Exception):
def __init__(self, message="No saved instance of the language model was found. "
"Please make sure the model is trained and saved."):
super().__init__(message)
class SpeechSynthesizerCannotBeLoaded(Exception):
def __init__(self, message="No saved instance of the synthesizer model was found. "
"Please make sure there is a saved instance of the model"):
super().__init__(message)