deepgram.clients.speak.enums

 1# Copyright 2024 Deepgram SDK contributors. All Rights Reserved.
 2# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
 3# SPDX-License-Identifier: MIT
 4
 5from aenum import StrEnum
 6
 7# Constants mapping to events from the Deepgram API
 8
 9
10class SpeakWebSocketMessage(StrEnum):
11    """
12    Enumerates the possible message types that can be received from the Deepgram API
13    """
14
15    Speak: str = "Speak"
16    Flush: str = "Flush"
17    Clear: str = "Clear"
18    Close: str = "Close"
19
20
21class SpeakWebSocketEvents(StrEnum):
22    """
23    Enumerates the possible events that can be received from the Deepgram API
24    """
25
26    Open: str = "Open"
27    Close: str = "Close"
28    AudioData: str = "AudioData"
29    Metadata: str = "Metadata"
30    Flushed: str = "Flushed"
31    Cleared: str = "Cleared"
32    Unhandled: str = "Unhandled"
33    Error: str = "Error"
34    Warning: str = "Warning"
class SpeakWebSocketMessage(aenum._enum.StrEnum):
11class SpeakWebSocketMessage(StrEnum):
12    """
13    Enumerates the possible message types that can be received from the Deepgram API
14    """
15
16    Speak: str = "Speak"
17    Flush: str = "Flush"
18    Clear: str = "Clear"
19    Close: str = "Close"

Enumerates the possible message types that can be received from the Deepgram API

Speak: str = <SpeakWebSocketMessage.Speak: 'Speak'>
Flush: str = <SpeakWebSocketMessage.Flush: 'Flush'>
Clear: str = <SpeakWebSocketMessage.Clear: 'Clear'>
Close: str = <SpeakWebSocketMessage.Close: 'Close'>
class SpeakWebSocketEvents(aenum._enum.StrEnum):
22class SpeakWebSocketEvents(StrEnum):
23    """
24    Enumerates the possible events that can be received from the Deepgram API
25    """
26
27    Open: str = "Open"
28    Close: str = "Close"
29    AudioData: str = "AudioData"
30    Metadata: str = "Metadata"
31    Flushed: str = "Flushed"
32    Cleared: str = "Cleared"
33    Unhandled: str = "Unhandled"
34    Error: str = "Error"
35    Warning: str = "Warning"

Enumerates the possible events that can be received from the Deepgram API

Open: str = <SpeakWebSocketEvents.Open: 'Open'>
Close: str = <SpeakWebSocketEvents.Close: 'Close'>
AudioData: str = <SpeakWebSocketEvents.AudioData: 'AudioData'>
Metadata: str = <SpeakWebSocketEvents.Metadata: 'Metadata'>
Flushed: str = <SpeakWebSocketEvents.Flushed: 'Flushed'>
Cleared: str = <SpeakWebSocketEvents.Cleared: 'Cleared'>
Unhandled: str = <SpeakWebSocketEvents.Unhandled: 'Unhandled'>
Error: str = <SpeakWebSocketEvents.Error: 'Error'>
Warning: str = <SpeakWebSocketEvents.Warning: 'Warning'>