dtelecom-server-sdk 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dtelecom_server/__init__.py +43 -0
- dtelecom_server/_typing/livekit_egress_pb2.pyi +473 -0
- dtelecom_server/_typing/livekit_ingress_pb2.pyi +213 -0
- dtelecom_server/_typing/livekit_models_pb2.pyi +524 -0
- dtelecom_server/_typing/livekit_room_pb2.pyi +154 -0
- dtelecom_server/_typing/livekit_webhook_pb2.pyi +28 -0
- dtelecom_server/client.py +159 -0
- dtelecom_server/http.py +112 -0
- dtelecom_server/models.py +250 -0
- dtelecom_server/moderation.py +84 -0
- dtelecom_server/protocol/LICENSE +202 -0
- dtelecom_server/protocol/NOTICE +1 -0
- dtelecom_server/protocol/__init__.py +25 -0
- dtelecom_server/protocol/wire.pb +0 -0
- dtelecom_server/py.typed +0 -0
- dtelecom_server/room.py +298 -0
- dtelecom_server/services.py +273 -0
- dtelecom_server/speech.py +642 -0
- dtelecom_server/webhooks.py +148 -0
- dtelecom_server/wire.py +32 -0
- dtelecom_server_sdk-0.1.0.dist-info/METADATA +78 -0
- dtelecom_server_sdk-0.1.0.dist-info/RECORD +25 -0
- dtelecom_server_sdk-0.1.0.dist-info/WHEEL +4 -0
- dtelecom_server_sdk-0.1.0.dist-info/licenses/LICENSE +201 -0
- dtelecom_server_sdk-0.1.0.dist-info/licenses/NOTICE +9 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
from . import livekit_models_pb2 as _livekit_models_pb2
|
|
2
|
+
from google.protobuf.internal import containers as _containers
|
|
3
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
4
|
+
from google.protobuf import descriptor as _descriptor
|
|
5
|
+
from google.protobuf import message as _message
|
|
6
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class IngressInput(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
11
|
+
__slots__ = ()
|
|
12
|
+
RTMP_INPUT: _ClassVar[IngressInput]
|
|
13
|
+
|
|
14
|
+
class IngressAudioEncodingPreset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
15
|
+
__slots__ = ()
|
|
16
|
+
OPUS_STEREO_96KBPS: _ClassVar[IngressAudioEncodingPreset]
|
|
17
|
+
OPUS_MONO_64KBS: _ClassVar[IngressAudioEncodingPreset]
|
|
18
|
+
|
|
19
|
+
class IngressVideoEncodingPreset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
20
|
+
__slots__ = ()
|
|
21
|
+
H264_720P_30FPS_3_LAYERS: _ClassVar[IngressVideoEncodingPreset]
|
|
22
|
+
H264_1080P_30FPS_3_LAYERS: _ClassVar[IngressVideoEncodingPreset]
|
|
23
|
+
H264_540P_25FPS_2_LAYERS: _ClassVar[IngressVideoEncodingPreset]
|
|
24
|
+
H264_720P_30FPS_1_LAYER: _ClassVar[IngressVideoEncodingPreset]
|
|
25
|
+
H264_1080P_30FPS_1_LAYER: _ClassVar[IngressVideoEncodingPreset]
|
|
26
|
+
RTMP_INPUT: IngressInput
|
|
27
|
+
OPUS_STEREO_96KBPS: IngressAudioEncodingPreset
|
|
28
|
+
OPUS_MONO_64KBS: IngressAudioEncodingPreset
|
|
29
|
+
H264_720P_30FPS_3_LAYERS: IngressVideoEncodingPreset
|
|
30
|
+
H264_1080P_30FPS_3_LAYERS: IngressVideoEncodingPreset
|
|
31
|
+
H264_540P_25FPS_2_LAYERS: IngressVideoEncodingPreset
|
|
32
|
+
H264_720P_30FPS_1_LAYER: IngressVideoEncodingPreset
|
|
33
|
+
H264_1080P_30FPS_1_LAYER: IngressVideoEncodingPreset
|
|
34
|
+
|
|
35
|
+
class CreateIngressRequest(_message.Message):
|
|
36
|
+
__slots__ = ("input_type", "name", "room_name", "participant_identity", "participant_name", "audio", "video")
|
|
37
|
+
INPUT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
ROOM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
40
|
+
PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
|
41
|
+
PARTICIPANT_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
42
|
+
AUDIO_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
VIDEO_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
input_type: IngressInput
|
|
45
|
+
name: str
|
|
46
|
+
room_name: str
|
|
47
|
+
participant_identity: str
|
|
48
|
+
participant_name: str
|
|
49
|
+
audio: IngressAudioOptions
|
|
50
|
+
video: IngressVideoOptions
|
|
51
|
+
def __init__(self, input_type: _Optional[_Union[IngressInput, str]] = ..., name: _Optional[str] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_name: _Optional[str] = ..., audio: _Optional[_Union[IngressAudioOptions, _Mapping]] = ..., video: _Optional[_Union[IngressVideoOptions, _Mapping]] = ...) -> None: ...
|
|
52
|
+
|
|
53
|
+
class IngressAudioOptions(_message.Message):
|
|
54
|
+
__slots__ = ("name", "source", "preset", "options")
|
|
55
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
SOURCE_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
PRESET_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
OPTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
59
|
+
name: str
|
|
60
|
+
source: _livekit_models_pb2.TrackSource
|
|
61
|
+
preset: IngressAudioEncodingPreset
|
|
62
|
+
options: IngressAudioEncodingOptions
|
|
63
|
+
def __init__(self, name: _Optional[str] = ..., source: _Optional[_Union[_livekit_models_pb2.TrackSource, str]] = ..., preset: _Optional[_Union[IngressAudioEncodingPreset, str]] = ..., options: _Optional[_Union[IngressAudioEncodingOptions, _Mapping]] = ...) -> None: ...
|
|
64
|
+
|
|
65
|
+
class IngressVideoOptions(_message.Message):
|
|
66
|
+
__slots__ = ("name", "source", "preset", "options")
|
|
67
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
SOURCE_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
PRESET_FIELD_NUMBER: _ClassVar[int]
|
|
70
|
+
OPTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
name: str
|
|
72
|
+
source: _livekit_models_pb2.TrackSource
|
|
73
|
+
preset: IngressVideoEncodingPreset
|
|
74
|
+
options: IngressVideoEncodingOptions
|
|
75
|
+
def __init__(self, name: _Optional[str] = ..., source: _Optional[_Union[_livekit_models_pb2.TrackSource, str]] = ..., preset: _Optional[_Union[IngressVideoEncodingPreset, str]] = ..., options: _Optional[_Union[IngressVideoEncodingOptions, _Mapping]] = ...) -> None: ...
|
|
76
|
+
|
|
77
|
+
class IngressAudioEncodingOptions(_message.Message):
|
|
78
|
+
__slots__ = ("audio_codec", "bitrate", "disable_dtx", "channels")
|
|
79
|
+
AUDIO_CODEC_FIELD_NUMBER: _ClassVar[int]
|
|
80
|
+
BITRATE_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
DISABLE_DTX_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
CHANNELS_FIELD_NUMBER: _ClassVar[int]
|
|
83
|
+
audio_codec: _livekit_models_pb2.AudioCodec
|
|
84
|
+
bitrate: int
|
|
85
|
+
disable_dtx: bool
|
|
86
|
+
channels: int
|
|
87
|
+
def __init__(self, audio_codec: _Optional[_Union[_livekit_models_pb2.AudioCodec, str]] = ..., bitrate: _Optional[int] = ..., disable_dtx: bool = ..., channels: _Optional[int] = ...) -> None: ...
|
|
88
|
+
|
|
89
|
+
class IngressVideoEncodingOptions(_message.Message):
|
|
90
|
+
__slots__ = ("video_codec", "frame_rate", "layers")
|
|
91
|
+
VIDEO_CODEC_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
FRAME_RATE_FIELD_NUMBER: _ClassVar[int]
|
|
93
|
+
LAYERS_FIELD_NUMBER: _ClassVar[int]
|
|
94
|
+
video_codec: _livekit_models_pb2.VideoCodec
|
|
95
|
+
frame_rate: float
|
|
96
|
+
layers: _containers.RepeatedCompositeFieldContainer[_livekit_models_pb2.VideoLayer]
|
|
97
|
+
def __init__(self, video_codec: _Optional[_Union[_livekit_models_pb2.VideoCodec, str]] = ..., frame_rate: _Optional[float] = ..., layers: _Optional[_Iterable[_Union[_livekit_models_pb2.VideoLayer, _Mapping]]] = ...) -> None: ...
|
|
98
|
+
|
|
99
|
+
class IngressInfo(_message.Message):
|
|
100
|
+
__slots__ = ("ingress_id", "name", "stream_key", "url", "input_type", "audio", "video", "room_name", "participant_identity", "participant_name", "reusable", "state")
|
|
101
|
+
INGRESS_ID_FIELD_NUMBER: _ClassVar[int]
|
|
102
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
103
|
+
STREAM_KEY_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
+
URL_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
INPUT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
106
|
+
AUDIO_FIELD_NUMBER: _ClassVar[int]
|
|
107
|
+
VIDEO_FIELD_NUMBER: _ClassVar[int]
|
|
108
|
+
ROOM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
109
|
+
PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
|
110
|
+
PARTICIPANT_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
111
|
+
REUSABLE_FIELD_NUMBER: _ClassVar[int]
|
|
112
|
+
STATE_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
+
ingress_id: str
|
|
114
|
+
name: str
|
|
115
|
+
stream_key: str
|
|
116
|
+
url: str
|
|
117
|
+
input_type: IngressInput
|
|
118
|
+
audio: IngressAudioOptions
|
|
119
|
+
video: IngressVideoOptions
|
|
120
|
+
room_name: str
|
|
121
|
+
participant_identity: str
|
|
122
|
+
participant_name: str
|
|
123
|
+
reusable: bool
|
|
124
|
+
state: IngressState
|
|
125
|
+
def __init__(self, ingress_id: _Optional[str] = ..., name: _Optional[str] = ..., stream_key: _Optional[str] = ..., url: _Optional[str] = ..., input_type: _Optional[_Union[IngressInput, str]] = ..., audio: _Optional[_Union[IngressAudioOptions, _Mapping]] = ..., video: _Optional[_Union[IngressVideoOptions, _Mapping]] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_name: _Optional[str] = ..., reusable: bool = ..., state: _Optional[_Union[IngressState, _Mapping]] = ...) -> None: ...
|
|
126
|
+
|
|
127
|
+
class IngressState(_message.Message):
|
|
128
|
+
__slots__ = ("status", "error", "video", "audio", "room_id", "started_at", "ended_at", "tracks")
|
|
129
|
+
class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
130
|
+
__slots__ = ()
|
|
131
|
+
ENDPOINT_INACTIVE: _ClassVar[IngressState.Status]
|
|
132
|
+
ENDPOINT_BUFFERING: _ClassVar[IngressState.Status]
|
|
133
|
+
ENDPOINT_PUBLISHING: _ClassVar[IngressState.Status]
|
|
134
|
+
ENDPOINT_ERROR: _ClassVar[IngressState.Status]
|
|
135
|
+
ENDPOINT_INACTIVE: IngressState.Status
|
|
136
|
+
ENDPOINT_BUFFERING: IngressState.Status
|
|
137
|
+
ENDPOINT_PUBLISHING: IngressState.Status
|
|
138
|
+
ENDPOINT_ERROR: IngressState.Status
|
|
139
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
140
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
141
|
+
VIDEO_FIELD_NUMBER: _ClassVar[int]
|
|
142
|
+
AUDIO_FIELD_NUMBER: _ClassVar[int]
|
|
143
|
+
ROOM_ID_FIELD_NUMBER: _ClassVar[int]
|
|
144
|
+
STARTED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
145
|
+
ENDED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
146
|
+
TRACKS_FIELD_NUMBER: _ClassVar[int]
|
|
147
|
+
status: IngressState.Status
|
|
148
|
+
error: str
|
|
149
|
+
video: InputVideoState
|
|
150
|
+
audio: InputAudioState
|
|
151
|
+
room_id: str
|
|
152
|
+
started_at: int
|
|
153
|
+
ended_at: int
|
|
154
|
+
tracks: _containers.RepeatedCompositeFieldContainer[_livekit_models_pb2.TrackInfo]
|
|
155
|
+
def __init__(self, status: _Optional[_Union[IngressState.Status, str]] = ..., error: _Optional[str] = ..., video: _Optional[_Union[InputVideoState, _Mapping]] = ..., audio: _Optional[_Union[InputAudioState, _Mapping]] = ..., room_id: _Optional[str] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ..., tracks: _Optional[_Iterable[_Union[_livekit_models_pb2.TrackInfo, _Mapping]]] = ...) -> None: ...
|
|
156
|
+
|
|
157
|
+
class InputVideoState(_message.Message):
|
|
158
|
+
__slots__ = ("mime_type", "width", "height", "framerate")
|
|
159
|
+
MIME_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
160
|
+
WIDTH_FIELD_NUMBER: _ClassVar[int]
|
|
161
|
+
HEIGHT_FIELD_NUMBER: _ClassVar[int]
|
|
162
|
+
FRAMERATE_FIELD_NUMBER: _ClassVar[int]
|
|
163
|
+
mime_type: str
|
|
164
|
+
width: int
|
|
165
|
+
height: int
|
|
166
|
+
framerate: int
|
|
167
|
+
def __init__(self, mime_type: _Optional[str] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., framerate: _Optional[int] = ...) -> None: ...
|
|
168
|
+
|
|
169
|
+
class InputAudioState(_message.Message):
|
|
170
|
+
__slots__ = ("mime_type", "channels", "sample_rate")
|
|
171
|
+
MIME_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
172
|
+
CHANNELS_FIELD_NUMBER: _ClassVar[int]
|
|
173
|
+
SAMPLE_RATE_FIELD_NUMBER: _ClassVar[int]
|
|
174
|
+
mime_type: str
|
|
175
|
+
channels: int
|
|
176
|
+
sample_rate: int
|
|
177
|
+
def __init__(self, mime_type: _Optional[str] = ..., channels: _Optional[int] = ..., sample_rate: _Optional[int] = ...) -> None: ...
|
|
178
|
+
|
|
179
|
+
class UpdateIngressRequest(_message.Message):
|
|
180
|
+
__slots__ = ("ingress_id", "name", "room_name", "participant_identity", "participant_name", "audio", "video")
|
|
181
|
+
INGRESS_ID_FIELD_NUMBER: _ClassVar[int]
|
|
182
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
183
|
+
ROOM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
184
|
+
PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
|
185
|
+
PARTICIPANT_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
186
|
+
AUDIO_FIELD_NUMBER: _ClassVar[int]
|
|
187
|
+
VIDEO_FIELD_NUMBER: _ClassVar[int]
|
|
188
|
+
ingress_id: str
|
|
189
|
+
name: str
|
|
190
|
+
room_name: str
|
|
191
|
+
participant_identity: str
|
|
192
|
+
participant_name: str
|
|
193
|
+
audio: IngressAudioOptions
|
|
194
|
+
video: IngressVideoOptions
|
|
195
|
+
def __init__(self, ingress_id: _Optional[str] = ..., name: _Optional[str] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_name: _Optional[str] = ..., audio: _Optional[_Union[IngressAudioOptions, _Mapping]] = ..., video: _Optional[_Union[IngressVideoOptions, _Mapping]] = ...) -> None: ...
|
|
196
|
+
|
|
197
|
+
class ListIngressRequest(_message.Message):
|
|
198
|
+
__slots__ = ("room_name",)
|
|
199
|
+
ROOM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
200
|
+
room_name: str
|
|
201
|
+
def __init__(self, room_name: _Optional[str] = ...) -> None: ...
|
|
202
|
+
|
|
203
|
+
class ListIngressResponse(_message.Message):
|
|
204
|
+
__slots__ = ("items",)
|
|
205
|
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
|
206
|
+
items: _containers.RepeatedCompositeFieldContainer[IngressInfo]
|
|
207
|
+
def __init__(self, items: _Optional[_Iterable[_Union[IngressInfo, _Mapping]]] = ...) -> None: ...
|
|
208
|
+
|
|
209
|
+
class DeleteIngressRequest(_message.Message):
|
|
210
|
+
__slots__ = ("ingress_id",)
|
|
211
|
+
INGRESS_ID_FIELD_NUMBER: _ClassVar[int]
|
|
212
|
+
ingress_id: str
|
|
213
|
+
def __init__(self, ingress_id: _Optional[str] = ...) -> None: ...
|