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
5# backward compat
6from .rest import (
7 ListenRESTClient as PreRecordedClient,
8 AsyncListenRESTClient as AsyncPreRecordedClient,
9)
10from .websocket import (
11 ListenWebSocketClient as LiveClient,
12 AsyncListenWebSocketClient as AsyncLiveClient,
13)
14
15# shared
16from ...common import (
17 Average,
18 Intent,
19 Intents,
20 IntentsInfo,
21 Segment,
22 SentimentInfo,
23 Sentiment,
24 Sentiments,
25 SummaryInfo,
26 Topic,
27 Topics,
28 TopicsInfo,
29)
30
31# between rest and websocket
32from ...common import (
33 ModelInfo,
34 Hit,
35 Search,
36)
37
38# common websocket
39from ...common import (
40 OpenResponse,
41 CloseResponse,
42 UnhandledResponse,
43 ErrorResponse,
44)
45
46# rest
47from .rest import ListenRESTClient, AsyncListenRESTClient
48from .rest import ListenRESTOptions, PrerecordedOptions
49from .rest import (
50 # common
51 UrlSource,
52 BufferSource,
53 StreamSource,
54 TextSource,
55 FileSource,
56 # unique
57 PreRecordedStreamSource,
58 PrerecordedSource,
59 ListenRestSource,
60)
61from .rest import (
62 #### top level
63 AsyncPrerecordedResponse,
64 PrerecordedResponse,
65 SyncPrerecordedResponse,
66 #### shared
67 # Average,
68 # Intent,
69 # Intents,
70 # IntentsInfo,
71 # Segment,
72 # SentimentInfo,
73 # Sentiment,
74 # Sentiments,
75 # SummaryInfo,
76 # Topic,
77 # Topics,
78 # TopicsInfo,
79 #### between rest and websocket
80 # ModelInfo,
81 # Alternative,
82 # Hit,
83 # Search,
84 # Channel,
85 # Word,
86 #### unique
87 Entity,
88 Metadata as ListenRESTMetadata,
89 Paragraph,
90 Paragraphs,
91 Results as ListenRESTResults,
92 Sentence,
93 Summaries,
94 SummaryV1,
95 SummaryV2,
96 Translation,
97 Utterance,
98 Warning,
99 ListenRESTAlternative,
100 ListenRESTChannel,
101 ListenRESTWord,
102)
103
104# websocket
105from .websocket import ListenWebSocketClient, AsyncListenWebSocketClient
106from .websocket import LiveOptions, ListenWebSocketOptions
107from .websocket import (
108 #### top level
109 LiveResultResponse,
110 MetadataResponse as ListenWSMetadataResponse,
111 SpeechStartedResponse,
112 UtteranceEndResponse,
113 #### common websocket response
114 # BaseResponse,
115 # OpenResponse,
116 # CloseResponse,
117 # ErrorResponse,
118 # UnhandledResponse,
119 #### between rest and websocket
120 # ModelInfo,
121 # Alternative,
122 # Hit,
123 # Search,
124 # Channel,
125 # Word,
126 #### unique
127 Metadata as ListenWSMetadata,
128 ListenWSWord,
129 ListenWSAlternative,
130 ListenWSChannel,
131)