sarvamai 0.1.20a0__py3-none-any.whl → 0.1.20a1__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 (35) hide show
  1. sarvamai/__init__.py +20 -0
  2. sarvamai/core/client_wrapper.py +2 -2
  3. sarvamai/requests/__init__.py +4 -0
  4. sarvamai/requests/audio_data.py +13 -1
  5. sarvamai/requests/audio_output_data.py +0 -5
  6. sarvamai/requests/error_response_data.py +0 -5
  7. sarvamai/requests/event_response.py +19 -0
  8. sarvamai/requests/event_response_data.py +23 -0
  9. sarvamai/speech_to_text_streaming/__init__.py +2 -0
  10. sarvamai/speech_to_text_streaming/client.py +25 -0
  11. sarvamai/speech_to_text_streaming/raw_client.py +25 -0
  12. sarvamai/speech_to_text_streaming/types/__init__.py +2 -0
  13. sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +33 -0
  14. sarvamai/speech_to_text_translate_streaming/__init__.py +2 -0
  15. sarvamai/speech_to_text_translate_streaming/client.py +25 -0
  16. sarvamai/speech_to_text_translate_streaming/raw_client.py +25 -0
  17. sarvamai/speech_to_text_translate_streaming/types/__init__.py +2 -0
  18. sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +33 -0
  19. sarvamai/text_to_speech_streaming/__init__.py +3 -0
  20. sarvamai/text_to_speech_streaming/client.py +13 -0
  21. sarvamai/text_to_speech_streaming/raw_client.py +13 -0
  22. sarvamai/text_to_speech_streaming/types/__init__.py +7 -0
  23. sarvamai/text_to_speech_streaming/types/text_to_speech_streaming_send_completion_event.py +5 -0
  24. sarvamai/types/__init__.py +10 -0
  25. sarvamai/types/audio_data.py +13 -1
  26. sarvamai/types/audio_data_input_audio_codec.py +33 -0
  27. sarvamai/types/audio_output_data.py +0 -5
  28. sarvamai/types/completion_event_flag.py +5 -0
  29. sarvamai/types/connection_sample_rate.py +3 -0
  30. sarvamai/types/error_response_data.py +0 -5
  31. sarvamai/types/event_response.py +29 -0
  32. sarvamai/types/event_response_data.py +33 -0
  33. {sarvamai-0.1.20a0.dist-info → sarvamai-0.1.20a1.dist-info}/METADATA +1 -1
  34. {sarvamai-0.1.20a0.dist-info → sarvamai-0.1.20a1.dist-info}/RECORD +35 -24
  35. {sarvamai-0.1.20a0.dist-info → sarvamai-0.1.20a1.dist-info}/WHEEL +0 -0
