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.
Files changed (56) hide show
  1. sarvamai/__init__.py +405 -200
  2. sarvamai/chat/raw_client.py +20 -20
  3. sarvamai/client.py +186 -34
  4. sarvamai/core/__init__.py +76 -21
  5. sarvamai/core/client_wrapper.py +19 -3
  6. sarvamai/core/force_multipart.py +4 -2
  7. sarvamai/core/http_client.py +217 -97
  8. sarvamai/core/http_response.py +1 -1
  9. sarvamai/core/http_sse/__init__.py +42 -0
  10. sarvamai/core/http_sse/_api.py +112 -0
  11. sarvamai/core/http_sse/_decoders.py +61 -0
  12. sarvamai/core/http_sse/_exceptions.py +7 -0
  13. sarvamai/core/http_sse/_models.py +17 -0
  14. sarvamai/core/jsonable_encoder.py +8 -0
  15. sarvamai/core/pydantic_utilities.py +110 -4
  16. sarvamai/errors/__init__.py +40 -6
  17. sarvamai/errors/bad_request_error.py +1 -1
  18. sarvamai/errors/forbidden_error.py +1 -1
  19. sarvamai/errors/internal_server_error.py +1 -1
  20. sarvamai/errors/service_unavailable_error.py +1 -1
  21. sarvamai/errors/too_many_requests_error.py +1 -1
  22. sarvamai/errors/unprocessable_entity_error.py +1 -1
  23. sarvamai/requests/__init__.py +150 -62
  24. sarvamai/requests/audio_data.py +0 -6
  25. sarvamai/requests/error_response_data.py +1 -1
  26. sarvamai/requests/file_signed_url_details.py +1 -1
  27. sarvamai/requests/speech_to_text_transcription_data.py +2 -2
  28. sarvamai/speech_to_text/raw_client.py +54 -52
  29. sarvamai/speech_to_text_job/raw_client.py +120 -120
  30. sarvamai/speech_to_text_streaming/__init__.py +38 -8
  31. sarvamai/speech_to_text_streaming/client.py +0 -13
  32. sarvamai/speech_to_text_streaming/raw_client.py +0 -13
  33. sarvamai/speech_to_text_streaming/types/__init__.py +36 -6
  34. sarvamai/speech_to_text_translate_job/raw_client.py +120 -120
  35. sarvamai/speech_to_text_translate_streaming/__init__.py +36 -7
  36. sarvamai/speech_to_text_translate_streaming/client.py +0 -13
  37. sarvamai/speech_to_text_translate_streaming/raw_client.py +0 -13
  38. sarvamai/speech_to_text_translate_streaming/types/__init__.py +36 -5
  39. sarvamai/text/client.py +0 -12
  40. sarvamai/text/raw_client.py +60 -72
  41. sarvamai/text_to_speech/client.py +18 -0
  42. sarvamai/text_to_speech/raw_client.py +38 -20
  43. sarvamai/text_to_speech_streaming/__init__.py +28 -1
  44. sarvamai/text_to_speech_streaming/types/__init__.py +30 -1
  45. sarvamai/types/__init__.py +222 -100
  46. sarvamai/types/audio_data.py +0 -6
  47. sarvamai/types/chat_completion_request_message.py +6 -2
  48. sarvamai/types/error_response_data.py +1 -1
  49. sarvamai/types/file_signed_url_details.py +1 -1
  50. sarvamai/types/speech_to_text_transcription_data.py +2 -2
  51. {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/METADATA +2 -1
  52. {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/RECORD +53 -51
  53. sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +0 -33
  54. sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +0 -33
  55. sarvamai/types/audio_data_input_audio_codec.py +0 -33
  56. {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
- from .types import (
6
- AudioData,
7
- AudioDataInputAudioCodec,
8
- AudioMessage,
9
- AudioOutput,
10
- AudioOutputData,
11
- BaseJobParameters,
12
- BulkJobCallback,
13
- BulkJobInitResponseV1,
14
- ChatCompletionRequestAssistantMessage,
15
- ChatCompletionRequestMessage,
16
- ChatCompletionRequestMessage_Assistant,
17
- ChatCompletionRequestMessage_System,
18
- ChatCompletionRequestMessage_User,
19
- ChatCompletionRequestSystemMessage,
20
- ChatCompletionRequestUserMessage,
21
- ChatCompletionResponseMessage,
22
- Choice,
23
- CompletionEventFlag,
24
- CompletionUsage,
25
- ConfigMessage,
26
- ConfigureConnection,
27
- ConfigureConnectionData,
28
- ConfigureConnectionDataOutputAudioBitrate,
29
- ConfigureConnectionDataOutputAudioCodec,
30
- ConfigureConnectionDataSpeaker,
31
- ConfigureConnectionDataTargetLanguageCode,
32
- ConnectionSampleRate,
33
- CreateChatCompletionResponse,
34
- DiarizedEntry,
35
- DiarizedTranscript,
36
- ErrorCode,
37
- ErrorData,
38
- ErrorDetails,
39
- ErrorMessage,
40
- ErrorResponse,
41
- ErrorResponseData,
42
- EventResponse,
43
- EventResponseData,
44
- EventsData,
45
- EventsDataSignalType,
46
- FileSignedUrlDetails,
47
- FilesDownloadResponse,
48
- FilesRequest,
49
- FilesUploadResponse,
50
- FinishReason,
51
- FlushSignal,
52
- InputAudioCodec,
53
- JobState,
54
- JobStatusV1Response,
55
- LanguageIdentificationResponse,
56
- NumeralsFormat,
57
- PingSignal,
58
- ReasoningEffort,
59
- ResponseType,
60
- Role,
61
- SarvamModelIds,
62
- SendText,
63
- SendTextData,
64
- SpeechSampleRate,
65
- SpeechToTextJobParameters,
66
- SpeechToTextLanguage,
67
- SpeechToTextModel,
68
- SpeechToTextResponse,
69
- SpeechToTextResponseData,
70
- SpeechToTextStreamingResponse,
71
- SpeechToTextTranscriptionData,
72
- SpeechToTextTranslateJobParameters,
73
- SpeechToTextTranslateLanguage,
74
- SpeechToTextTranslateModel,
75
- SpeechToTextTranslateResponse,
76
- SpeechToTextTranslateResponseData,
77
- SpeechToTextTranslateStreamingResponse,
78
- SpeechToTextTranslateTranscriptionData,
79
- SpokenFormNumeralsFormat,
80
- StopConfiguration,
81
- StorageContainerType,
82
- SttFlushSignal,
83
- TaskDetailV1,
84
- TaskFileDetails,
85
- TaskState,
86
- TextToSpeechLanguage,
87
- TextToSpeechModel,
88
- TextToSpeechOutputAudioCodec,
89
- TextToSpeechResponse,
90
- TextToSpeechSpeaker,
91
- TimestampsModel,
92
- TranscriptionMetrics,
93
- TranslateMode,
94
- TranslateModel,
95
- TranslateSourceLanguage,
96
- TranslateSpeakerGender,
97
- TranslateTargetLanguage,
98
- TranslationResponse,
99
- TranslatiterateTargetLanguage,
100
- TransliterateMode,
101
- TransliterateSourceLanguage,
102
- TransliterationResponse,
103
- )
104
- from .errors import (
105
- BadRequestError,
106
- ForbiddenError,
107
- InternalServerError,
108
- ServiceUnavailableError,
109
- TooManyRequestsError,
110
- UnprocessableEntityError,
111
- )
112
- from . import (
113
- chat,
114
- speech_to_text,
115
- speech_to_text_job,
116
- speech_to_text_streaming,
117
- speech_to_text_translate_job,
118
- speech_to_text_translate_streaming,
119
- text,
120
- text_to_speech,
121
- text_to_speech_streaming,
122
- )
123
- from .client import AsyncSarvamAI, SarvamAI
124
- from .environment import SarvamAIEnvironment
125
- from .requests import (
126
- AudioDataParams,
127
- AudioMessageParams,
128
- AudioOutputDataParams,
129
- AudioOutputParams,
130
- BaseJobParametersParams,
131
- BulkJobCallbackParams,
132
- BulkJobInitResponseV1Params,
133
- ChatCompletionRequestAssistantMessageParams,
134
- ChatCompletionRequestMessageParams,
135
- ChatCompletionRequestMessage_AssistantParams,
136
- ChatCompletionRequestMessage_SystemParams,
137
- ChatCompletionRequestMessage_UserParams,
138
- ChatCompletionRequestSystemMessageParams,
139
- ChatCompletionRequestUserMessageParams,
140
- ChatCompletionResponseMessageParams,
141
- ChoiceParams,
142
- CompletionUsageParams,
143
- ConfigMessageParams,
144
- ConfigureConnectionDataParams,
145
- ConfigureConnectionParams,
146
- CreateChatCompletionResponseParams,
147
- DiarizedEntryParams,
148
- DiarizedTranscriptParams,
149
- ErrorDataParams,
150
- ErrorDetailsParams,
151
- ErrorMessageParams,
152
- ErrorResponseDataParams,
153
- ErrorResponseParams,
154
- EventResponseDataParams,
155
- EventResponseParams,
156
- EventsDataParams,
157
- FileSignedUrlDetailsParams,
158
- FilesDownloadResponseParams,
159
- FilesRequestParams,
160
- FilesUploadResponseParams,
161
- FlushSignalParams,
162
- JobStatusV1ResponseParams,
163
- LanguageIdentificationResponseParams,
164
- PingSignalParams,
165
- SendTextDataParams,
166
- SendTextParams,
167
- SpeechToTextJobParametersParams,
168
- SpeechToTextResponseDataParams,
169
- SpeechToTextResponseParams,
170
- SpeechToTextStreamingResponseParams,
171
- SpeechToTextTranscriptionDataParams,
172
- SpeechToTextTranslateJobParametersParams,
173
- SpeechToTextTranslateResponseDataParams,
174
- SpeechToTextTranslateResponseParams,
175
- SpeechToTextTranslateStreamingResponseParams,
176
- SpeechToTextTranslateTranscriptionDataParams,
177
- StopConfigurationParams,
178
- SttFlushSignalParams,
179
- TaskDetailV1Params,
180
- TaskFileDetailsParams,
181
- TextToSpeechResponseParams,
182
- TimestampsModelParams,
183
- TranscriptionMetricsParams,
184
- TranslationResponseParams,
185
- TransliterationResponseParams,
186
- )
187
- from .speech_to_text_streaming import (
188
- SpeechToTextStreamingFlushSignal,
189
- SpeechToTextStreamingHighVadSensitivity,
190
- SpeechToTextStreamingInputAudioCodec,
191
- SpeechToTextStreamingLanguageCode,
192
- SpeechToTextStreamingVadSignals,
193
- )
194
- from .speech_to_text_translate_streaming import (
195
- SpeechToTextTranslateStreamingFlushSignal,
196
- SpeechToTextTranslateStreamingHighVadSensitivity,
197
- SpeechToTextTranslateStreamingInputAudioCodec,
198
- SpeechToTextTranslateStreamingVadSignals,
199
- )
200
- from .text_to_speech_streaming import TextToSpeechStreamingSendCompletionEvent
201
- from .version import __version__
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",