sarvamai 0.1.22a4__py3-none-any.whl → 0.1.23a2__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.
- sarvamai/__init__.py +405 -200
- sarvamai/chat/raw_client.py +20 -20
- sarvamai/client.py +186 -34
- sarvamai/core/__init__.py +76 -21
- sarvamai/core/client_wrapper.py +19 -3
- sarvamai/core/force_multipart.py +4 -2
- sarvamai/core/http_client.py +217 -97
- sarvamai/core/http_response.py +1 -1
- sarvamai/core/http_sse/__init__.py +42 -0
- sarvamai/core/http_sse/_api.py +112 -0
- sarvamai/core/http_sse/_decoders.py +61 -0
- sarvamai/core/http_sse/_exceptions.py +7 -0
- sarvamai/core/http_sse/_models.py +17 -0
- sarvamai/core/jsonable_encoder.py +8 -0
- sarvamai/core/pydantic_utilities.py +110 -4
- sarvamai/errors/__init__.py +40 -6
- sarvamai/errors/bad_request_error.py +1 -1
- sarvamai/errors/forbidden_error.py +1 -1
- sarvamai/errors/internal_server_error.py +1 -1
- sarvamai/errors/service_unavailable_error.py +1 -1
- sarvamai/errors/too_many_requests_error.py +1 -1
- sarvamai/errors/unprocessable_entity_error.py +1 -1
- sarvamai/requests/__init__.py +150 -62
- sarvamai/requests/audio_data.py +0 -6
- sarvamai/requests/error_response_data.py +1 -1
- sarvamai/requests/file_signed_url_details.py +1 -1
- sarvamai/requests/speech_to_text_transcription_data.py +2 -2
- sarvamai/speech_to_text/raw_client.py +54 -52
- sarvamai/speech_to_text_job/raw_client.py +120 -120
- sarvamai/speech_to_text_streaming/__init__.py +38 -8
- sarvamai/speech_to_text_streaming/client.py +0 -13
- sarvamai/speech_to_text_streaming/raw_client.py +0 -13
- sarvamai/speech_to_text_streaming/types/__init__.py +36 -6
- sarvamai/speech_to_text_translate_job/raw_client.py +120 -120
- sarvamai/speech_to_text_translate_streaming/__init__.py +36 -7
- sarvamai/speech_to_text_translate_streaming/client.py +0 -13
- sarvamai/speech_to_text_translate_streaming/raw_client.py +0 -13
- sarvamai/speech_to_text_translate_streaming/types/__init__.py +36 -5
- sarvamai/text/client.py +0 -12
- sarvamai/text/raw_client.py +60 -72
- sarvamai/text_to_speech/client.py +18 -0
- sarvamai/text_to_speech/raw_client.py +38 -20
- sarvamai/text_to_speech_streaming/__init__.py +28 -1
- sarvamai/text_to_speech_streaming/types/__init__.py +30 -1
- sarvamai/types/__init__.py +222 -100
- sarvamai/types/audio_data.py +0 -6
- sarvamai/types/chat_completion_request_message.py +6 -2
- sarvamai/types/error_response_data.py +1 -1
- sarvamai/types/file_signed_url_details.py +1 -1
- sarvamai/types/speech_to_text_transcription_data.py +2 -2
- {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/METADATA +2 -1
- {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/RECORD +53 -51
- sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +0 -33
- sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +0 -33
- sarvamai/types/audio_data_input_audio_codec.py +0 -33
- {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/WHEEL +0 -0
sarvamai/__init__.py
CHANGED
|
@@ -2,208 +2,415 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
from .
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import (
|
|
10
|
+
AudioData,
|
|
11
|
+
AudioMessage,
|
|
12
|
+
AudioOutput,
|
|
13
|
+
AudioOutputData,
|
|
14
|
+
BaseJobParameters,
|
|
15
|
+
BulkJobCallback,
|
|
16
|
+
BulkJobInitResponseV1,
|
|
17
|
+
ChatCompletionRequestAssistantMessage,
|
|
18
|
+
ChatCompletionRequestMessage,
|
|
19
|
+
ChatCompletionRequestMessage_Assistant,
|
|
20
|
+
ChatCompletionRequestMessage_System,
|
|
21
|
+
ChatCompletionRequestMessage_User,
|
|
22
|
+
ChatCompletionRequestSystemMessage,
|
|
23
|
+
ChatCompletionRequestUserMessage,
|
|
24
|
+
ChatCompletionResponseMessage,
|
|
25
|
+
Choice,
|
|
26
|
+
CompletionEventFlag,
|
|
27
|
+
CompletionUsage,
|
|
28
|
+
ConfigMessage,
|
|
29
|
+
ConfigureConnection,
|
|
30
|
+
ConfigureConnectionData,
|
|
31
|
+
ConfigureConnectionDataOutputAudioBitrate,
|
|
32
|
+
ConfigureConnectionDataOutputAudioCodec,
|
|
33
|
+
ConfigureConnectionDataSpeaker,
|
|
34
|
+
ConfigureConnectionDataTargetLanguageCode,
|
|
35
|
+
ConnectionSampleRate,
|
|
36
|
+
CreateChatCompletionResponse,
|
|
37
|
+
DiarizedEntry,
|
|
38
|
+
DiarizedTranscript,
|
|
39
|
+
ErrorCode,
|
|
40
|
+
ErrorData,
|
|
41
|
+
ErrorDetails,
|
|
42
|
+
ErrorMessage,
|
|
43
|
+
ErrorResponse,
|
|
44
|
+
ErrorResponseData,
|
|
45
|
+
EventResponse,
|
|
46
|
+
EventResponseData,
|
|
47
|
+
EventsData,
|
|
48
|
+
EventsDataSignalType,
|
|
49
|
+
FileSignedUrlDetails,
|
|
50
|
+
FilesDownloadResponse,
|
|
51
|
+
FilesRequest,
|
|
52
|
+
FilesUploadResponse,
|
|
53
|
+
FinishReason,
|
|
54
|
+
FlushSignal,
|
|
55
|
+
InputAudioCodec,
|
|
56
|
+
JobState,
|
|
57
|
+
JobStatusV1Response,
|
|
58
|
+
LanguageIdentificationResponse,
|
|
59
|
+
NumeralsFormat,
|
|
60
|
+
PingSignal,
|
|
61
|
+
ReasoningEffort,
|
|
62
|
+
ResponseType,
|
|
63
|
+
Role,
|
|
64
|
+
SarvamModelIds,
|
|
65
|
+
SendText,
|
|
66
|
+
SendTextData,
|
|
67
|
+
SpeechSampleRate,
|
|
68
|
+
SpeechToTextJobParameters,
|
|
69
|
+
SpeechToTextLanguage,
|
|
70
|
+
SpeechToTextModel,
|
|
71
|
+
SpeechToTextResponse,
|
|
72
|
+
SpeechToTextResponseData,
|
|
73
|
+
SpeechToTextStreamingResponse,
|
|
74
|
+
SpeechToTextTranscriptionData,
|
|
75
|
+
SpeechToTextTranslateJobParameters,
|
|
76
|
+
SpeechToTextTranslateLanguage,
|
|
77
|
+
SpeechToTextTranslateModel,
|
|
78
|
+
SpeechToTextTranslateResponse,
|
|
79
|
+
SpeechToTextTranslateResponseData,
|
|
80
|
+
SpeechToTextTranslateStreamingResponse,
|
|
81
|
+
SpeechToTextTranslateTranscriptionData,
|
|
82
|
+
SpokenFormNumeralsFormat,
|
|
83
|
+
StopConfiguration,
|
|
84
|
+
StorageContainerType,
|
|
85
|
+
SttFlushSignal,
|
|
86
|
+
TaskDetailV1,
|
|
87
|
+
TaskFileDetails,
|
|
88
|
+
TaskState,
|
|
89
|
+
TextToSpeechLanguage,
|
|
90
|
+
TextToSpeechModel,
|
|
91
|
+
TextToSpeechOutputAudioCodec,
|
|
92
|
+
TextToSpeechResponse,
|
|
93
|
+
TextToSpeechSpeaker,
|
|
94
|
+
TimestampsModel,
|
|
95
|
+
TranscriptionMetrics,
|
|
96
|
+
TranslateMode,
|
|
97
|
+
TranslateModel,
|
|
98
|
+
TranslateSourceLanguage,
|
|
99
|
+
TranslateSpeakerGender,
|
|
100
|
+
TranslateTargetLanguage,
|
|
101
|
+
TranslationResponse,
|
|
102
|
+
TranslatiterateTargetLanguage,
|
|
103
|
+
TransliterateMode,
|
|
104
|
+
TransliterateSourceLanguage,
|
|
105
|
+
TransliterationResponse,
|
|
106
|
+
)
|
|
107
|
+
from .errors import (
|
|
108
|
+
BadRequestError,
|
|
109
|
+
ForbiddenError,
|
|
110
|
+
InternalServerError,
|
|
111
|
+
ServiceUnavailableError,
|
|
112
|
+
TooManyRequestsError,
|
|
113
|
+
UnprocessableEntityError,
|
|
114
|
+
)
|
|
115
|
+
from . import (
|
|
116
|
+
chat,
|
|
117
|
+
speech_to_text,
|
|
118
|
+
speech_to_text_job,
|
|
119
|
+
speech_to_text_streaming,
|
|
120
|
+
speech_to_text_translate_job,
|
|
121
|
+
speech_to_text_translate_streaming,
|
|
122
|
+
text,
|
|
123
|
+
text_to_speech,
|
|
124
|
+
text_to_speech_streaming,
|
|
125
|
+
)
|
|
126
|
+
from .client import AsyncSarvamAI, SarvamAI
|
|
127
|
+
from .environment import SarvamAIEnvironment
|
|
128
|
+
from .requests import (
|
|
129
|
+
AudioDataParams,
|
|
130
|
+
AudioMessageParams,
|
|
131
|
+
AudioOutputDataParams,
|
|
132
|
+
AudioOutputParams,
|
|
133
|
+
BaseJobParametersParams,
|
|
134
|
+
BulkJobCallbackParams,
|
|
135
|
+
BulkJobInitResponseV1Params,
|
|
136
|
+
ChatCompletionRequestAssistantMessageParams,
|
|
137
|
+
ChatCompletionRequestMessageParams,
|
|
138
|
+
ChatCompletionRequestMessage_AssistantParams,
|
|
139
|
+
ChatCompletionRequestMessage_SystemParams,
|
|
140
|
+
ChatCompletionRequestMessage_UserParams,
|
|
141
|
+
ChatCompletionRequestSystemMessageParams,
|
|
142
|
+
ChatCompletionRequestUserMessageParams,
|
|
143
|
+
ChatCompletionResponseMessageParams,
|
|
144
|
+
ChoiceParams,
|
|
145
|
+
CompletionUsageParams,
|
|
146
|
+
ConfigMessageParams,
|
|
147
|
+
ConfigureConnectionDataParams,
|
|
148
|
+
ConfigureConnectionParams,
|
|
149
|
+
CreateChatCompletionResponseParams,
|
|
150
|
+
DiarizedEntryParams,
|
|
151
|
+
DiarizedTranscriptParams,
|
|
152
|
+
ErrorDataParams,
|
|
153
|
+
ErrorDetailsParams,
|
|
154
|
+
ErrorMessageParams,
|
|
155
|
+
ErrorResponseDataParams,
|
|
156
|
+
ErrorResponseParams,
|
|
157
|
+
EventResponseDataParams,
|
|
158
|
+
EventResponseParams,
|
|
159
|
+
EventsDataParams,
|
|
160
|
+
FileSignedUrlDetailsParams,
|
|
161
|
+
FilesDownloadResponseParams,
|
|
162
|
+
FilesRequestParams,
|
|
163
|
+
FilesUploadResponseParams,
|
|
164
|
+
FlushSignalParams,
|
|
165
|
+
JobStatusV1ResponseParams,
|
|
166
|
+
LanguageIdentificationResponseParams,
|
|
167
|
+
PingSignalParams,
|
|
168
|
+
SendTextDataParams,
|
|
169
|
+
SendTextParams,
|
|
170
|
+
SpeechToTextJobParametersParams,
|
|
171
|
+
SpeechToTextResponseDataParams,
|
|
172
|
+
SpeechToTextResponseParams,
|
|
173
|
+
SpeechToTextStreamingResponseParams,
|
|
174
|
+
SpeechToTextTranscriptionDataParams,
|
|
175
|
+
SpeechToTextTranslateJobParametersParams,
|
|
176
|
+
SpeechToTextTranslateResponseDataParams,
|
|
177
|
+
SpeechToTextTranslateResponseParams,
|
|
178
|
+
SpeechToTextTranslateStreamingResponseParams,
|
|
179
|
+
SpeechToTextTranslateTranscriptionDataParams,
|
|
180
|
+
StopConfigurationParams,
|
|
181
|
+
SttFlushSignalParams,
|
|
182
|
+
TaskDetailV1Params,
|
|
183
|
+
TaskFileDetailsParams,
|
|
184
|
+
TextToSpeechResponseParams,
|
|
185
|
+
TimestampsModelParams,
|
|
186
|
+
TranscriptionMetricsParams,
|
|
187
|
+
TranslationResponseParams,
|
|
188
|
+
TransliterationResponseParams,
|
|
189
|
+
)
|
|
190
|
+
from .speech_to_text_streaming import (
|
|
191
|
+
SpeechToTextStreamingFlushSignal,
|
|
192
|
+
SpeechToTextStreamingHighVadSensitivity,
|
|
193
|
+
SpeechToTextStreamingLanguageCode,
|
|
194
|
+
SpeechToTextStreamingVadSignals,
|
|
195
|
+
)
|
|
196
|
+
from .speech_to_text_translate_streaming import (
|
|
197
|
+
SpeechToTextTranslateStreamingFlushSignal,
|
|
198
|
+
SpeechToTextTranslateStreamingHighVadSensitivity,
|
|
199
|
+
SpeechToTextTranslateStreamingVadSignals,
|
|
200
|
+
)
|
|
201
|
+
from .text_to_speech_streaming import TextToSpeechStreamingSendCompletionEvent
|
|
202
|
+
from .version import __version__
|
|
203
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
204
|
+
"AsyncSarvamAI": ".client",
|
|
205
|
+
"AudioData": ".types",
|
|
206
|
+
"AudioDataParams": ".requests",
|
|
207
|
+
"AudioMessage": ".types",
|
|
208
|
+
"AudioMessageParams": ".requests",
|
|
209
|
+
"AudioOutput": ".types",
|
|
210
|
+
"AudioOutputData": ".types",
|
|
211
|
+
"AudioOutputDataParams": ".requests",
|
|
212
|
+
"AudioOutputParams": ".requests",
|
|
213
|
+
"BadRequestError": ".errors",
|
|
214
|
+
"BaseJobParameters": ".types",
|
|
215
|
+
"BaseJobParametersParams": ".requests",
|
|
216
|
+
"BulkJobCallback": ".types",
|
|
217
|
+
"BulkJobCallbackParams": ".requests",
|
|
218
|
+
"BulkJobInitResponseV1": ".types",
|
|
219
|
+
"BulkJobInitResponseV1Params": ".requests",
|
|
220
|
+
"ChatCompletionRequestAssistantMessage": ".types",
|
|
221
|
+
"ChatCompletionRequestAssistantMessageParams": ".requests",
|
|
222
|
+
"ChatCompletionRequestMessage": ".types",
|
|
223
|
+
"ChatCompletionRequestMessageParams": ".requests",
|
|
224
|
+
"ChatCompletionRequestMessage_Assistant": ".types",
|
|
225
|
+
"ChatCompletionRequestMessage_AssistantParams": ".requests",
|
|
226
|
+
"ChatCompletionRequestMessage_System": ".types",
|
|
227
|
+
"ChatCompletionRequestMessage_SystemParams": ".requests",
|
|
228
|
+
"ChatCompletionRequestMessage_User": ".types",
|
|
229
|
+
"ChatCompletionRequestMessage_UserParams": ".requests",
|
|
230
|
+
"ChatCompletionRequestSystemMessage": ".types",
|
|
231
|
+
"ChatCompletionRequestSystemMessageParams": ".requests",
|
|
232
|
+
"ChatCompletionRequestUserMessage": ".types",
|
|
233
|
+
"ChatCompletionRequestUserMessageParams": ".requests",
|
|
234
|
+
"ChatCompletionResponseMessage": ".types",
|
|
235
|
+
"ChatCompletionResponseMessageParams": ".requests",
|
|
236
|
+
"Choice": ".types",
|
|
237
|
+
"ChoiceParams": ".requests",
|
|
238
|
+
"CompletionEventFlag": ".types",
|
|
239
|
+
"CompletionUsage": ".types",
|
|
240
|
+
"CompletionUsageParams": ".requests",
|
|
241
|
+
"ConfigMessage": ".types",
|
|
242
|
+
"ConfigMessageParams": ".requests",
|
|
243
|
+
"ConfigureConnection": ".types",
|
|
244
|
+
"ConfigureConnectionData": ".types",
|
|
245
|
+
"ConfigureConnectionDataOutputAudioBitrate": ".types",
|
|
246
|
+
"ConfigureConnectionDataOutputAudioCodec": ".types",
|
|
247
|
+
"ConfigureConnectionDataParams": ".requests",
|
|
248
|
+
"ConfigureConnectionDataSpeaker": ".types",
|
|
249
|
+
"ConfigureConnectionDataTargetLanguageCode": ".types",
|
|
250
|
+
"ConfigureConnectionParams": ".requests",
|
|
251
|
+
"ConnectionSampleRate": ".types",
|
|
252
|
+
"CreateChatCompletionResponse": ".types",
|
|
253
|
+
"CreateChatCompletionResponseParams": ".requests",
|
|
254
|
+
"DiarizedEntry": ".types",
|
|
255
|
+
"DiarizedEntryParams": ".requests",
|
|
256
|
+
"DiarizedTranscript": ".types",
|
|
257
|
+
"DiarizedTranscriptParams": ".requests",
|
|
258
|
+
"ErrorCode": ".types",
|
|
259
|
+
"ErrorData": ".types",
|
|
260
|
+
"ErrorDataParams": ".requests",
|
|
261
|
+
"ErrorDetails": ".types",
|
|
262
|
+
"ErrorDetailsParams": ".requests",
|
|
263
|
+
"ErrorMessage": ".types",
|
|
264
|
+
"ErrorMessageParams": ".requests",
|
|
265
|
+
"ErrorResponse": ".types",
|
|
266
|
+
"ErrorResponseData": ".types",
|
|
267
|
+
"ErrorResponseDataParams": ".requests",
|
|
268
|
+
"ErrorResponseParams": ".requests",
|
|
269
|
+
"EventResponse": ".types",
|
|
270
|
+
"EventResponseData": ".types",
|
|
271
|
+
"EventResponseDataParams": ".requests",
|
|
272
|
+
"EventResponseParams": ".requests",
|
|
273
|
+
"EventsData": ".types",
|
|
274
|
+
"EventsDataParams": ".requests",
|
|
275
|
+
"EventsDataSignalType": ".types",
|
|
276
|
+
"FileSignedUrlDetails": ".types",
|
|
277
|
+
"FileSignedUrlDetailsParams": ".requests",
|
|
278
|
+
"FilesDownloadResponse": ".types",
|
|
279
|
+
"FilesDownloadResponseParams": ".requests",
|
|
280
|
+
"FilesRequest": ".types",
|
|
281
|
+
"FilesRequestParams": ".requests",
|
|
282
|
+
"FilesUploadResponse": ".types",
|
|
283
|
+
"FilesUploadResponseParams": ".requests",
|
|
284
|
+
"FinishReason": ".types",
|
|
285
|
+
"FlushSignal": ".types",
|
|
286
|
+
"FlushSignalParams": ".requests",
|
|
287
|
+
"ForbiddenError": ".errors",
|
|
288
|
+
"InputAudioCodec": ".types",
|
|
289
|
+
"InternalServerError": ".errors",
|
|
290
|
+
"JobState": ".types",
|
|
291
|
+
"JobStatusV1Response": ".types",
|
|
292
|
+
"JobStatusV1ResponseParams": ".requests",
|
|
293
|
+
"LanguageIdentificationResponse": ".types",
|
|
294
|
+
"LanguageIdentificationResponseParams": ".requests",
|
|
295
|
+
"NumeralsFormat": ".types",
|
|
296
|
+
"PingSignal": ".types",
|
|
297
|
+
"PingSignalParams": ".requests",
|
|
298
|
+
"ReasoningEffort": ".types",
|
|
299
|
+
"ResponseType": ".types",
|
|
300
|
+
"Role": ".types",
|
|
301
|
+
"SarvamAI": ".client",
|
|
302
|
+
"SarvamAIEnvironment": ".environment",
|
|
303
|
+
"SarvamModelIds": ".types",
|
|
304
|
+
"SendText": ".types",
|
|
305
|
+
"SendTextData": ".types",
|
|
306
|
+
"SendTextDataParams": ".requests",
|
|
307
|
+
"SendTextParams": ".requests",
|
|
308
|
+
"ServiceUnavailableError": ".errors",
|
|
309
|
+
"SpeechSampleRate": ".types",
|
|
310
|
+
"SpeechToTextJobParameters": ".types",
|
|
311
|
+
"SpeechToTextJobParametersParams": ".requests",
|
|
312
|
+
"SpeechToTextLanguage": ".types",
|
|
313
|
+
"SpeechToTextModel": ".types",
|
|
314
|
+
"SpeechToTextResponse": ".types",
|
|
315
|
+
"SpeechToTextResponseData": ".types",
|
|
316
|
+
"SpeechToTextResponseDataParams": ".requests",
|
|
317
|
+
"SpeechToTextResponseParams": ".requests",
|
|
318
|
+
"SpeechToTextStreamingFlushSignal": ".speech_to_text_streaming",
|
|
319
|
+
"SpeechToTextStreamingHighVadSensitivity": ".speech_to_text_streaming",
|
|
320
|
+
"SpeechToTextStreamingLanguageCode": ".speech_to_text_streaming",
|
|
321
|
+
"SpeechToTextStreamingResponse": ".types",
|
|
322
|
+
"SpeechToTextStreamingResponseParams": ".requests",
|
|
323
|
+
"SpeechToTextStreamingVadSignals": ".speech_to_text_streaming",
|
|
324
|
+
"SpeechToTextTranscriptionData": ".types",
|
|
325
|
+
"SpeechToTextTranscriptionDataParams": ".requests",
|
|
326
|
+
"SpeechToTextTranslateJobParameters": ".types",
|
|
327
|
+
"SpeechToTextTranslateJobParametersParams": ".requests",
|
|
328
|
+
"SpeechToTextTranslateLanguage": ".types",
|
|
329
|
+
"SpeechToTextTranslateModel": ".types",
|
|
330
|
+
"SpeechToTextTranslateResponse": ".types",
|
|
331
|
+
"SpeechToTextTranslateResponseData": ".types",
|
|
332
|
+
"SpeechToTextTranslateResponseDataParams": ".requests",
|
|
333
|
+
"SpeechToTextTranslateResponseParams": ".requests",
|
|
334
|
+
"SpeechToTextTranslateStreamingFlushSignal": ".speech_to_text_translate_streaming",
|
|
335
|
+
"SpeechToTextTranslateStreamingHighVadSensitivity": ".speech_to_text_translate_streaming",
|
|
336
|
+
"SpeechToTextTranslateStreamingResponse": ".types",
|
|
337
|
+
"SpeechToTextTranslateStreamingResponseParams": ".requests",
|
|
338
|
+
"SpeechToTextTranslateStreamingVadSignals": ".speech_to_text_translate_streaming",
|
|
339
|
+
"SpeechToTextTranslateTranscriptionData": ".types",
|
|
340
|
+
"SpeechToTextTranslateTranscriptionDataParams": ".requests",
|
|
341
|
+
"SpokenFormNumeralsFormat": ".types",
|
|
342
|
+
"StopConfiguration": ".types",
|
|
343
|
+
"StopConfigurationParams": ".requests",
|
|
344
|
+
"StorageContainerType": ".types",
|
|
345
|
+
"SttFlushSignal": ".types",
|
|
346
|
+
"SttFlushSignalParams": ".requests",
|
|
347
|
+
"TaskDetailV1": ".types",
|
|
348
|
+
"TaskDetailV1Params": ".requests",
|
|
349
|
+
"TaskFileDetails": ".types",
|
|
350
|
+
"TaskFileDetailsParams": ".requests",
|
|
351
|
+
"TaskState": ".types",
|
|
352
|
+
"TextToSpeechLanguage": ".types",
|
|
353
|
+
"TextToSpeechModel": ".types",
|
|
354
|
+
"TextToSpeechOutputAudioCodec": ".types",
|
|
355
|
+
"TextToSpeechResponse": ".types",
|
|
356
|
+
"TextToSpeechResponseParams": ".requests",
|
|
357
|
+
"TextToSpeechSpeaker": ".types",
|
|
358
|
+
"TextToSpeechStreamingSendCompletionEvent": ".text_to_speech_streaming",
|
|
359
|
+
"TimestampsModel": ".types",
|
|
360
|
+
"TimestampsModelParams": ".requests",
|
|
361
|
+
"TooManyRequestsError": ".errors",
|
|
362
|
+
"TranscriptionMetrics": ".types",
|
|
363
|
+
"TranscriptionMetricsParams": ".requests",
|
|
364
|
+
"TranslateMode": ".types",
|
|
365
|
+
"TranslateModel": ".types",
|
|
366
|
+
"TranslateSourceLanguage": ".types",
|
|
367
|
+
"TranslateSpeakerGender": ".types",
|
|
368
|
+
"TranslateTargetLanguage": ".types",
|
|
369
|
+
"TranslationResponse": ".types",
|
|
370
|
+
"TranslationResponseParams": ".requests",
|
|
371
|
+
"TranslatiterateTargetLanguage": ".types",
|
|
372
|
+
"TransliterateMode": ".types",
|
|
373
|
+
"TransliterateSourceLanguage": ".types",
|
|
374
|
+
"TransliterationResponse": ".types",
|
|
375
|
+
"TransliterationResponseParams": ".requests",
|
|
376
|
+
"UnprocessableEntityError": ".errors",
|
|
377
|
+
"__version__": ".version",
|
|
378
|
+
"chat": ".chat",
|
|
379
|
+
"speech_to_text": ".speech_to_text",
|
|
380
|
+
"speech_to_text_job": ".speech_to_text_job",
|
|
381
|
+
"speech_to_text_streaming": ".speech_to_text_streaming",
|
|
382
|
+
"speech_to_text_translate_job": ".speech_to_text_translate_job",
|
|
383
|
+
"speech_to_text_translate_streaming": ".speech_to_text_translate_streaming",
|
|
384
|
+
"text": ".text",
|
|
385
|
+
"text_to_speech": ".text_to_speech",
|
|
386
|
+
"text_to_speech_streaming": ".text_to_speech_streaming",
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
391
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
392
|
+
if module_name is None:
|
|
393
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
394
|
+
try:
|
|
395
|
+
module = import_module(module_name, __package__)
|
|
396
|
+
if module_name == f".{attr_name}":
|
|
397
|
+
return module
|
|
398
|
+
else:
|
|
399
|
+
return getattr(module, attr_name)
|
|
400
|
+
except ImportError as e:
|
|
401
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
402
|
+
except AttributeError as e:
|
|
403
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
def __dir__():
|
|
407
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
408
|
+
return sorted(lazy_attrs)
|
|
409
|
+
|
|
202
410
|
|
|
203
411
|
__all__ = [
|
|
204
412
|
"AsyncSarvamAI",
|
|
205
413
|
"AudioData",
|
|
206
|
-
"AudioDataInputAudioCodec",
|
|
207
414
|
"AudioDataParams",
|
|
208
415
|
"AudioMessage",
|
|
209
416
|
"AudioMessageParams",
|
|
@@ -318,7 +525,6 @@ __all__ = [
|
|
|
318
525
|
"SpeechToTextResponseParams",
|
|
319
526
|
"SpeechToTextStreamingFlushSignal",
|
|
320
527
|
"SpeechToTextStreamingHighVadSensitivity",
|
|
321
|
-
"SpeechToTextStreamingInputAudioCodec",
|
|
322
528
|
"SpeechToTextStreamingLanguageCode",
|
|
323
529
|
"SpeechToTextStreamingResponse",
|
|
324
530
|
"SpeechToTextStreamingResponseParams",
|
|
@@ -335,7 +541,6 @@ __all__ = [
|
|
|
335
541
|
"SpeechToTextTranslateResponseParams",
|
|
336
542
|
"SpeechToTextTranslateStreamingFlushSignal",
|
|
337
543
|
"SpeechToTextTranslateStreamingHighVadSensitivity",
|
|
338
|
-
"SpeechToTextTranslateStreamingInputAudioCodec",
|
|
339
544
|
"SpeechToTextTranslateStreamingResponse",
|
|
340
545
|
"SpeechToTextTranslateStreamingResponseParams",
|
|
341
546
|
"SpeechToTextTranslateStreamingVadSignals",
|