sarvamai/__init__.py CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  from .types import (
6
6
  AudioData,
7
+ AudioDataInputAudioCodec,
7
8
  AudioMessage,
8
9
  AudioOutput,
9
10
  AudioOutputData,
@@ -19,6 +20,7 @@ from .types import (
19
20
  ChatCompletionRequestUserMessage,
20
21
  ChatCompletionResponseMessage,
21
22
  Choice,
23
+ CompletionEventFlag,
22
24
  CompletionUsage,
23
25
  ConfigMessage,
24
26
  ConfigureConnection,
@@ -27,6 +29,7 @@ from .types import (
27
29
  ConfigureConnectionDataOutputAudioCodec,
28
30
  ConfigureConnectionDataSpeaker,
29
31
  ConfigureConnectionDataTargetLanguageCode,
32
+ ConnectionSampleRate,
30
33
  CreateChatCompletionResponse,
31
34
  DiarizedEntry,
32
35
  DiarizedTranscript,
@@ -36,6 +39,8 @@ from .types import (
36
39
  ErrorMessage,
37
40
  ErrorResponse,
38
41
  ErrorResponseData,
42
+ EventResponse,
43
+ EventResponseData,
39
44
  EventsData,
40
45
  EventsDataSignalType,
41
46
  FileSignedUrlDetails,
@@ -146,6 +151,8 @@ from .requests import (
146
151
  ErrorMessageParams,
147
152
  ErrorResponseDataParams,
148
153
  ErrorResponseParams,
154
+ EventResponseDataParams,
155
+ EventResponseParams,
149
156
  EventsDataParams,
150
157
  FileSignedUrlDetailsParams,
151
158
  FilesDownloadResponseParams,
@@ -180,6 +187,7 @@ from .requests import (
180
187
  from .speech_to_text_streaming import (
181
188
  SpeechToTextStreamingFlushSignal,
182
189
  SpeechToTextStreamingHighVadSensitivity,
190
+ SpeechToTextStreamingInputAudioCodec,
183
191
  SpeechToTextStreamingLanguageCode,
184
192
  SpeechToTextStreamingModel,
185
193
  SpeechToTextStreamingVadSignals,
@@ -187,14 +195,17 @@ from .speech_to_text_streaming import (
187
195
  from .speech_to_text_translate_streaming import (
188
196
  SpeechToTextTranslateStreamingFlushSignal,
189
197
  SpeechToTextTranslateStreamingHighVadSensitivity,
198
+ SpeechToTextTranslateStreamingInputAudioCodec,
190
199
  SpeechToTextTranslateStreamingModel,
191
200
  SpeechToTextTranslateStreamingVadSignals,
192
201
  )
202
+ from .text_to_speech_streaming import TextToSpeechStreamingSendCompletionEvent
193
203
  from .version import __version__
194
204
 
195
205
  __all__ = [
196
206
  "AsyncSarvamAI",
197
207
  "AudioData",
208
+ "AudioDataInputAudioCodec",
198
209
  "AudioDataParams",
199
210
  "AudioMessage",
200
211
  "AudioMessageParams",
@@ -227,6 +238,7 @@ __all__ = [
227
238
  "ChatCompletionResponseMessageParams",
228
239
  "Choice",
229
240
  "ChoiceParams",
241
+ "CompletionEventFlag",
230
242
  "CompletionUsage",
231
243
  "CompletionUsageParams",
232
244
  "ConfigMessage",
@@ -239,6 +251,7 @@ __all__ = [
239
251
  "ConfigureConnectionDataSpeaker",
240
252
  "ConfigureConnectionDataTargetLanguageCode",
241
253
  "ConfigureConnectionParams",
254
+ "ConnectionSampleRate",
242
255
  "CreateChatCompletionResponse",
243
256
  "CreateChatCompletionResponseParams",
244
257
  "DiarizedEntry",
@@ -256,6 +269,10 @@ __all__ = [
256
269
  "ErrorResponseData",
257
270
  "ErrorResponseDataParams",
258
271
  "ErrorResponseParams",
272
+ "EventResponse",
273
+ "EventResponseData",
274
+ "EventResponseDataParams",
275
+ "EventResponseParams",
259
276
  "EventsData",
260
277
  "EventsDataParams",
261
278
  "EventsDataSignalType",
@@ -303,6 +320,7 @@ __all__ = [
303
320
  "SpeechToTextResponseParams",
304
321
  "SpeechToTextStreamingFlushSignal",
305
322
  "SpeechToTextStreamingHighVadSensitivity",
323
+ "SpeechToTextStreamingInputAudioCodec",
306
324
  "SpeechToTextStreamingLanguageCode",
307
325
  "SpeechToTextStreamingModel",
308
326
  "SpeechToTextStreamingResponse",
@@ -320,6 +338,7 @@ __all__ = [
320
338
  "SpeechToTextTranslateResponseParams",
321
339
  "SpeechToTextTranslateStreamingFlushSignal",
322
340
  "SpeechToTextTranslateStreamingHighVadSensitivity",
341
+ "SpeechToTextTranslateStreamingInputAudioCodec",
323
342
  "SpeechToTextTranslateStreamingModel",
324
343
  "SpeechToTextTranslateStreamingResponse",
325
344
  "SpeechToTextTranslateStreamingResponseParams",
@@ -343,6 +362,7 @@ __all__ = [
343
362
  "TextToSpeechResponse",
344
363
  "TextToSpeechResponseParams",
345
364
  "TextToSpeechSpeaker",
365
+ "TextToSpeechStreamingSendCompletionEvent",
346
366
  "TimestampsModel",
347
367
  "TimestampsModelParams",
348
368
  "TooManyRequestsError",
@@ -23,10 +23,10 @@ class BaseClientWrapper:
23
23
 
24
24
  def get_headers(self) -> typing.Dict[str, str]:
25
25
  headers: typing.Dict[str, str] = {
26
- "User-Agent": "sarvamai/0.1.20a0",
26
+ "User-Agent": "sarvamai/0.1.20a1",
27
27
  "X-Fern-Language": "Python",
28
28
  "X-Fern-SDK-Name": "sarvamai",
29
- "X-Fern-SDK-Version": "0.1.20a0",
29
+ "X-Fern-SDK-Version": "0.1.20a1",
30
30
  **(self.get_custom_headers() or {}),
31
31
  }
32
32
  headers["api-subscription-key"] = self.api_subscription_key
@@ -32,6 +32,8 @@ from .error_details import ErrorDetailsParams
32
32
  from .error_message import ErrorMessageParams
33
33
  from .error_response import ErrorResponseParams
34
34
  from .error_response_data import ErrorResponseDataParams
35
+ from .event_response import EventResponseParams
36
+ from .event_response_data import EventResponseDataParams
35
37
  from .events_data import EventsDataParams
36
38
  from .file_signed_url_details import FileSignedUrlDetailsParams
37
39
  from .files_download_response import FilesDownloadResponseParams
@@ -92,6 +94,8 @@ __all__ = [
92
94
  "ErrorMessageParams",
93
95
  "ErrorResponseDataParams",
94
96
  "ErrorResponseParams",
97
+ "EventResponseDataParams",
98
+ "EventResponseParams",
95
99
  "EventsDataParams",
96
100
  "FileSignedUrlDetailsParams",
97
101
  "FilesDownloadResponseParams",
@@ -3,6 +3,7 @@
3
3
  import typing
4
4
 
5
5
  import typing_extensions
6
+ from ..types.audio_data_input_audio_codec import AudioDataInputAudioCodec
6
7
 
7
8
 
8
9
  class AudioDataParams(typing_extensions.TypedDict):
@@ -13,10 +14,21 @@ class AudioDataParams(typing_extensions.TypedDict):
13
14
 
14
15
  sample_rate: int
15
16
  """
16
- Audio sample rate in Hz (16kHz preferred, 8kHz least preferred)
17
+ Audio sample rate in Hz for individual audio messages.
18
+
19
+ **Backward Compatibility**: This property is maintained for legacy support.
20
+ **Recommended**: Use the connection-level sample_rate parameter instead.
21
+ **Note**: 8kHz is only supported via connection parameter, not in AudioData messages.
22
+
23
+ Supported values: 16kHz (preferred), 22.05kHz, 24kHz
17
24
  """
18
25
 
19
26
  encoding: typing.Literal["audio/wav"]
20
27
  """
21
28
  Audio encoding format
22
29
  """
30
+
31
+ input_audio_codec: typing_extensions.NotRequired[AudioDataInputAudioCodec]
32
+ """
33
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
34
+ """
@@ -13,8 +13,3 @@ class AudioOutputDataParams(typing_extensions.TypedDict):
13
13
  """
14
14
  Base64-encoded audio data ready for playback or download
15
15
  """
16
-
17
- request_id: typing_extensions.NotRequired[str]
18
- """
19
- Unique identifier for the request
20
- """
@@ -16,8 +16,3 @@ class ErrorResponseDataParams(typing_extensions.TypedDict):
16
16
  """
17
17
  Additional error details and context information
18
18
  """
19
-
20
- request_id: typing_extensions.NotRequired[str]
21
- """
22
- Unique identifier for the request
23
- """
@@ -0,0 +1,19 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import typing_extensions
6
+ from .event_response_data import EventResponseDataParams
7
+
8
+
9
+ class EventResponseParams(typing_extensions.TypedDict):
10
+ """
11
+ Event notification message sent when specific events occur during TTS processing
12
+ """
13
+
14
+ type: typing.Literal["event"]
15
+ """
16
+ Message type identifier for events
17
+ """
18
+
19
+ data: EventResponseDataParams
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import typing_extensions
7
+
8
+
9
+ class EventResponseDataParams(typing_extensions.TypedDict):
10
+ event_type: typing.Literal["final"]
11
+ """
12
+ Type of event that occurred
13
+ """
14
+
15
+ message: typing_extensions.NotRequired[str]
16
+ """
17
+ Human-readable description of the event
18
+ """
19
+
20
+ timestamp: typing_extensions.NotRequired[dt.datetime]
21
+ """
22
+ ISO 8601 timestamp when the event occurred
23
+ """
@@ -5,6 +5,7 @@
5
5
  from .types import (
6
6
  SpeechToTextStreamingFlushSignal,
7
7
  SpeechToTextStreamingHighVadSensitivity,
8
+ SpeechToTextStreamingInputAudioCodec,
8
9
  SpeechToTextStreamingLanguageCode,
9
10
  SpeechToTextStreamingModel,
10
11
  SpeechToTextStreamingVadSignals,
@@ -13,6 +14,7 @@ from .types import (
13
14
  __all__ = [
14
15
  "SpeechToTextStreamingFlushSignal",
15
16
  "SpeechToTextStreamingHighVadSensitivity",
17
+ "SpeechToTextStreamingInputAudioCodec",
16
18
  "SpeechToTextStreamingLanguageCode",
17
19
  "SpeechToTextStreamingModel",
18
20
  "SpeechToTextStreamingVadSignals",
@@ -13,6 +13,7 @@ from .raw_client import AsyncRawSpeechToTextStreamingClient, RawSpeechToTextStre
13
13
  from .socket_client import AsyncSpeechToTextStreamingSocketClient, SpeechToTextStreamingSocketClient
14
14
  from .types.speech_to_text_streaming_flush_signal import SpeechToTextStreamingFlushSignal
15
15
  from .types.speech_to_text_streaming_high_vad_sensitivity import SpeechToTextStreamingHighVadSensitivity
16
+ from .types.speech_to_text_streaming_input_audio_codec import SpeechToTextStreamingInputAudioCodec
16
17
  from .types.speech_to_text_streaming_language_code import SpeechToTextStreamingLanguageCode
17
18
  from .types.speech_to_text_streaming_model import SpeechToTextStreamingModel
18
19
  from .types.speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignals
@@ -44,6 +45,8 @@ class SpeechToTextStreamingClient:
44
45
  *,
45
46
  language_code: SpeechToTextStreamingLanguageCode,
46
47
  model: typing.Optional[SpeechToTextStreamingModel] = None,
48
+ input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
49
+ sample_rate: typing.Optional[str] = None,
47
50
  high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
48
51
  vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
49
52
  flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
@@ -61,6 +64,12 @@ class SpeechToTextStreamingClient:
61
64
  model : typing.Optional[SpeechToTextStreamingModel]
62
65
  Speech to text model to use
63
66
 
67
+ input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
68
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
69
+
70
+ sample_rate : typing.Optional[str]
71
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
72
+
64
73
  high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
65
74
  Enable high VAD (Voice Activity Detection) sensitivity
66
75
 
@@ -86,6 +95,10 @@ class SpeechToTextStreamingClient:
86
95
  query_params = query_params.add("language-code", language_code)
87
96
  if model is not None:
88
97
  query_params = query_params.add("model", model)
98
+ if input_audio_codec is not None:
99
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
100
+ if sample_rate is not None:
101
+ query_params = query_params.add("sample_rate", sample_rate)
89
102
  if high_vad_sensitivity is not None:
90
103
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
91
104
  if vad_signals is not None:
@@ -137,6 +150,8 @@ class AsyncSpeechToTextStreamingClient:
137
150
  *,
138
151
  language_code: SpeechToTextStreamingLanguageCode,
139
152
  model: typing.Optional[SpeechToTextStreamingModel] = None,
153
+ input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
154
+ sample_rate: typing.Optional[str] = None,
140
155
  high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
141
156
  vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
142
157
  flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
@@ -154,6 +169,12 @@ class AsyncSpeechToTextStreamingClient:
154
169
  model : typing.Optional[SpeechToTextStreamingModel]
155
170
  Speech to text model to use
156
171
 
172
+ input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
173
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
174
+
175
+ sample_rate : typing.Optional[str]
176
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
177
+
157
178
  high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
158
179
  Enable high VAD (Voice Activity Detection) sensitivity
159
180
 
@@ -179,6 +200,10 @@ class AsyncSpeechToTextStreamingClient:
179
200
  query_params = query_params.add("language-code", language_code)
180
201
  if model is not None:
181
202
  query_params = query_params.add("model", model)
203
+ if input_audio_codec is not None:
204
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
205
+ if sample_rate is not None:
206
+ query_params = query_params.add("sample_rate", sample_rate)
182
207
  if high_vad_sensitivity is not None:
183
208
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
184
209
  if vad_signals is not None:
@@ -12,6 +12,7 @@ from ..core.request_options import RequestOptions
12
12
  from .socket_client import AsyncSpeechToTextStreamingSocketClient, SpeechToTextStreamingSocketClient
13
13
  from .types.speech_to_text_streaming_flush_signal import SpeechToTextStreamingFlushSignal
14
14
  from .types.speech_to_text_streaming_high_vad_sensitivity import SpeechToTextStreamingHighVadSensitivity
15
+ from .types.speech_to_text_streaming_input_audio_codec import SpeechToTextStreamingInputAudioCodec
15
16
  from .types.speech_to_text_streaming_language_code import SpeechToTextStreamingLanguageCode
16
17
  from .types.speech_to_text_streaming_model import SpeechToTextStreamingModel
17
18
  from .types.speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignals
@@ -32,6 +33,8 @@ class RawSpeechToTextStreamingClient:
32
33
  *,
33
34
  language_code: SpeechToTextStreamingLanguageCode,
34
35
  model: typing.Optional[SpeechToTextStreamingModel] = None,
36
+ input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
37
+ sample_rate: typing.Optional[str] = None,
35
38
  high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
36
39
  vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
37
40
  flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
@@ -49,6 +52,12 @@ class RawSpeechToTextStreamingClient:
49
52
  model : typing.Optional[SpeechToTextStreamingModel]
50
53
  Speech to text model to use
51
54
 
55
+ input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
56
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
57
+
58
+ sample_rate : typing.Optional[str]
59
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
60
+
52
61
  high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
53
62
  Enable high VAD (Voice Activity Detection) sensitivity
54
63
 
@@ -74,6 +83,10 @@ class RawSpeechToTextStreamingClient:
74
83
  query_params = query_params.add("language-code", language_code)
75
84
  if model is not None:
76
85
  query_params = query_params.add("model", model)
86
+ if input_audio_codec is not None:
87
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
88
+ if sample_rate is not None:
89
+ query_params = query_params.add("sample_rate", sample_rate)
77
90
  if high_vad_sensitivity is not None:
78
91
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
79
92
  if vad_signals is not None:
@@ -114,6 +127,8 @@ class AsyncRawSpeechToTextStreamingClient:
114
127
  *,
115
128
  language_code: SpeechToTextStreamingLanguageCode,
116
129
  model: typing.Optional[SpeechToTextStreamingModel] = None,
130
+ input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
131
+ sample_rate: typing.Optional[str] = None,
117
132
  high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
118
133
  vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
119
134
  flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
@@ -131,6 +146,12 @@ class AsyncRawSpeechToTextStreamingClient:
131
146
  model : typing.Optional[SpeechToTextStreamingModel]
132
147
  Speech to text model to use
133
148
 
149
+ input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
150
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
151
+
152
+ sample_rate : typing.Optional[str]
153
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
154
+
134
155
  high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
135
156
  Enable high VAD (Voice Activity Detection) sensitivity
136
157
 
@@ -156,6 +177,10 @@ class AsyncRawSpeechToTextStreamingClient:
156
177
  query_params = query_params.add("language-code", language_code)
157
178
  if model is not None:
158
179
  query_params = query_params.add("model", model)
180
+ if input_audio_codec is not None:
181
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
182
+ if sample_rate is not None:
183
+ query_params = query_params.add("sample_rate", sample_rate)
159
184
  if high_vad_sensitivity is not None:
160
185
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
161
186
  if vad_signals is not None:
@@ -4,6 +4,7 @@
4
4
 
5
5
  from .speech_to_text_streaming_flush_signal import SpeechToTextStreamingFlushSignal
6
6
  from .speech_to_text_streaming_high_vad_sensitivity import SpeechToTextStreamingHighVadSensitivity
7
+ from .speech_to_text_streaming_input_audio_codec import SpeechToTextStreamingInputAudioCodec
7
8
  from .speech_to_text_streaming_language_code import SpeechToTextStreamingLanguageCode
8
9
  from .speech_to_text_streaming_model import SpeechToTextStreamingModel
9
10
  from .speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignals
@@ -11,6 +12,7 @@ from .speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignal
11
12
  __all__ = [
12
13
  "SpeechToTextStreamingFlushSignal",
13
14
  "SpeechToTextStreamingHighVadSensitivity",
15
+ "SpeechToTextStreamingInputAudioCodec",
14
16
  "SpeechToTextStreamingLanguageCode",
15
17
  "SpeechToTextStreamingModel",
16
18
  "SpeechToTextStreamingVadSignals",
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ SpeechToTextStreamingInputAudioCodec = typing.Union[
6
+ typing.Literal[
7
+ "wav",
8
+ "x-wav",
9
+ "wave",
10
+ "mp3",
11
+ "mpeg",
12
+ "mpeg3",
13
+ "x-mp3",
14
+ "x-mpeg-3",
15
+ "aac",
16
+ "x-aac",
17
+ "aiff",
18
+ "x-aiff",
19
+ "ogg",
20
+ "opus",
21
+ "flac",
22
+ "x-flac",
23
+ "mp4",
24
+ "x-m4a",
25
+ "amr",
26
+ "x-ms-wma",
27
+ "webm",
28
+ "pcm_s16le",
29
+ "pcm_l16",
30
+ "pcm_raw",
31
+ ],
32
+ typing.Any,
33
+ ]
@@ -5,6 +5,7 @@
5
5
  from .types import (
6
6
  SpeechToTextTranslateStreamingFlushSignal,
7
7
  SpeechToTextTranslateStreamingHighVadSensitivity,
8
+ SpeechToTextTranslateStreamingInputAudioCodec,
8
9
  SpeechToTextTranslateStreamingModel,
9
10
  SpeechToTextTranslateStreamingVadSignals,
10
11
  )
@@ -12,6 +13,7 @@ from .types import (
12
13
  __all__ = [
13
14
  "SpeechToTextTranslateStreamingFlushSignal",
14
15
  "SpeechToTextTranslateStreamingHighVadSensitivity",
16
+ "SpeechToTextTranslateStreamingInputAudioCodec",
15
17
  "SpeechToTextTranslateStreamingModel",
16
18
  "SpeechToTextTranslateStreamingVadSignals",
17
19
  ]
@@ -15,6 +15,7 @@ from .types.speech_to_text_translate_streaming_flush_signal import SpeechToTextT
15
15
  from .types.speech_to_text_translate_streaming_high_vad_sensitivity import (
16
16
  SpeechToTextTranslateStreamingHighVadSensitivity,
17
17
  )
18
+ from .types.speech_to_text_translate_streaming_input_audio_codec import SpeechToTextTranslateStreamingInputAudioCodec
18
19
  from .types.speech_to_text_translate_streaming_model import SpeechToTextTranslateStreamingModel
19
20
  from .types.speech_to_text_translate_streaming_vad_signals import SpeechToTextTranslateStreamingVadSignals
20
21
 
@@ -44,6 +45,8 @@ class SpeechToTextTranslateStreamingClient:
44
45
  self,
45
46
  *,
46
47
  model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
48
+ input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
49
+ sample_rate: typing.Optional[str] = None,
47
50
  high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
48
51
  vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
49
52
  flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
@@ -58,6 +61,12 @@ class SpeechToTextTranslateStreamingClient:
58
61
  model : typing.Optional[SpeechToTextTranslateStreamingModel]
59
62
  Speech to text model to use (defaults to "saaras:v2.5" if not specified)
60
63
 
64
+ input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
65
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
66
+
67
+ sample_rate : typing.Optional[str]
68
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
69
+
61
70
  high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
62
71
  Enable high VAD (Voice Activity Detection) sensitivity
63
72
 
@@ -81,6 +90,10 @@ class SpeechToTextTranslateStreamingClient:
81
90
  query_params = httpx.QueryParams()
82
91
  if model is not None:
83
92
  query_params = query_params.add("model", model)
93
+ if input_audio_codec is not None:
94
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
95
+ if sample_rate is not None:
96
+ query_params = query_params.add("sample_rate", sample_rate)
84
97
  if high_vad_sensitivity is not None:
85
98
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
86
99
  if vad_signals is not None:
@@ -131,6 +144,8 @@ class AsyncSpeechToTextTranslateStreamingClient:
131
144
  self,
132
145
  *,
133
146
  model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
147
+ input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
148
+ sample_rate: typing.Optional[str] = None,
134
149
  high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
135
150
  vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
136
151
  flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
@@ -145,6 +160,12 @@ class AsyncSpeechToTextTranslateStreamingClient:
145
160
  model : typing.Optional[SpeechToTextTranslateStreamingModel]
146
161
  Speech to text model to use (defaults to "saaras:v2.5" if not specified)
147
162
 
163
+ input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
164
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
165
+
166
+ sample_rate : typing.Optional[str]
167
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
168
+
148
169
  high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
149
170
  Enable high VAD (Voice Activity Detection) sensitivity
150
171
 
@@ -168,6 +189,10 @@ class AsyncSpeechToTextTranslateStreamingClient:
168
189
  query_params = httpx.QueryParams()
169
190
  if model is not None:
170
191
  query_params = query_params.add("model", model)
192
+ if input_audio_codec is not None:
193
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
194
+ if sample_rate is not None:
195
+ query_params = query_params.add("sample_rate", sample_rate)
171
196
  if high_vad_sensitivity is not None:
172
197
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
173
198
  if vad_signals is not None:
@@ -14,6 +14,7 @@ from .types.speech_to_text_translate_streaming_flush_signal import SpeechToTextT
14
14
  from .types.speech_to_text_translate_streaming_high_vad_sensitivity import (
15
15
  SpeechToTextTranslateStreamingHighVadSensitivity,
16
16
  )
17
+ from .types.speech_to_text_translate_streaming_input_audio_codec import SpeechToTextTranslateStreamingInputAudioCodec
17
18
  from .types.speech_to_text_translate_streaming_model import SpeechToTextTranslateStreamingModel
18
19
  from .types.speech_to_text_translate_streaming_vad_signals import SpeechToTextTranslateStreamingVadSignals
19
20
 
@@ -32,6 +33,8 @@ class RawSpeechToTextTranslateStreamingClient:
32
33
  self,
33
34
  *,
34
35
  model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
36
+ input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
37
+ sample_rate: typing.Optional[str] = None,
35
38
  high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
36
39
  vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
37
40
  flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
@@ -46,6 +49,12 @@ class RawSpeechToTextTranslateStreamingClient:
46
49
  model : typing.Optional[SpeechToTextTranslateStreamingModel]
47
50
  Speech to text model to use (defaults to "saaras:v2.5" if not specified)
48
51
 
52
+ input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
53
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
54
+
55
+ sample_rate : typing.Optional[str]
56
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
57
+
49
58
  high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
50
59
  Enable high VAD (Voice Activity Detection) sensitivity
51
60
 
@@ -69,6 +78,10 @@ class RawSpeechToTextTranslateStreamingClient:
69
78
  query_params = httpx.QueryParams()
70
79
  if model is not None:
71
80
  query_params = query_params.add("model", model)
81
+ if input_audio_codec is not None:
82
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
83
+ if sample_rate is not None:
84
+ query_params = query_params.add("sample_rate", sample_rate)
72
85
  if high_vad_sensitivity is not None:
73
86
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
74
87
  if vad_signals is not None:
@@ -108,6 +121,8 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
108
121
  self,
109
122
  *,
110
123
  model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
124
+ input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
125
+ sample_rate: typing.Optional[str] = None,
111
126
  high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
112
127
  vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
113
128
  flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
@@ -122,6 +137,12 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
122
137
  model : typing.Optional[SpeechToTextTranslateStreamingModel]
123
138
  Speech to text model to use (defaults to "saaras:v2.5" if not specified)
124
139
 
140
+ input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
141
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
142
+
143
+ sample_rate : typing.Optional[str]
144
+ Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
145
+
125
146
  high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
126
147
  Enable high VAD (Voice Activity Detection) sensitivity
127
148
 
@@ -145,6 +166,10 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
145
166
  query_params = httpx.QueryParams()
146
167
  if model is not None:
147
168
  query_params = query_params.add("model", model)
169
+ if input_audio_codec is not None:
170
+ query_params = query_params.add("input_audio_codec", input_audio_codec)
171
+ if sample_rate is not None:
172
+ query_params = query_params.add("sample_rate", sample_rate)
148
173
  if high_vad_sensitivity is not None:
149
174
  query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
150
175
  if vad_signals is not None:
@@ -4,12 +4,14 @@
4
4
 
5
5
  from .speech_to_text_translate_streaming_flush_signal import SpeechToTextTranslateStreamingFlushSignal
6
6
  from .speech_to_text_translate_streaming_high_vad_sensitivity import SpeechToTextTranslateStreamingHighVadSensitivity
7
+ from .speech_to_text_translate_streaming_input_audio_codec import SpeechToTextTranslateStreamingInputAudioCodec
7
8
  from .speech_to_text_translate_streaming_model import SpeechToTextTranslateStreamingModel
8
9
  from .speech_to_text_translate_streaming_vad_signals import SpeechToTextTranslateStreamingVadSignals
9
10
 
10
11
  __all__ = [
11
12
  "SpeechToTextTranslateStreamingFlushSignal",
12
13
  "SpeechToTextTranslateStreamingHighVadSensitivity",
14
+ "SpeechToTextTranslateStreamingInputAudioCodec",
13
15
  "SpeechToTextTranslateStreamingModel",
14
16
  "SpeechToTextTranslateStreamingVadSignals",
15
17
  ]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ SpeechToTextTranslateStreamingInputAudioCodec = typing.Union[
6
+ typing.Literal[
7
+ "wav",
8
+ "x-wav",
9
+ "wave",
10
+ "mp3",
11
+ "mpeg",
12
+ "mpeg3",
13
+ "x-mp3",
14
+ "x-mpeg-3",
15
+ "aac",
16
+ "x-aac",
17
+ "aiff",
18
+ "x-aiff",
19
+ "ogg",
20
+ "opus",
21
+ "flac",
22
+ "x-flac",
23
+ "mp4",
24
+ "x-m4a",
25
+ "amr",
26
+ "x-ms-wma",
27
+ "webm",
28
+ "pcm_s16le",
29
+ "pcm_l16",
30
+ "pcm_raw",
31
+ ],
32
+ typing.Any,
33
+ ]
@@ -2,3 +2,6 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
+ from .types import TextToSpeechStreamingSendCompletionEvent
6
+
7
+ __all__ = ["TextToSpeechStreamingSendCompletionEvent"]
@@ -11,6 +11,7 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
11
11
  from ..core.request_options import RequestOptions
12
12
  from .raw_client import AsyncRawTextToSpeechStreamingClient, RawTextToSpeechStreamingClient
13
13
  from .socket_client import AsyncTextToSpeechStreamingSocketClient, TextToSpeechStreamingSocketClient
14
+ from .types.text_to_speech_streaming_send_completion_event import TextToSpeechStreamingSendCompletionEvent
14
15
 
15
16
  try:
16
17
  from websockets.legacy.client import connect as websockets_client_connect # type: ignore
@@ -38,6 +39,7 @@ class TextToSpeechStreamingClient:
38
39
  self,
39
40
  *,
40
41
  model: typing.Optional[typing.Literal["bulbul:v2"]] = None,
42
+ send_completion_event: typing.Optional[TextToSpeechStreamingSendCompletionEvent] = None,
41
43
  api_subscription_key: typing.Optional[str] = None,
42
44
  request_options: typing.Optional[RequestOptions] = None,
43
45
  ) -> typing.Iterator[TextToSpeechStreamingSocketClient]:
@@ -50,6 +52,9 @@ class TextToSpeechStreamingClient:
50
52
  model : typing.Optional[typing.Literal["bulbul:v2"]]
51
53
  Text to speech model to use
52
54
 
55
+ send_completion_event : typing.Optional[TextToSpeechStreamingSendCompletionEvent]
56
+ Enable completion event notifications when TTS generation finishes. When set to true, an event message will be sent when the final audio chunk has been generated.
57
+
53
58
  api_subscription_key : typing.Optional[str]
54
59
  API subscription key for authentication
55
60
 
@@ -64,6 +69,8 @@ class TextToSpeechStreamingClient:
64
69
  query_params = httpx.QueryParams()
65
70
  if model is not None:
66
71
  query_params = query_params.add("model", model)
72
+ if send_completion_event is not None:
73
+ query_params = query_params.add("send_completion_event", send_completion_event)
67
74
  ws_url = ws_url + f"?{query_params}"
68
75
  headers = self._raw_client._client_wrapper.get_headers()
69
76
  if api_subscription_key is not None:
@@ -108,6 +115,7 @@ class AsyncTextToSpeechStreamingClient:
108
115
  self,
109
116
  *,
110
117
  model: typing.Optional[typing.Literal["bulbul:v2"]] = None,
118
+ send_completion_event: typing.Optional[TextToSpeechStreamingSendCompletionEvent] = None,
111
119
  api_subscription_key: typing.Optional[str] = None,
112
120
  request_options: typing.Optional[RequestOptions] = None,
113
121
  ) -> typing.AsyncIterator[AsyncTextToSpeechStreamingSocketClient]:
@@ -120,6 +128,9 @@ class AsyncTextToSpeechStreamingClient:
120
128
  model : typing.Optional[typing.Literal["bulbul:v2"]]
121
129
  Text to speech model to use
122
130
 
131
+ send_completion_event : typing.Optional[TextToSpeechStreamingSendCompletionEvent]
132
+ Enable completion event notifications when TTS generation finishes. When set to true, an event message will be sent when the final audio chunk has been generated.
133
+
123
134
  api_subscription_key : typing.Optional[str]
124
135
  API subscription key for authentication
125
136
 
@@ -134,6 +145,8 @@ class AsyncTextToSpeechStreamingClient:
134
145
  query_params = httpx.QueryParams()
135
146
  if model is not None:
136
147
  query_params = query_params.add("model", model)
148
+ if send_completion_event is not None:
149
+ query_params = query_params.add("send_completion_event", send_completion_event)
137
150
  ws_url = ws_url + f"?{query_params}"
138
151
  headers = self._raw_client._client_wrapper.get_headers()
139
152
  if api_subscription_key is not None:
@@ -10,6 +10,7 @@ from ..core.api_error import ApiError
10
10
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
11
11
  from ..core.request_options import RequestOptions
12
12
  from .socket_client import AsyncTextToSpeechStreamingSocketClient, TextToSpeechStreamingSocketClient
13
+ from .types.text_to_speech_streaming_send_completion_event import TextToSpeechStreamingSendCompletionEvent
13
14
 
14
15
  try:
15
16
  from websockets.legacy.client import connect as websockets_client_connect # type: ignore
@@ -26,6 +27,7 @@ class RawTextToSpeechStreamingClient:
26
27
  self,
27
28
  *,
28
29
  model: typing.Optional[typing.Literal["bulbul:v2"]] = None,
30
+ send_completion_event: typing.Optional[TextToSpeechStreamingSendCompletionEvent] = None,
29
31
  api_subscription_key: typing.Optional[str] = None,
30
32
  request_options: typing.Optional[RequestOptions] = None,
31
33
  ) -> typing.Iterator[TextToSpeechStreamingSocketClient]:
@@ -38,6 +40,9 @@ class RawTextToSpeechStreamingClient:
38
40
  model : typing.Optional[typing.Literal["bulbul:v2"]]
39
41
  Text to speech model to use
40
42
 
43
+ send_completion_event : typing.Optional[TextToSpeechStreamingSendCompletionEvent]
44
+ Enable completion event notifications when TTS generation finishes. When set to true, an event message will be sent when the final audio chunk has been generated.
45
+
41
46
  api_subscription_key : typing.Optional[str]
42
47
  API subscription key for authentication
43
48
 
@@ -52,6 +57,8 @@ class RawTextToSpeechStreamingClient:
52
57
  query_params = httpx.QueryParams()
53
58
  if model is not None:
54
59
  query_params = query_params.add("model", model)
60
+ if send_completion_event is not None:
61
+ query_params = query_params.add("send_completion_event", send_completion_event)
55
62
  ws_url = ws_url + f"?{query_params}"
56
63
  headers = self._client_wrapper.get_headers()
57
64
  if api_subscription_key is not None:
@@ -85,6 +92,7 @@ class AsyncRawTextToSpeechStreamingClient:
85
92
  self,
86
93
  *,
87
94
  model: typing.Optional[typing.Literal["bulbul:v2"]] = None,
95
+ send_completion_event: typing.Optional[TextToSpeechStreamingSendCompletionEvent] = None,
88
96
  api_subscription_key: typing.Optional[str] = None,
89
97
  request_options: typing.Optional[RequestOptions] = None,
90
98
  ) -> typing.AsyncIterator[AsyncTextToSpeechStreamingSocketClient]:
@@ -97,6 +105,9 @@ class AsyncRawTextToSpeechStreamingClient:
97
105
  model : typing.Optional[typing.Literal["bulbul:v2"]]
98
106
  Text to speech model to use
99
107
 
108
+ send_completion_event : typing.Optional[TextToSpeechStreamingSendCompletionEvent]
109
+ Enable completion event notifications when TTS generation finishes. When set to true, an event message will be sent when the final audio chunk has been generated.
110
+
100
111
  api_subscription_key : typing.Optional[str]
101
112
  API subscription key for authentication
102
113
 
@@ -111,6 +122,8 @@ class AsyncRawTextToSpeechStreamingClient:
111
122
  query_params = httpx.QueryParams()
112
123
  if model is not None:
113
124
  query_params = query_params.add("model", model)
125
+ if send_completion_event is not None:
126
+ query_params = query_params.add("send_completion_event", send_completion_event)
114
127
  ws_url = ws_url + f"?{query_params}"
115
128
  headers = self._client_wrapper.get_headers()
116
129
  if api_subscription_key is not None:
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .text_to_speech_streaming_send_completion_event import TextToSpeechStreamingSendCompletionEvent
6
+
7
+ __all__ = ["TextToSpeechStreamingSendCompletionEvent"]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ TextToSpeechStreamingSendCompletionEvent = typing.Union[typing.Literal["true", "false"], typing.Any]
@@ -3,6 +3,7 @@
3
3
  # isort: skip_file
4
4
 
5
5
  from .audio_data import AudioData
6
+ from .audio_data_input_audio_codec import AudioDataInputAudioCodec
6
7
  from .audio_message import AudioMessage
7
8
  from .audio_output import AudioOutput
8
9
  from .audio_output_data import AudioOutputData
@@ -20,6 +21,7 @@ from .chat_completion_request_system_message import ChatCompletionRequestSystemM
20
21
  from .chat_completion_request_user_message import ChatCompletionRequestUserMessage
21
22
  from .chat_completion_response_message import ChatCompletionResponseMessage
22
23
  from .choice import Choice
24
+ from .completion_event_flag import CompletionEventFlag
23
25
  from .completion_usage import CompletionUsage
24
26
  from .config_message import ConfigMessage
25
27
  from .configure_connection import ConfigureConnection
@@ -28,6 +30,7 @@ from .configure_connection_data_output_audio_bitrate import ConfigureConnectionD
28
30
  from .configure_connection_data_output_audio_codec import ConfigureConnectionDataOutputAudioCodec
29
31
  from .configure_connection_data_speaker import ConfigureConnectionDataSpeaker
30
32
  from .configure_connection_data_target_language_code import ConfigureConnectionDataTargetLanguageCode
33
+ from .connection_sample_rate import ConnectionSampleRate
31
34
  from .create_chat_completion_response import CreateChatCompletionResponse
32
35
  from .diarized_entry import DiarizedEntry
33
36
  from .diarized_transcript import DiarizedTranscript
@@ -37,6 +40,8 @@ from .error_details import ErrorDetails
37
40
  from .error_message import ErrorMessage
38
41
  from .error_response import ErrorResponse
39
42
  from .error_response_data import ErrorResponseData
43
+ from .event_response import EventResponse
44
+ from .event_response_data import EventResponseData
40
45
  from .events_data import EventsData
41
46
  from .events_data_signal_type import EventsDataSignalType
42
47
  from .file_signed_url_details import FileSignedUrlDetails
@@ -99,6 +104,7 @@ from .transliteration_response import TransliterationResponse
99
104
 
100
105
  __all__ = [
101
106
  "AudioData",
107
+ "AudioDataInputAudioCodec",
102
108
  "AudioMessage",
103
109
  "AudioOutput",
104
110
  "AudioOutputData",
@@ -114,6 +120,7 @@ __all__ = [
114
120
  "ChatCompletionRequestUserMessage",
115
121
  "ChatCompletionResponseMessage",
116
122
  "Choice",
123
+ "CompletionEventFlag",
117
124
  "CompletionUsage",
118
125
  "ConfigMessage",
119
126
  "ConfigureConnection",
@@ -122,6 +129,7 @@ __all__ = [
122
129
  "ConfigureConnectionDataOutputAudioCodec",
123
130
  "ConfigureConnectionDataSpeaker",
124
131
  "ConfigureConnectionDataTargetLanguageCode",
132
+ "ConnectionSampleRate",
125
133
  "CreateChatCompletionResponse",
126
134
  "DiarizedEntry",
127
135
  "DiarizedTranscript",
@@ -131,6 +139,8 @@ __all__ = [
131
139
  "ErrorMessage",
132
140
  "ErrorResponse",
133
141
  "ErrorResponseData",
142
+ "EventResponse",
143
+ "EventResponseData",
134
144
  "EventsData",
135
145
  "EventsDataSignalType",
136
146
  "FileSignedUrlDetails",
@@ -4,6 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .audio_data_input_audio_codec import AudioDataInputAudioCodec
7
8
 
8
9
 
9
10
  class AudioData(UniversalBaseModel):
@@ -14,7 +15,13 @@ class AudioData(UniversalBaseModel):
14
15
 
15
16
  sample_rate: int = pydantic.Field()
16
17
  """
17
- Audio sample rate in Hz (16kHz preferred, 8kHz least preferred)
18
+ Audio sample rate in Hz for individual audio messages.
19
+
20
+ **Backward Compatibility**: This property is maintained for legacy support.
21
+ **Recommended**: Use the connection-level sample_rate parameter instead.
22
+ **Note**: 8kHz is only supported via connection parameter, not in AudioData messages.
23
+
24
+ Supported values: 16kHz (preferred), 22.05kHz, 24kHz
18
25
  """
19
26
 
20
27
  encoding: typing.Literal["audio/wav"] = pydantic.Field(default="audio/wav")
@@ -22,6 +29,11 @@ class AudioData(UniversalBaseModel):
22
29
  Audio encoding format
23
30
  """
24
31
 
32
+ input_audio_codec: typing.Optional[AudioDataInputAudioCodec] = pydantic.Field(default=None)
33
+ """
34
+ Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
35
+ """
36
+
25
37
  if IS_PYDANTIC_V2:
26
38
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
39
  else:
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AudioDataInputAudioCodec = typing.Union[
6
+ typing.Literal[
7
+ "wav",
8
+ "x-wav",
9
+ "wave",
10
+ "mp3",
11
+ "mpeg",
12
+ "mpeg3",
13
+ "x-mp3",
14
+ "x-mpeg-3",
15
+ "aac",
16
+ "x-aac",
17
+ "aiff",
18
+ "x-aiff",
19
+ "ogg",
20
+ "opus",
21
+ "flac",
22
+ "x-flac",
23
+ "mp4",
24
+ "x-m4a",
25
+ "amr",
26
+ "x-ms-wma",
27
+ "webm",
28
+ "pcm_s16le",
29
+ "pcm_l16",
30
+ "pcm_raw",
31
+ ],
32
+ typing.Any,
33
+ ]
@@ -17,11 +17,6 @@ class AudioOutputData(UniversalBaseModel):
17
17
  Base64-encoded audio data ready for playback or download
18
18
  """
19
19
 
20
- request_id: typing.Optional[str] = pydantic.Field(default=None)
21
- """
22
- Unique identifier for the request
23
- """
24
-
25
20
  if IS_PYDANTIC_V2:
26
21
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
22
  else:
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ CompletionEventFlag = typing.Union[typing.Literal["true", "false"], typing.Any]
@@ -0,0 +1,3 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ ConnectionSampleRate = int
@@ -18,11 +18,6 @@ class ErrorResponseData(UniversalBaseModel):
18
18
  Additional error details and context information
19
19
  """
20
20
 
21
- request_id: typing.Optional[str] = pydantic.Field(default=None)
22
- """
23
- Unique identifier for the request
24
- """
25
-
26
21
  if IS_PYDANTIC_V2:
27
22
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
23
  else:
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .event_response_data import EventResponseData
8
+
9
+
10
+ class EventResponse(UniversalBaseModel):
11
+ """
12
+ Event notification message sent when specific events occur during TTS processing
13
+ """
14
+
15
+ type: typing.Literal["event"] = pydantic.Field(default="event")
16
+ """
17
+ Message type identifier for events
18
+ """
19
+
20
+ data: EventResponseData
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+
9
+
10
+ class EventResponseData(UniversalBaseModel):
11
+ event_type: typing.Literal["final"] = pydantic.Field(default="final")
12
+ """
13
+ Type of event that occurred
14
+ """
15
+
16
+ message: typing.Optional[str] = pydantic.Field(default=None)
17
+ """
18
+ Human-readable description of the event
19
+ """
20
+
21
+ timestamp: typing.Optional[dt.datetime] = pydantic.Field(default=None)
22
+ """
23
+ ISO 8601 timestamp when the event occurred
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sarvamai
3
- Version: 0.1.20a0
3
+ Version: 0.1.20a1
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,11 +1,11 @@
1
- sarvamai/__init__.py,sha256=R2X_oWI35aSTjAskLMeKysc5rt17-ldLPc8vhkfGku4,10964
1
+ sarvamai/__init__.py,sha256=-HM4Xf9WWwFScK90X45K7GH1AHZL6w7UcIRVE7VULvo,11649
2
2
  sarvamai/chat/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
3
3
  sarvamai/chat/client.py,sha256=xOSj83Gr6Q7eY2qUeATiuXYQqBqWqSCQlIEopK5fKus,11022
4
4
  sarvamai/chat/raw_client.py,sha256=A2kRuZcVWlJhyYCD7YKgqNkZEp3cYa1731KhRkhirU0,17885
5
5
  sarvamai/client.py,sha256=J30X_os1lPf8Wml0KDFEf6p8VGHhgF_lf3nw1T2D3qo,8207
6
6
  sarvamai/core/__init__.py,sha256=YE2CtXeASe1RAbaI39twKWYKCuT4tW5is9HWHhJjR_g,1653
7
7
  sarvamai/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
8
- sarvamai/core/client_wrapper.py,sha256=iqTfXU3v7YIkftS1VGeaudg-p-Exo5WNbyBMNcm2DOQ,2570
8
+ sarvamai/core/client_wrapper.py,sha256=5f4_nM8kBdZM8Yp8FVUuJkKPNuV0n1yFvwKTufsBKek,2570
9
9
  sarvamai/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
10
10
  sarvamai/core/events.py,sha256=HvKBdSoYcFetk7cgNXb7FxuY-FtY8NtUhZIN7mGVx8U,1159
11
11
  sarvamai/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
@@ -28,11 +28,11 @@ sarvamai/errors/too_many_requests_error.py,sha256=Dl-_pfpboXJh-OtSbRaPQOB-UXvpVO
28
28
  sarvamai/errors/unprocessable_entity_error.py,sha256=JqxtzIhvjkpQDqbT9Q-go1n-gyv9PsYqq0ng_ZYyBMo,347
29
29
  sarvamai/play.py,sha256=4fh86zy8g8IPU2O8yPBY7QxXQOivv_nWQvPQsOa1arw,2183
30
30
  sarvamai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- sarvamai/requests/__init__.py,sha256=nAXyZKbjwhLTxvfb1kaxOxZpyFvWwQu30Yr5HqgOZXw,5702
32
- sarvamai/requests/audio_data.py,sha256=QI3SK5aiAg2yJ-m3l9CxOkONnH3CCKMFCl9kAdMs19o,410
31
+ sarvamai/requests/__init__.py,sha256=jL9z3hA1vtYkoCLOIlBUOmiE31WEyDtSC81jRhC6X8g,5865
32
+ sarvamai/requests/audio_data.py,sha256=weVNgM3zaHim3a17qvXD5ayyhaJ8MnzWJWATOjRuhvM,1116
33
33
  sarvamai/requests/audio_message.py,sha256=ZBeogjGE6YFXXM-0g8zq9SoizDk21reR0YXSB-0fMjg,214
34
34
  sarvamai/requests/audio_output.py,sha256=BnoX345rwoWgaMaj24u_19-SjmPV0xt7vlFEEDKRw20,280
35
- sarvamai/requests/audio_output_data.py,sha256=6-pmWDr9U99xDB2Khw8r3W0Mt4oRo1jPEvHWqeeOR6s,455
35
+ sarvamai/requests/audio_output_data.py,sha256=v5s67mI1RNO20-C39lRXWpHgV13yOPXML1VrZHke9sY,349
36
36
  sarvamai/requests/base_job_parameters.py,sha256=5-DGqoCcIt5PM_-LO8hzuTqnuW5arxpEzimAmL9rLKM,161
37
37
  sarvamai/requests/bulk_job_callback.py,sha256=6MvZSY0l2lch9skJzy8qBpuZ9KJoLv3ZL7SYP2rNlUI,345
38
38
  sarvamai/requests/bulk_job_init_response_v_1.py,sha256=prWUzJ5x3pdOdInKqeVahKWYL5uvwf7gOlecgZU2qfE,524
@@ -53,7 +53,9 @@ sarvamai/requests/error_data.py,sha256=u87qHVagiqyyowBgMDAPPLlZzr0Z5GXlOU7VIUzfQ
53
53
  sarvamai/requests/error_details.py,sha256=By7cYfitQynAM1D5_3yFc22zXQJEceNgkhoyGWmg4zw,529
54
54
  sarvamai/requests/error_message.py,sha256=-J21pfEJghsms4pNe55O_9qkODNd-BKLMt96AOztYUs,257
55
55
  sarvamai/requests/error_response.py,sha256=A8j12JQ7JJkUcnt26k2M9uwXXkwyT-LNqG3BO3U8NIk,288
56
- sarvamai/requests/error_response_data.py,sha256=t-kD8EQAV8ZKB_S4r3BnNrWTJijsiK6mazX2m77KxkQ,567
56
+ sarvamai/requests/error_response_data.py,sha256=l9tGTykaKZ8pKxdw9RKitpW49kKcs4aGibH7rKG2v7w,461
57
+ sarvamai/requests/event_response.py,sha256=Mk5lXlcmFmn50-99TWqLoLMuDl9pVT9B9JcOGaAZVZM,446
58
+ sarvamai/requests/event_response_data.py,sha256=2IzBUllUSrbxU6-JS-CgdnImT6NT3Q7yh81tmn2g_7A,508
57
59
  sarvamai/requests/events_data.py,sha256=DgwSqyeFzL36i1z72mxKGP1qGjs27GpO1h9fL-ziWqo,728
58
60
  sarvamai/requests/file_signed_url_details.py,sha256=s1ah-U99qq1DZOJr1SHVyknnCZTDS7tkw_XWgdqyZVM,284
59
61
  sarvamai/requests/files_download_response.py,sha256=lQg7yVJtiMvt4OR0WcDbaL9jCi77wY9iFJ0StFsTTZY,491
@@ -91,13 +93,14 @@ sarvamai/speech_to_text_job/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23
91
93
  sarvamai/speech_to_text_job/client.py,sha256=WSGBJxYcNxl77Zd1X6VVWjg4zshqecXf6WCyhfLXVlI,18007
92
94
  sarvamai/speech_to_text_job/job.py,sha256=K8HOmwrYd6l82-MZfWDBmNkZeeERyg9YOihnFfvl-Js,15021
93
95
  sarvamai/speech_to_text_job/raw_client.py,sha256=OZTPzMhAn-ckE_xKzfZ9QLsEX5EZVOJS0Pf-PBa19jM,48200
94
- sarvamai/speech_to_text_streaming/__init__.py,sha256=aVcI8kSlUpwLrPtA-4oUkuJ_D9Onha_qU49lA2vtEqU,515
95
- sarvamai/speech_to_text_streaming/client.py,sha256=15k-UH2ROia2EymXia0BxVKbzBz7k1Rh9k7L9hgO5Fg,9206
96
- sarvamai/speech_to_text_streaming/raw_client.py,sha256=69hAAD9mcpplo3gR7B5JXbo6Yys8bPT3DfSk1FjyI8Q,8387
96
+ sarvamai/speech_to_text_streaming/__init__.py,sha256=l7yGZbLTVWVq63Y1mt_WuX2oyPiXDyc0E-BIonyPYP0,601
97
+ sarvamai/speech_to_text_streaming/client.py,sha256=PqQfzgALEE8p-rpudmsGWR_lMlKy5SsCelQFqUpyzA8,11237
98
+ sarvamai/speech_to_text_streaming/raw_client.py,sha256=Xzq4MSL7isxBa6JFqzd7U4knPNzauGiTVKNsXXaKsW4,10418
97
99
  sarvamai/speech_to_text_streaming/socket_client.py,sha256=P6qXRN0s3UFAp6CP5lkqrW2KPK9me70ZVfWquxLB4wI,7538
98
- sarvamai/speech_to_text_streaming/types/__init__.py,sha256=A99VJwG5fkik5SFTMDMKPZCjvKSaU2aQ02EbA5rrDlM,723
100
+ sarvamai/speech_to_text_streaming/types/__init__.py,sha256=6DNWJo4YFCAEqTC3hqEGBJwnDTaj48o0v_3vlVfdOAI,860
99
101
  sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_flush_signal.py,sha256=dDJOBlzAjhuiSVqW2RHHY1f6xy0DU_Yoo9UV8-7MjnA,173
100
102
  sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_high_vad_sensitivity.py,sha256=OwPwffa8TkLPGMnOTn5S7d-HmV8QmN3B7fHz8I1-VT8,180
103
+ sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py,sha256=yfINVbnoiAvhDskwVkpnFv10Q9SzU104oRJR-n__ugc,584
101
104
  sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_language_code.py,sha256=LxgEifmgWTCFZn9U-f-TWKxRPng3a2J26Zt526QrA0Y,267
102
105
  sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_model.py,sha256=b6F4ymgz4got6KVDqrweYvkET8itze63wUwWyjqDlO4,180
103
106
  sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_vad_signals.py,sha256=8wiFOB7WDMbYCcMTYgNFJaIjEytYeXpJLwr_O_mH0TI,172
@@ -105,13 +108,14 @@ sarvamai/speech_to_text_translate_job/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3
105
108
  sarvamai/speech_to_text_translate_job/client.py,sha256=xu8kYtCESDB7LzL8YKBUq5qhTPMIl3_H3XD2L_7y4UU,18969
106
109
  sarvamai/speech_to_text_translate_job/job.py,sha256=DU4k3eB28V8N16M_QEchakVng4IOul6_Qrdn3FumgHA,15208
107
110
  sarvamai/speech_to_text_translate_job/raw_client.py,sha256=dAitbu2B9afPK6iT9zNjUJnE5BIr5-lrAlwrfwFxdkU,49507
108
- sarvamai/speech_to_text_translate_streaming/__init__.py,sha256=sDeWLagKUTg34tL7vpNNwr2gX4AznEn6NAy9jY-Znf4,507
109
- sarvamai/speech_to_text_translate_streaming/client.py,sha256=41FAJekotqq08tDdxWqhT966B5Ofx9MuZgHAJ9xmwRQ,9137
110
- sarvamai/speech_to_text_translate_streaming/raw_client.py,sha256=P-p7pNJNLrgra4HoUx1vG34RcLADYfQEpoVMYe-aMa0,8246
111
+ sarvamai/speech_to_text_translate_streaming/__init__.py,sha256=_DvueqU3i0P_nIaCgPyfO0-I2dPkNZpamKpyB4nXPhU,611
112
+ sarvamai/speech_to_text_translate_streaming/client.py,sha256=h7glgfA6bO5acuzz6yAZsdL0FyOj4Tq2HoSqG0FHZK0,11223
113
+ sarvamai/speech_to_text_translate_streaming/raw_client.py,sha256=ArNbRV21MRZEmO6VDknYQDTdqfhK7h1lF8S_ucj5eM8,10332
111
114
  sarvamai/speech_to_text_translate_streaming/socket_client.py,sha256=ipEPSj5eHAyDpuEXfaP7JJL1rXJXGEo-IB888ReAFKs,8901
112
- sarvamai/speech_to_text_translate_streaming/types/__init__.py,sha256=sK4Zv64ZcV33opFFaVd1kgnQnzjfXrSDhUwiEM85sZc,708
115
+ sarvamai/speech_to_text_translate_streaming/types/__init__.py,sha256=__-K5UkFN9kA_-6kw6ApPt616nPsu8L2GS5CiJILb28,873
113
116
  sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_flush_signal.py,sha256=jkjvCGJ1pFKi3AOTkwMW-lo18WGgrgAhMpoe5P0AMzA,182
114
117
  sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_high_vad_sensitivity.py,sha256=r6MvTlkM0VEpb4dpnMHtINOZ-gYc22o0Fx_Xce2rjvo,189
118
+ sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py,sha256=IwO6IF9BQU5MpGWs7m-w0dV8yp__7s4y3L4hHDErBWM,593
115
119
  sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_model.py,sha256=6B8VxkpJG_pNprCSctseDtJb_ULVdKrPaeENkQ6Jvjg,187
116
120
  sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_vad_signals.py,sha256=EV3xd9qyKMnMvA9rO-qFDDIac4b84roBu7n-maaPxG8,181
117
121
  sarvamai/text/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
@@ -120,15 +124,18 @@ sarvamai/text/raw_client.py,sha256=7xYmJA50kTKy_gj8tkAPckKp2djHB37zOdm0_icbMb8,4
120
124
  sarvamai/text_to_speech/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
121
125
  sarvamai/text_to_speech/client.py,sha256=iwrQNfoMgCSOgvztTIXtLHQmSmn0RInwt5RSo9TwdtA,9617
122
126
  sarvamai/text_to_speech/raw_client.py,sha256=si_aSjMR7SocIpKZFoVYqBmaIDuRm_6vxTM0dJ73PEo,15569
123
- sarvamai/text_to_speech_streaming/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
124
- sarvamai/text_to_speech_streaming/client.py,sha256=tcYTUmWGseGQkLOsJdO4S3eZrFstjaLCPi5OcKflfus,6306
125
- sarvamai/text_to_speech_streaming/raw_client.py,sha256=VdL5HYpUotIm5HaOqTwRkyZqoV0BuzwCtAfcB0g1y10,5487
127
+ sarvamai/text_to_speech_streaming/__init__.py,sha256=TjBDNPwnsPQpuVZzh7Xi27A51pEEfVyaC8dpvafkmvQ,201
128
+ sarvamai/text_to_speech_streaming/client.py,sha256=3WsyEcRI6h5EUeGCNZzWG-t-VJA2a7ceoGkXKBBNq7s,7415
129
+ sarvamai/text_to_speech_streaming/raw_client.py,sha256=CHX4t6SiwEvRTflnKI61q0Z3GtjHzHb4Xz-yk2exxeU,6596
126
130
  sarvamai/text_to_speech_streaming/socket_client.py,sha256=NEcijnvjuNcWfzqpBi-xWsXVkL0NPq6EGAkEjnaq9hw,13909
127
- sarvamai/types/__init__.py,sha256=Zydymb6llnD7V1vFWM42RrXvyxvtE84e5ayeXL5iV30,7929
128
- sarvamai/types/audio_data.py,sha256=rgOukLkLNJ_HBBVE2g5dfEL2CWjRoGiMvCtpq0qTB1Y,829
131
+ sarvamai/text_to_speech_streaming/types/__init__.py,sha256=fx2VJtnbh4RFUETiV2aPGslEQ0lq_us4UjDbQr_2J6I,242
132
+ sarvamai/text_to_speech_streaming/types/text_to_speech_streaming_send_completion_event.py,sha256=cZWm6cAwNwPGF8ZADtnRev_AsgM_xj5ypg2oHHQfgZI,181
133
+ sarvamai/types/__init__.py,sha256=hBtXC7VLxZdrBEPs7-Ym6c3fYlJJS1VxHbfb4J8CcEM,8334
134
+ sarvamai/types/audio_data.py,sha256=g-sQcFXiV0uFAsUJ_TjM3OSnPoCUmNkMORRJHOl152k,1545
135
+ sarvamai/types/audio_data_input_audio_codec.py,sha256=Xb3UEr2wTniW0z8ND4iV051YHhgFazIFOd7q7UGH3nY,572
129
136
  sarvamai/types/audio_message.py,sha256=sB4EgkWkWJzipYXobkmM9AYZTTZtCpg_ySKssUeznUE,560
130
137
  sarvamai/types/audio_output.py,sha256=Eq-YUZa1mSDwt7bax2c4Vv2gBlyM_JBJWzHhTAhFSko,621
131
- sarvamai/types/audio_output_data.py,sha256=WMT8W_48uhosfvLOmyyfnCxPKMlgPFDfi3tjjgW8jFY,868
138
+ sarvamai/types/audio_output_data.py,sha256=Og-yoeYzL--9G0-HATRe_M_XkKP6uLWuc1Qxbjte8LI,745
132
139
  sarvamai/types/base_job_parameters.py,sha256=x-6SDzT2JxsGNUNuMskw8drWj6UwqgCaeo33XrlgKvo,509
133
140
  sarvamai/types/bulk_job_callback.py,sha256=mEpKCadWIqZhXlaJztnAhGmydln_6ykvEotFGEQ0RtI,739
134
141
  sarvamai/types/bulk_job_init_response_v_1.py,sha256=iYr_jSp443R1IoQdlLtDK6f78z2x-47feBnhUXCdWBU,894
@@ -138,6 +145,7 @@ sarvamai/types/chat_completion_request_system_message.py,sha256=E7YhTk1zr4u7dj_y
138
145
  sarvamai/types/chat_completion_request_user_message.py,sha256=J3WhlrfOfCCe7ugmJIfP_L9st3OFtXkIjZTSuR8O9nQ,615
139
146
  sarvamai/types/chat_completion_response_message.py,sha256=wz935eBnCkSIl0I0qMxBuH4vAUCso1aHDGReMW1VHGE,744
140
147
  sarvamai/types/choice.py,sha256=uXBCsjWP9VK3XWQWZUeI4EnU10w0G9nAfKn2tJZvxko,1244
148
+ sarvamai/types/completion_event_flag.py,sha256=HdvjxXha9Ux5KS_Lfp7Q5eaX62eIk4bXcuJgfhGFXf4,160
141
149
  sarvamai/types/completion_usage.py,sha256=xYQGlQUbKqsksuV73H-1ajjfT5M7w47eLfdWXSlrI5M,843
142
150
  sarvamai/types/config_message.py,sha256=xLD2wZcXejYrmREMd-cn38da4hKfsNPKRtyAGCW0Zcg,779
143
151
  sarvamai/types/configure_connection.py,sha256=SnSNk02gQqP8e4VB4y88jjeFQ4ClpImjGLn2ANI8cZ4,1058
@@ -146,6 +154,7 @@ sarvamai/types/configure_connection_data_output_audio_bitrate.py,sha256=h00YvKLx
146
154
  sarvamai/types/configure_connection_data_output_audio_codec.py,sha256=g4I1hS_zExMJbjwwqM6AsLt8zikSugOeMs_xkIINFBo,235
147
155
  sarvamai/types/configure_connection_data_speaker.py,sha256=SzyAiK5LynXwb9KniaO2qoOLY-II3-PMZbRuIsQ9shw,230
148
156
  sarvamai/types/configure_connection_data_target_language_code.py,sha256=jrU1EblAtDYbybUO1KUkHhevmlSBj2AQxX13ii3QhAQ,275
157
+ sarvamai/types/connection_sample_rate.py,sha256=_86hgA9b4JC_wvDizIsokIWm7GlDcD4C1QnZ2u5LuUc,92
149
158
  sarvamai/types/create_chat_completion_response.py,sha256=4nEzeWzHGW1_BmRAtOuGsbRZ0ojNgnzJSMUFyYuYviw,1285
150
159
  sarvamai/types/diarized_entry.py,sha256=kf9DLrcoMHZdTKNCAaF0z46q_iAe7CE-DFP4CNrZGTw,896
151
160
  sarvamai/types/diarized_transcript.py,sha256=a491XmALLE7AQcByaaOYTew0BZoFTlewEMHLMJyj-Js,669
@@ -154,7 +163,9 @@ sarvamai/types/error_data.py,sha256=gdlrdKLkfgGoe-znCCfWTikKlf07iZy1l4lgPyZTPwE,
154
163
  sarvamai/types/error_details.py,sha256=Faggc5PWERfCN2d9E5JzsEMNq9XSnoPTEdgi0lL8ea0,935
155
164
  sarvamai/types/error_message.py,sha256=i_vDykKyMlkWLhJCpMAeYI1NzRDFsW2CTU4-mzdBAfE,622
156
165
  sarvamai/types/error_response.py,sha256=3m17Aj3GY_-mSY2lH-GkbuiyewTm-wNL9UQ1exLvXyQ,629
157
- sarvamai/types/error_response_data.py,sha256=3OzlX46boFwfUVh6nBZRzRbf_Z3EcY4CBqT9MWk9fPw,961
166
+ sarvamai/types/error_response_data.py,sha256=hncN_zmPg8kqSHjNciYLn2QeNqzqHxKiZDlKOvjKdwA,838
167
+ sarvamai/types/event_response.py,sha256=95pQQ8NApQ0jCRO4045vvW_GfnEkuecgptXmCMeR5fE,811
168
+ sarvamai/types/event_response_data.py,sha256=tbyMxPhcC3MRWtgxKWF1VC1g_jmW5S0x0mUMARVbrmw,919
158
169
  sarvamai/types/events_data.py,sha256=9Gt9CuKF9Y9LmidxAxqTaE2SJgRhEIV_5Nk7X_S-HgU,1146
159
170
  sarvamai/types/events_data_signal_type.py,sha256=MkzFNa4PnviktXIp8ltcYBA5MhQ1aWAkU_bZAIyNN9s,174
160
171
  sarvamai/types/file_signed_url_details.py,sha256=_Zc1NMHxB94mNDFfbEpXPK4Z0X3i_nSiWFDH1oEX4uo,620
@@ -215,6 +226,6 @@ sarvamai/types/transliterate_mode.py,sha256=1jSEMlGcoLkWuk12TgoOpSgwifa4rThGKZ1h
215
226
  sarvamai/types/transliterate_source_language.py,sha256=bSY9wJszF0sg-Cgg6F-YcWC8ly1mIlj9rqa15-jBtx8,283
216
227
  sarvamai/types/transliteration_response.py,sha256=yt-lzTbDeJ_ZL4I8kQa6oESxA9ebeJJY7LfFHpdEsmM,815
217
228
  sarvamai/version.py,sha256=Qkp3Ee9YH-O9RTix90e0i7iNrFAGN-QDt2AFwGA4n8k,75
218
- sarvamai-0.1.20a0.dist-info/METADATA,sha256=DW4IUjyY-OMf8ucLBtgCKpvHq9KvNTIKDlZGpBDw7tc,26753
219
- sarvamai-0.1.20a0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
220
- sarvamai-0.1.20a0.dist-info/RECORD,,
229
+ sarvamai-0.1.20a1.dist-info/METADATA,sha256=Kupxz3ZTha7d7va3jRouKTDdKJtgPLAta8HxQCFHWV4,26753
230
+ sarvamai-0.1.20a1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
231
+ sarvamai-0.1.20a1.dist-info/RECORD,,