1 """Assist pipeline errors."""
7 """Base class for pipeline errors."""
9 def __init__(self, code: str, message: str) ->
None:
10 """Set error message."""
14 super().
__init__(f
"Pipeline error code={code}, message={message}")
18 """Unspecified pipeline picked."""
21 class WakeWordDetectionError(PipelineError):
22 """Error in wake-word-detection portion of pipeline."""
26 """Wake-word-detection was aborted."""
29 """Set error message."""
30 super().
__init__(
"wake_word_detection_aborted",
"")
34 """Timeout when wake word was not detected."""
37 class SpeechToTextError(PipelineError):
38 """Error in speech-to-text portion of pipeline."""
42 """Error when multiple voice assistants wake up at the same time (same wake word)."""
44 def __init__(self, wake_up_phrase: str) ->
None:
45 """Set error message."""
47 "duplicate_wake_up_detected",
48 f
"Duplicate wake-up detected for {wake_up_phrase}",
53 """Error in intent recognition portion of pipeline."""
56 class TextToSpeechError(PipelineError):
57 """Error in text-to-speech portion of pipeline."""
None __init__(self, str wake_up_phrase)
None __init__(self, str code, str message)