sarvamai 0.1.9a2__py3-none-any.whl → 0.1.10__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 +2 -0
- sarvamai/core/client_wrapper.py +2 -2
- sarvamai/text_to_speech/client.py +11 -0
- sarvamai/text_to_speech/raw_client.py +11 -0
- sarvamai/types/__init__.py +2 -0
- sarvamai/types/audio_codec.py +5 -0
- sarvamai/types/speech_to_text_model.py +3 -1
- sarvamai/types/speech_to_text_translate_model.py +3 -1
- {sarvamai-0.1.9a2.dist-info → sarvamai-0.1.10.dist-info}/METADATA +1 -1
- {sarvamai-0.1.9a2.dist-info → sarvamai-0.1.10.dist-info}/RECORD +11 -10
- {sarvamai-0.1.9a2.dist-info → sarvamai-0.1.10.dist-info}/WHEEL +0 -0
sarvamai/__init__.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
5
|
from .types import (
|
|
6
|
+
AudioCodec,
|
|
6
7
|
AudioData,
|
|
7
8
|
AudioMessage,
|
|
8
9
|
AudioOutput,
|
|
@@ -158,6 +159,7 @@ from .version import __version__
|
|
|
158
159
|
|
|
159
160
|
__all__ = [
|
|
160
161
|
"AsyncSarvamAI",
|
|
162
|
+
"AudioCodec",
|
|
161
163
|
"AudioData",
|
|
162
164
|
"AudioDataParams",
|
|
163
165
|
"AudioMessage",
|
sarvamai/core/client_wrapper.py
CHANGED
|
@@ -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.
|
|
26
|
+
"User-Agent": "sarvamai/0.1.10",
|
|
27
27
|
"X-Fern-Language": "Python",
|
|
28
28
|
"X-Fern-SDK-Name": "sarvamai",
|
|
29
|
-
"X-Fern-SDK-Version": "0.1.
|
|
29
|
+
"X-Fern-SDK-Version": "0.1.10",
|
|
30
30
|
**(self.get_custom_headers() or {}),
|
|
31
31
|
}
|
|
32
32
|
headers["api-subscription-key"] = self.api_subscription_key
|
|
@@ -4,6 +4,7 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.audio_codec import AudioCodec
|
|
7
8
|
from ..types.speech_sample_rate import SpeechSampleRate
|
|
8
9
|
from ..types.text_to_speech_language import TextToSpeechLanguage
|
|
9
10
|
from ..types.text_to_speech_model import TextToSpeechModel
|
|
@@ -42,6 +43,7 @@ class TextToSpeechClient:
|
|
|
42
43
|
speech_sample_rate: typing.Optional[SpeechSampleRate] = OMIT,
|
|
43
44
|
enable_preprocessing: typing.Optional[bool] = OMIT,
|
|
44
45
|
model: typing.Optional[TextToSpeechModel] = OMIT,
|
|
46
|
+
audio_codec: typing.Optional[AudioCodec] = OMIT,
|
|
45
47
|
request_options: typing.Optional[RequestOptions] = None,
|
|
46
48
|
) -> TextToSpeechResponse:
|
|
47
49
|
"""
|
|
@@ -85,6 +87,9 @@ class TextToSpeechClient:
|
|
|
85
87
|
model : typing.Optional[TextToSpeechModel]
|
|
86
88
|
Specifies the model to use for text-to-speech conversion. Default is bulbul:v2.
|
|
87
89
|
|
|
90
|
+
audio_codec : typing.Optional[AudioCodec]
|
|
91
|
+
Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics.
|
|
92
|
+
|
|
88
93
|
request_options : typing.Optional[RequestOptions]
|
|
89
94
|
Request-specific configuration.
|
|
90
95
|
|
|
@@ -115,6 +120,7 @@ class TextToSpeechClient:
|
|
|
115
120
|
speech_sample_rate=speech_sample_rate,
|
|
116
121
|
enable_preprocessing=enable_preprocessing,
|
|
117
122
|
model=model,
|
|
123
|
+
audio_codec=audio_codec,
|
|
118
124
|
request_options=request_options,
|
|
119
125
|
)
|
|
120
126
|
return _response.data
|
|
@@ -147,6 +153,7 @@ class AsyncTextToSpeechClient:
|
|
|
147
153
|
speech_sample_rate: typing.Optional[SpeechSampleRate] = OMIT,
|
|
148
154
|
enable_preprocessing: typing.Optional[bool] = OMIT,
|
|
149
155
|
model: typing.Optional[TextToSpeechModel] = OMIT,
|
|
156
|
+
audio_codec: typing.Optional[AudioCodec] = OMIT,
|
|
150
157
|
request_options: typing.Optional[RequestOptions] = None,
|
|
151
158
|
) -> TextToSpeechResponse:
|
|
152
159
|
"""
|
|
@@ -190,6 +197,9 @@ class AsyncTextToSpeechClient:
|
|
|
190
197
|
model : typing.Optional[TextToSpeechModel]
|
|
191
198
|
Specifies the model to use for text-to-speech conversion. Default is bulbul:v2.
|
|
192
199
|
|
|
200
|
+
audio_codec : typing.Optional[AudioCodec]
|
|
201
|
+
Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics.
|
|
202
|
+
|
|
193
203
|
request_options : typing.Optional[RequestOptions]
|
|
194
204
|
Request-specific configuration.
|
|
195
205
|
|
|
@@ -228,6 +238,7 @@ class AsyncTextToSpeechClient:
|
|
|
228
238
|
speech_sample_rate=speech_sample_rate,
|
|
229
239
|
enable_preprocessing=enable_preprocessing,
|
|
230
240
|
model=model,
|
|
241
|
+
audio_codec=audio_codec,
|
|
231
242
|
request_options=request_options,
|
|
232
243
|
)
|
|
233
244
|
return _response.data
|
|
@@ -13,6 +13,7 @@ from ..errors.forbidden_error import ForbiddenError
|
|
|
13
13
|
from ..errors.internal_server_error import InternalServerError
|
|
14
14
|
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
15
15
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
16
|
+
from ..types.audio_codec import AudioCodec
|
|
16
17
|
from ..types.speech_sample_rate import SpeechSampleRate
|
|
17
18
|
from ..types.text_to_speech_language import TextToSpeechLanguage
|
|
18
19
|
from ..types.text_to_speech_model import TextToSpeechModel
|
|
@@ -39,6 +40,7 @@ class RawTextToSpeechClient:
|
|
|
39
40
|
speech_sample_rate: typing.Optional[SpeechSampleRate] = OMIT,
|
|
40
41
|
enable_preprocessing: typing.Optional[bool] = OMIT,
|
|
41
42
|
model: typing.Optional[TextToSpeechModel] = OMIT,
|
|
43
|
+
audio_codec: typing.Optional[AudioCodec] = OMIT,
|
|
42
44
|
request_options: typing.Optional[RequestOptions] = None,
|
|
43
45
|
) -> HttpResponse[TextToSpeechResponse]:
|
|
44
46
|
"""
|
|
@@ -82,6 +84,9 @@ class RawTextToSpeechClient:
|
|
|
82
84
|
model : typing.Optional[TextToSpeechModel]
|
|
83
85
|
Specifies the model to use for text-to-speech conversion. Default is bulbul:v2.
|
|
84
86
|
|
|
87
|
+
audio_codec : typing.Optional[AudioCodec]
|
|
88
|
+
Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics.
|
|
89
|
+
|
|
85
90
|
request_options : typing.Optional[RequestOptions]
|
|
86
91
|
Request-specific configuration.
|
|
87
92
|
|
|
@@ -104,6 +109,7 @@ class RawTextToSpeechClient:
|
|
|
104
109
|
"speech_sample_rate": speech_sample_rate,
|
|
105
110
|
"enable_preprocessing": enable_preprocessing,
|
|
106
111
|
"model": model,
|
|
112
|
+
"audio_codec": audio_codec,
|
|
107
113
|
},
|
|
108
114
|
headers={
|
|
109
115
|
"content-type": "application/json",
|
|
@@ -198,6 +204,7 @@ class AsyncRawTextToSpeechClient:
|
|
|
198
204
|
speech_sample_rate: typing.Optional[SpeechSampleRate] = OMIT,
|
|
199
205
|
enable_preprocessing: typing.Optional[bool] = OMIT,
|
|
200
206
|
model: typing.Optional[TextToSpeechModel] = OMIT,
|
|
207
|
+
audio_codec: typing.Optional[AudioCodec] = OMIT,
|
|
201
208
|
request_options: typing.Optional[RequestOptions] = None,
|
|
202
209
|
) -> AsyncHttpResponse[TextToSpeechResponse]:
|
|
203
210
|
"""
|
|
@@ -241,6 +248,9 @@ class AsyncRawTextToSpeechClient:
|
|
|
241
248
|
model : typing.Optional[TextToSpeechModel]
|
|
242
249
|
Specifies the model to use for text-to-speech conversion. Default is bulbul:v2.
|
|
243
250
|
|
|
251
|
+
audio_codec : typing.Optional[AudioCodec]
|
|
252
|
+
Specifies the audio codec for the output audio file. Different codecs offer various compression and quality characteristics.
|
|
253
|
+
|
|
244
254
|
request_options : typing.Optional[RequestOptions]
|
|
245
255
|
Request-specific configuration.
|
|
246
256
|
|
|
@@ -263,6 +273,7 @@ class AsyncRawTextToSpeechClient:
|
|
|
263
273
|
"speech_sample_rate": speech_sample_rate,
|
|
264
274
|
"enable_preprocessing": enable_preprocessing,
|
|
265
275
|
"model": model,
|
|
276
|
+
"audio_codec": audio_codec,
|
|
266
277
|
},
|
|
267
278
|
headers={
|
|
268
279
|
"content-type": "application/json",
|
sarvamai/types/__init__.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
+
from .audio_codec import AudioCodec
|
|
5
6
|
from .audio_data import AudioData
|
|
6
7
|
from .audio_message import AudioMessage
|
|
7
8
|
from .audio_output import AudioOutput
|
|
@@ -79,6 +80,7 @@ from .transliterate_source_language import TransliterateSourceLanguage
|
|
|
79
80
|
from .transliteration_response import TransliterationResponse
|
|
80
81
|
|
|
81
82
|
__all__ = [
|
|
83
|
+
"AudioCodec",
|
|
82
84
|
"AudioData",
|
|
83
85
|
"AudioMessage",
|
|
84
86
|
"AudioOutput",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
sarvamai/__init__.py,sha256=
|
|
1
|
+
sarvamai/__init__.py,sha256=uDDchkhxoduhGSBGACUftTl8h4rL4sGtSg4rxIZAACA,8858
|
|
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=xaDMuAdwCIKkq0iyY4Gp6M4alMcGOErkFOlZMI1bvNA,7581
|
|
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=
|
|
8
|
+
sarvamai/core/client_wrapper.py,sha256=xPDy1ddIR5lIbb4hqjHYqQ9Wzswq8UqOxeK7c34bpO0,2566
|
|
9
9
|
sarvamai/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
10
10
|
sarvamai/core/events.py,sha256=j7VWXgMpOsjCXdzY22wIhI7Q-v5InZ4WchRzA88x_Sk,856
|
|
11
11
|
sarvamai/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
@@ -95,13 +95,14 @@ sarvamai/text/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
|
95
95
|
sarvamai/text/client.py,sha256=2kA0Gxfi-r52zMQdqRRD811014alzlHB_FANkp3Kn_c,30595
|
|
96
96
|
sarvamai/text/raw_client.py,sha256=7xYmJA50kTKy_gj8tkAPckKp2djHB37zOdm0_icbMb8,48695
|
|
97
97
|
sarvamai/text_to_speech/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
98
|
-
sarvamai/text_to_speech/client.py,sha256=
|
|
99
|
-
sarvamai/text_to_speech/raw_client.py,sha256=
|
|
98
|
+
sarvamai/text_to_speech/client.py,sha256=ERj6e9ZBkdv16D344Z3C2EeqBbGezZx6GuzANoXHKkY,9449
|
|
99
|
+
sarvamai/text_to_speech/raw_client.py,sha256=WCbuL3i7FRL-vwCRER9Y47wPGRMzSzoeQHHeV2E7l78,15401
|
|
100
100
|
sarvamai/text_to_speech_streaming/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
101
101
|
sarvamai/text_to_speech_streaming/client.py,sha256=geTF5xy-batzO12XVt0sPw_XJCi7-m2sDFK_B7SL7qc,6088
|
|
102
102
|
sarvamai/text_to_speech_streaming/raw_client.py,sha256=asOcNw1WAViOiXDVWH4sxWSXGVoLwAOh9vUtq_xralA,5269
|
|
103
103
|
sarvamai/text_to_speech_streaming/socket_client.py,sha256=NEcijnvjuNcWfzqpBi-xWsXVkL0NPq6EGAkEjnaq9hw,13909
|
|
104
|
-
sarvamai/types/__init__.py,sha256=
|
|
104
|
+
sarvamai/types/__init__.py,sha256=X9QA4NHc45_0T6Nrnw-9OzgBe6OsnyUDDXuibOjY7Ow,6359
|
|
105
|
+
sarvamai/types/audio_codec.py,sha256=9qNJc1SdIP4IKHYwclqqtU9810qTaJtsSGx22AqKhKY,200
|
|
105
106
|
sarvamai/types/audio_data.py,sha256=rgOukLkLNJ_HBBVE2g5dfEL2CWjRoGiMvCtpq0qTB1Y,829
|
|
106
107
|
sarvamai/types/audio_message.py,sha256=sB4EgkWkWJzipYXobkmM9AYZTTZtCpg_ySKssUeznUE,560
|
|
107
108
|
sarvamai/types/audio_output.py,sha256=Eq-YUZa1mSDwt7bax2c4Vv2gBlyM_JBJWzHhTAhFSko,621
|
|
@@ -143,13 +144,13 @@ sarvamai/types/send_text.py,sha256=kgST6V5NuURzgBpuiDi8fVwDg768ttDoeY9k1dSSb1Y,6
|
|
|
143
144
|
sarvamai/types/send_text_data.py,sha256=H8yfcvd4gvyN34RrZ9i4qQvieednNBhL7i7isX4asuY,519
|
|
144
145
|
sarvamai/types/speech_sample_rate.py,sha256=Hfi79KL2Y1W7OIvvrfWnt7EUvmU5i7bxYvXivrY_aUA,88
|
|
145
146
|
sarvamai/types/speech_to_text_language.py,sha256=cq8FBOX0DfYB3v8jgNteQtHeJcqWqzKWJVyYGwwo_w0,279
|
|
146
|
-
sarvamai/types/speech_to_text_model.py,sha256=
|
|
147
|
+
sarvamai/types/speech_to_text_model.py,sha256=cYANeE-1Kjdpju97bLdQa8GuGqMBn0hVK4McFVqUGT0,208
|
|
147
148
|
sarvamai/types/speech_to_text_response.py,sha256=iWRGEJeHUFIOxeEhoCQu68njeA6lcqXbT2czV-O8Wx0,1438
|
|
148
149
|
sarvamai/types/speech_to_text_response_data.py,sha256=gbxZTBSjbN3ZIa10K6tWPYtymcpnQTFIaUnXkOmsmD4,322
|
|
149
150
|
sarvamai/types/speech_to_text_streaming_response.py,sha256=z6tVAHbVK9lC3w3lac__LEUfO8AAzEilkeGlaLskTtc,687
|
|
150
151
|
sarvamai/types/speech_to_text_transcription_data.py,sha256=EqwPAPSi98PwARaTj-ufzFUSHyN-NPoPla5vi_KERrU,1297
|
|
151
152
|
sarvamai/types/speech_to_text_translate_language.py,sha256=yikNM-roIumVG-eqBWss93wLGudZdLPwd0i3VcXH5zo,263
|
|
152
|
-
sarvamai/types/speech_to_text_translate_model.py,sha256=
|
|
153
|
+
sarvamai/types/speech_to_text_translate_model.py,sha256=hxKnhnelhH5Ah8QO5SymTJMnDw_WWAhGDJnutoNk3qw,213
|
|
153
154
|
sarvamai/types/speech_to_text_translate_response.py,sha256=Z5Na7IQW2ok3TP21xd-jKkwioplEKfonNIMhoJQKkVw,1278
|
|
154
155
|
sarvamai/types/speech_to_text_translate_response_data.py,sha256=_NlLVp7oQU3em_4E47QVbIP9nromPE07Z9HtMpY1lrU,359
|
|
155
156
|
sarvamai/types/speech_to_text_translate_streaming_response.py,sha256=J6h3AGdAJxpODFs30bR-e6OaWKa__oVhwv_TrbPSO98,724
|
|
@@ -173,6 +174,6 @@ sarvamai/types/transliterate_mode.py,sha256=1jSEMlGcoLkWuk12TgoOpSgwifa4rThGKZ1h
|
|
|
173
174
|
sarvamai/types/transliterate_source_language.py,sha256=bSY9wJszF0sg-Cgg6F-YcWC8ly1mIlj9rqa15-jBtx8,283
|
|
174
175
|
sarvamai/types/transliteration_response.py,sha256=yt-lzTbDeJ_ZL4I8kQa6oESxA9ebeJJY7LfFHpdEsmM,815
|
|
175
176
|
sarvamai/version.py,sha256=Qkp3Ee9YH-O9RTix90e0i7iNrFAGN-QDt2AFwGA4n8k,75
|
|
176
|
-
sarvamai-0.1.
|
|
177
|
-
sarvamai-0.1.
|
|
178
|
-
sarvamai-0.1.
|
|
177
|
+
sarvamai-0.1.10.dist-info/METADATA,sha256=ApZxY71GiBwxzabHaQg7z6aHBbsruUJRbEj6lpv1WX0,26751
|
|
178
|
+
sarvamai-0.1.10.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
179
|
+
sarvamai-0.1.10.dist-info/RECORD,,
|
|
File without changes
|