sarvamai 0.1.10__py3-none-any.whl → 0.1.11__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 +62 -4
- sarvamai/client.py +6 -0
- sarvamai/core/client_wrapper.py +2 -2
- sarvamai/errors/service_unavailable_error.py +1 -2
- sarvamai/requests/__init__.py +24 -0
- sarvamai/requests/base_job_parameters.py +7 -0
- sarvamai/requests/bulk_job_callback.py +15 -0
- sarvamai/requests/bulk_job_init_response_v_1.py +27 -0
- sarvamai/requests/configure_connection_data.py +2 -3
- sarvamai/requests/file_signed_url_details.py +10 -0
- sarvamai/requests/files_download_response.py +15 -0
- sarvamai/requests/files_request.py +10 -0
- sarvamai/requests/files_upload_response.py +15 -0
- sarvamai/requests/job_status_v_1.py +70 -0
- sarvamai/requests/speech_to_text_job_parameters.py +32 -0
- sarvamai/requests/speech_to_text_translate_job_parameters.py +28 -0
- sarvamai/requests/task_detail_v_1.py +15 -0
- sarvamai/requests/task_file_details.py +8 -0
- sarvamai/speech_to_text/raw_client.py +8 -9
- sarvamai/speech_to_text_job/__init__.py +4 -0
- sarvamai/speech_to_text_job/client.py +633 -0
- sarvamai/speech_to_text_job/job.py +472 -0
- sarvamai/speech_to_text_job/raw_client.py +1189 -0
- sarvamai/speech_to_text_translate_job/__init__.py +4 -0
- sarvamai/speech_to_text_translate_job/client.py +651 -0
- sarvamai/speech_to_text_translate_job/job.py +479 -0
- sarvamai/speech_to_text_translate_job/raw_client.py +1241 -0
- sarvamai/text_to_speech/client.py +7 -7
- sarvamai/text_to_speech/raw_client.py +7 -7
- sarvamai/types/__init__.py +34 -4
- sarvamai/types/base_job_parameters.py +17 -0
- sarvamai/types/bulk_job_callback.py +27 -0
- sarvamai/types/bulk_job_init_response_v_1.py +39 -0
- sarvamai/types/configure_connection_data.py +2 -1
- sarvamai/types/configure_connection_data_output_audio_codec.py +7 -0
- sarvamai/types/file_signed_url_details.py +20 -0
- sarvamai/types/files_download_response.py +25 -0
- sarvamai/types/files_request.py +20 -0
- sarvamai/types/files_upload_response.py +25 -0
- sarvamai/types/job_state.py +5 -0
- sarvamai/types/job_status_v_1.py +80 -0
- sarvamai/types/speech_to_text_job_parameters.py +44 -0
- sarvamai/types/speech_to_text_translate_job_parameters.py +40 -0
- sarvamai/types/storage_container_type.py +5 -0
- sarvamai/types/task_detail_v_1.py +25 -0
- sarvamai/types/task_file_details.py +20 -0
- sarvamai/types/task_state.py +5 -0
- sarvamai/types/text_to_speech_output_audio_codec.py +7 -0
- {sarvamai-0.1.10.dist-info → sarvamai-0.1.11.dist-info}/METADATA +1 -1
- {sarvamai-0.1.10.dist-info → sarvamai-0.1.11.dist-info}/RECORD +51 -16
- sarvamai/types/audio_codec.py +0 -5
- sarvamai/types/format.py +0 -5
- {sarvamai-0.1.10.dist-info → sarvamai-0.1.11.dist-info}/WHEEL +0 -0
sarvamai/__init__.py
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
5
|
from .types import (
|
|
6
|
-
AudioCodec,
|
|
7
6
|
AudioData,
|
|
8
7
|
AudioMessage,
|
|
9
8
|
AudioOutput,
|
|
10
9
|
AudioOutputData,
|
|
10
|
+
BaseJobParameters,
|
|
11
|
+
BulkJobCallback,
|
|
12
|
+
BulkJobInitResponseV1,
|
|
11
13
|
ChatCompletionRequestAssistantMessage,
|
|
12
14
|
ChatCompletionRequestMessage,
|
|
13
15
|
ChatCompletionRequestMessage_Assistant,
|
|
@@ -22,6 +24,7 @@ from .types import (
|
|
|
22
24
|
ConfigureConnection,
|
|
23
25
|
ConfigureConnectionData,
|
|
24
26
|
ConfigureConnectionDataOutputAudioBitrate,
|
|
27
|
+
ConfigureConnectionDataOutputAudioCodec,
|
|
25
28
|
ConfigureConnectionDataSpeaker,
|
|
26
29
|
ConfigureConnectionDataTargetLanguageCode,
|
|
27
30
|
CreateChatCompletionResponse,
|
|
@@ -34,9 +37,14 @@ from .types import (
|
|
|
34
37
|
ErrorResponse,
|
|
35
38
|
ErrorResponseData,
|
|
36
39
|
EventsData,
|
|
40
|
+
FileSignedUrlDetails,
|
|
41
|
+
FilesDownloadResponse,
|
|
42
|
+
FilesRequest,
|
|
43
|
+
FilesUploadResponse,
|
|
37
44
|
FinishReason,
|
|
38
45
|
FlushSignal,
|
|
39
|
-
|
|
46
|
+
JobState,
|
|
47
|
+
JobStatusV1,
|
|
40
48
|
LanguageIdentificationResponse,
|
|
41
49
|
NumeralsFormat,
|
|
42
50
|
PingSignal,
|
|
@@ -47,12 +55,14 @@ from .types import (
|
|
|
47
55
|
SendText,
|
|
48
56
|
SendTextData,
|
|
49
57
|
SpeechSampleRate,
|
|
58
|
+
SpeechToTextJobParameters,
|
|
50
59
|
SpeechToTextLanguage,
|
|
51
60
|
SpeechToTextModel,
|
|
52
61
|
SpeechToTextResponse,
|
|
53
62
|
SpeechToTextResponseData,
|
|
54
63
|
SpeechToTextStreamingResponse,
|
|
55
64
|
SpeechToTextTranscriptionData,
|
|
65
|
+
SpeechToTextTranslateJobParameters,
|
|
56
66
|
SpeechToTextTranslateLanguage,
|
|
57
67
|
SpeechToTextTranslateModel,
|
|
58
68
|
SpeechToTextTranslateResponse,
|
|
@@ -61,8 +71,13 @@ from .types import (
|
|
|
61
71
|
SpeechToTextTranslateTranscriptionData,
|
|
62
72
|
SpokenFormNumeralsFormat,
|
|
63
73
|
StopConfiguration,
|
|
74
|
+
StorageContainerType,
|
|
75
|
+
TaskDetailV1,
|
|
76
|
+
TaskFileDetails,
|
|
77
|
+
TaskState,
|
|
64
78
|
TextToSpeechLanguage,
|
|
65
79
|
TextToSpeechModel,
|
|
80
|
+
TextToSpeechOutputAudioCodec,
|
|
66
81
|
TextToSpeechResponse,
|
|
67
82
|
TextToSpeechSpeaker,
|
|
68
83
|
TimestampsModel,
|
|
@@ -89,7 +104,9 @@ from .errors import (
|
|
|
89
104
|
from . import (
|
|
90
105
|
chat,
|
|
91
106
|
speech_to_text,
|
|
107
|
+
speech_to_text_job,
|
|
92
108
|
speech_to_text_streaming,
|
|
109
|
+
speech_to_text_translate_job,
|
|
93
110
|
speech_to_text_translate_streaming,
|
|
94
111
|
text,
|
|
95
112
|
text_to_speech,
|
|
@@ -102,6 +119,9 @@ from .requests import (
|
|
|
102
119
|
AudioMessageParams,
|
|
103
120
|
AudioOutputDataParams,
|
|
104
121
|
AudioOutputParams,
|
|
122
|
+
BaseJobParametersParams,
|
|
123
|
+
BulkJobCallbackParams,
|
|
124
|
+
BulkJobInitResponseV1Params,
|
|
105
125
|
ChatCompletionRequestAssistantMessageParams,
|
|
106
126
|
ChatCompletionRequestMessageParams,
|
|
107
127
|
ChatCompletionRequestMessage_AssistantParams,
|
|
@@ -124,20 +144,29 @@ from .requests import (
|
|
|
124
144
|
ErrorResponseDataParams,
|
|
125
145
|
ErrorResponseParams,
|
|
126
146
|
EventsDataParams,
|
|
147
|
+
FileSignedUrlDetailsParams,
|
|
148
|
+
FilesDownloadResponseParams,
|
|
149
|
+
FilesRequestParams,
|
|
150
|
+
FilesUploadResponseParams,
|
|
127
151
|
FlushSignalParams,
|
|
152
|
+
JobStatusV1Params,
|
|
128
153
|
LanguageIdentificationResponseParams,
|
|
129
154
|
PingSignalParams,
|
|
130
155
|
SendTextDataParams,
|
|
131
156
|
SendTextParams,
|
|
157
|
+
SpeechToTextJobParametersParams,
|
|
132
158
|
SpeechToTextResponseDataParams,
|
|
133
159
|
SpeechToTextResponseParams,
|
|
134
160
|
SpeechToTextStreamingResponseParams,
|
|
135
161
|
SpeechToTextTranscriptionDataParams,
|
|
162
|
+
SpeechToTextTranslateJobParametersParams,
|
|
136
163
|
SpeechToTextTranslateResponseDataParams,
|
|
137
164
|
SpeechToTextTranslateResponseParams,
|
|
138
165
|
SpeechToTextTranslateStreamingResponseParams,
|
|
139
166
|
SpeechToTextTranslateTranscriptionDataParams,
|
|
140
167
|
StopConfigurationParams,
|
|
168
|
+
TaskDetailV1Params,
|
|
169
|
+
TaskFileDetailsParams,
|
|
141
170
|
TextToSpeechResponseParams,
|
|
142
171
|
TimestampsModelParams,
|
|
143
172
|
TranscriptionMetricsParams,
|
|
@@ -159,7 +188,6 @@ from .version import __version__
|
|
|
159
188
|
|
|
160
189
|
__all__ = [
|
|
161
190
|
"AsyncSarvamAI",
|
|
162
|
-
"AudioCodec",
|
|
163
191
|
"AudioData",
|
|
164
192
|
"AudioDataParams",
|
|
165
193
|
"AudioMessage",
|
|
@@ -169,6 +197,12 @@ __all__ = [
|
|
|
169
197
|
"AudioOutputDataParams",
|
|
170
198
|
"AudioOutputParams",
|
|
171
199
|
"BadRequestError",
|
|
200
|
+
"BaseJobParameters",
|
|
201
|
+
"BaseJobParametersParams",
|
|
202
|
+
"BulkJobCallback",
|
|
203
|
+
"BulkJobCallbackParams",
|
|
204
|
+
"BulkJobInitResponseV1",
|
|
205
|
+
"BulkJobInitResponseV1Params",
|
|
172
206
|
"ChatCompletionRequestAssistantMessage",
|
|
173
207
|
"ChatCompletionRequestAssistantMessageParams",
|
|
174
208
|
"ChatCompletionRequestMessage",
|
|
@@ -194,6 +228,7 @@ __all__ = [
|
|
|
194
228
|
"ConfigureConnection",
|
|
195
229
|
"ConfigureConnectionData",
|
|
196
230
|
"ConfigureConnectionDataOutputAudioBitrate",
|
|
231
|
+
"ConfigureConnectionDataOutputAudioCodec",
|
|
197
232
|
"ConfigureConnectionDataParams",
|
|
198
233
|
"ConfigureConnectionDataSpeaker",
|
|
199
234
|
"ConfigureConnectionDataTargetLanguageCode",
|
|
@@ -217,12 +252,22 @@ __all__ = [
|
|
|
217
252
|
"ErrorResponseParams",
|
|
218
253
|
"EventsData",
|
|
219
254
|
"EventsDataParams",
|
|
255
|
+
"FileSignedUrlDetails",
|
|
256
|
+
"FileSignedUrlDetailsParams",
|
|
257
|
+
"FilesDownloadResponse",
|
|
258
|
+
"FilesDownloadResponseParams",
|
|
259
|
+
"FilesRequest",
|
|
260
|
+
"FilesRequestParams",
|
|
261
|
+
"FilesUploadResponse",
|
|
262
|
+
"FilesUploadResponseParams",
|
|
220
263
|
"FinishReason",
|
|
221
264
|
"FlushSignal",
|
|
222
265
|
"FlushSignalParams",
|
|
223
266
|
"ForbiddenError",
|
|
224
|
-
"Format",
|
|
225
267
|
"InternalServerError",
|
|
268
|
+
"JobState",
|
|
269
|
+
"JobStatusV1",
|
|
270
|
+
"JobStatusV1Params",
|
|
226
271
|
"LanguageIdentificationResponse",
|
|
227
272
|
"LanguageIdentificationResponseParams",
|
|
228
273
|
"NumeralsFormat",
|
|
@@ -240,6 +285,8 @@ __all__ = [
|
|
|
240
285
|
"SendTextParams",
|
|
241
286
|
"ServiceUnavailableError",
|
|
242
287
|
"SpeechSampleRate",
|
|
288
|
+
"SpeechToTextJobParameters",
|
|
289
|
+
"SpeechToTextJobParametersParams",
|
|
243
290
|
"SpeechToTextLanguage",
|
|
244
291
|
"SpeechToTextModel",
|
|
245
292
|
"SpeechToTextResponse",
|
|
@@ -254,6 +301,8 @@ __all__ = [
|
|
|
254
301
|
"SpeechToTextStreamingVadSignals",
|
|
255
302
|
"SpeechToTextTranscriptionData",
|
|
256
303
|
"SpeechToTextTranscriptionDataParams",
|
|
304
|
+
"SpeechToTextTranslateJobParameters",
|
|
305
|
+
"SpeechToTextTranslateJobParametersParams",
|
|
257
306
|
"SpeechToTextTranslateLanguage",
|
|
258
307
|
"SpeechToTextTranslateModel",
|
|
259
308
|
"SpeechToTextTranslateResponse",
|
|
@@ -270,8 +319,15 @@ __all__ = [
|
|
|
270
319
|
"SpokenFormNumeralsFormat",
|
|
271
320
|
"StopConfiguration",
|
|
272
321
|
"StopConfigurationParams",
|
|
322
|
+
"StorageContainerType",
|
|
323
|
+
"TaskDetailV1",
|
|
324
|
+
"TaskDetailV1Params",
|
|
325
|
+
"TaskFileDetails",
|
|
326
|
+
"TaskFileDetailsParams",
|
|
327
|
+
"TaskState",
|
|
273
328
|
"TextToSpeechLanguage",
|
|
274
329
|
"TextToSpeechModel",
|
|
330
|
+
"TextToSpeechOutputAudioCodec",
|
|
275
331
|
"TextToSpeechResponse",
|
|
276
332
|
"TextToSpeechResponseParams",
|
|
277
333
|
"TextToSpeechSpeaker",
|
|
@@ -296,7 +352,9 @@ __all__ = [
|
|
|
296
352
|
"__version__",
|
|
297
353
|
"chat",
|
|
298
354
|
"speech_to_text",
|
|
355
|
+
"speech_to_text_job",
|
|
299
356
|
"speech_to_text_streaming",
|
|
357
|
+
"speech_to_text_translate_job",
|
|
300
358
|
"speech_to_text_translate_streaming",
|
|
301
359
|
"text",
|
|
302
360
|
"text_to_speech",
|
sarvamai/client.py
CHANGED
|
@@ -9,7 +9,9 @@ from .core.api_error import ApiError
|
|
|
9
9
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
10
10
|
from .environment import SarvamAIEnvironment
|
|
11
11
|
from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient
|
|
12
|
+
from .speech_to_text_job.client import AsyncSpeechToTextJobClient, SpeechToTextJobClient
|
|
12
13
|
from .speech_to_text_streaming.client import AsyncSpeechToTextStreamingClient, SpeechToTextStreamingClient
|
|
14
|
+
from .speech_to_text_translate_job.client import AsyncSpeechToTextTranslateJobClient, SpeechToTextTranslateJobClient
|
|
13
15
|
from .speech_to_text_translate_streaming.client import (
|
|
14
16
|
AsyncSpeechToTextTranslateStreamingClient,
|
|
15
17
|
SpeechToTextTranslateStreamingClient,
|
|
@@ -88,6 +90,8 @@ class SarvamAI:
|
|
|
88
90
|
self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper)
|
|
89
91
|
self.text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper)
|
|
90
92
|
self.chat = ChatClient(client_wrapper=self._client_wrapper)
|
|
93
|
+
self.speech_to_text_job = SpeechToTextJobClient(client_wrapper=self._client_wrapper)
|
|
94
|
+
self.speech_to_text_translate_job = SpeechToTextTranslateJobClient(client_wrapper=self._client_wrapper)
|
|
91
95
|
self.speech_to_text_streaming = SpeechToTextStreamingClient(client_wrapper=self._client_wrapper)
|
|
92
96
|
self.speech_to_text_translate_streaming = SpeechToTextTranslateStreamingClient(
|
|
93
97
|
client_wrapper=self._client_wrapper
|
|
@@ -164,6 +168,8 @@ class AsyncSarvamAI:
|
|
|
164
168
|
self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper)
|
|
165
169
|
self.text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper)
|
|
166
170
|
self.chat = AsyncChatClient(client_wrapper=self._client_wrapper)
|
|
171
|
+
self.speech_to_text_job = AsyncSpeechToTextJobClient(client_wrapper=self._client_wrapper)
|
|
172
|
+
self.speech_to_text_translate_job = AsyncSpeechToTextTranslateJobClient(client_wrapper=self._client_wrapper)
|
|
167
173
|
self.speech_to_text_streaming = AsyncSpeechToTextStreamingClient(client_wrapper=self._client_wrapper)
|
|
168
174
|
self.speech_to_text_translate_streaming = AsyncSpeechToTextTranslateStreamingClient(
|
|
169
175
|
client_wrapper=self._client_wrapper
|
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.11",
|
|
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.11",
|
|
30
30
|
**(self.get_custom_headers() or {}),
|
|
31
31
|
}
|
|
32
32
|
headers["api-subscription-key"] = self.api_subscription_key
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
from ..core.api_error import ApiError
|
|
6
|
-
from ..types.error_message import ErrorMessage
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
class ServiceUnavailableError(ApiError):
|
|
10
|
-
def __init__(self, body:
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
10
|
super().__init__(status_code=503, headers=headers, body=body)
|
sarvamai/requests/__init__.py
CHANGED
|
@@ -6,6 +6,9 @@ from .audio_data import AudioDataParams
|
|
|
6
6
|
from .audio_message import AudioMessageParams
|
|
7
7
|
from .audio_output import AudioOutputParams
|
|
8
8
|
from .audio_output_data import AudioOutputDataParams
|
|
9
|
+
from .base_job_parameters import BaseJobParametersParams
|
|
10
|
+
from .bulk_job_callback import BulkJobCallbackParams
|
|
11
|
+
from .bulk_job_init_response_v_1 import BulkJobInitResponseV1Params
|
|
9
12
|
from .chat_completion_request_assistant_message import ChatCompletionRequestAssistantMessageParams
|
|
10
13
|
from .chat_completion_request_message import (
|
|
11
14
|
ChatCompletionRequestMessageParams,
|
|
@@ -30,20 +33,29 @@ from .error_message import ErrorMessageParams
|
|
|
30
33
|
from .error_response import ErrorResponseParams
|
|
31
34
|
from .error_response_data import ErrorResponseDataParams
|
|
32
35
|
from .events_data import EventsDataParams
|
|
36
|
+
from .file_signed_url_details import FileSignedUrlDetailsParams
|
|
37
|
+
from .files_download_response import FilesDownloadResponseParams
|
|
38
|
+
from .files_request import FilesRequestParams
|
|
39
|
+
from .files_upload_response import FilesUploadResponseParams
|
|
33
40
|
from .flush_signal import FlushSignalParams
|
|
41
|
+
from .job_status_v_1 import JobStatusV1Params
|
|
34
42
|
from .language_identification_response import LanguageIdentificationResponseParams
|
|
35
43
|
from .ping_signal import PingSignalParams
|
|
36
44
|
from .send_text import SendTextParams
|
|
37
45
|
from .send_text_data import SendTextDataParams
|
|
46
|
+
from .speech_to_text_job_parameters import SpeechToTextJobParametersParams
|
|
38
47
|
from .speech_to_text_response import SpeechToTextResponseParams
|
|
39
48
|
from .speech_to_text_response_data import SpeechToTextResponseDataParams
|
|
40
49
|
from .speech_to_text_streaming_response import SpeechToTextStreamingResponseParams
|
|
41
50
|
from .speech_to_text_transcription_data import SpeechToTextTranscriptionDataParams
|
|
51
|
+
from .speech_to_text_translate_job_parameters import SpeechToTextTranslateJobParametersParams
|
|
42
52
|
from .speech_to_text_translate_response import SpeechToTextTranslateResponseParams
|
|
43
53
|
from .speech_to_text_translate_response_data import SpeechToTextTranslateResponseDataParams
|
|
44
54
|
from .speech_to_text_translate_streaming_response import SpeechToTextTranslateStreamingResponseParams
|
|
45
55
|
from .speech_to_text_translate_transcription_data import SpeechToTextTranslateTranscriptionDataParams
|
|
46
56
|
from .stop_configuration import StopConfigurationParams
|
|
57
|
+
from .task_detail_v_1 import TaskDetailV1Params
|
|
58
|
+
from .task_file_details import TaskFileDetailsParams
|
|
47
59
|
from .text_to_speech_response import TextToSpeechResponseParams
|
|
48
60
|
from .timestamps_model import TimestampsModelParams
|
|
49
61
|
from .transcription_metrics import TranscriptionMetricsParams
|
|
@@ -55,6 +67,9 @@ __all__ = [
|
|
|
55
67
|
"AudioMessageParams",
|
|
56
68
|
"AudioOutputDataParams",
|
|
57
69
|
"AudioOutputParams",
|
|
70
|
+
"BaseJobParametersParams",
|
|
71
|
+
"BulkJobCallbackParams",
|
|
72
|
+
"BulkJobInitResponseV1Params",
|
|
58
73
|
"ChatCompletionRequestAssistantMessageParams",
|
|
59
74
|
"ChatCompletionRequestMessageParams",
|
|
60
75
|
"ChatCompletionRequestMessage_AssistantParams",
|
|
@@ -77,20 +92,29 @@ __all__ = [
|
|
|
77
92
|
"ErrorResponseDataParams",
|
|
78
93
|
"ErrorResponseParams",
|
|
79
94
|
"EventsDataParams",
|
|
95
|
+
"FileSignedUrlDetailsParams",
|
|
96
|
+
"FilesDownloadResponseParams",
|
|
97
|
+
"FilesRequestParams",
|
|
98
|
+
"FilesUploadResponseParams",
|
|
80
99
|
"FlushSignalParams",
|
|
100
|
+
"JobStatusV1Params",
|
|
81
101
|
"LanguageIdentificationResponseParams",
|
|
82
102
|
"PingSignalParams",
|
|
83
103
|
"SendTextDataParams",
|
|
84
104
|
"SendTextParams",
|
|
105
|
+
"SpeechToTextJobParametersParams",
|
|
85
106
|
"SpeechToTextResponseDataParams",
|
|
86
107
|
"SpeechToTextResponseParams",
|
|
87
108
|
"SpeechToTextStreamingResponseParams",
|
|
88
109
|
"SpeechToTextTranscriptionDataParams",
|
|
110
|
+
"SpeechToTextTranslateJobParametersParams",
|
|
89
111
|
"SpeechToTextTranslateResponseDataParams",
|
|
90
112
|
"SpeechToTextTranslateResponseParams",
|
|
91
113
|
"SpeechToTextTranslateStreamingResponseParams",
|
|
92
114
|
"SpeechToTextTranslateTranscriptionDataParams",
|
|
93
115
|
"StopConfigurationParams",
|
|
116
|
+
"TaskDetailV1Params",
|
|
117
|
+
"TaskFileDetailsParams",
|
|
94
118
|
"TextToSpeechResponseParams",
|
|
95
119
|
"TimestampsModelParams",
|
|
96
120
|
"TranscriptionMetricsParams",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class BulkJobCallbackParams(typing_extensions.TypedDict):
|
|
7
|
+
url: str
|
|
8
|
+
"""
|
|
9
|
+
Webhook url to call upon job completion
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
auth_token: typing_extensions.NotRequired[str]
|
|
13
|
+
"""
|
|
14
|
+
Authorization token required for the callback Url
|
|
15
|
+
"""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing_extensions
|
|
4
|
+
from ..types.job_state import JobState
|
|
5
|
+
from ..types.storage_container_type import StorageContainerType
|
|
6
|
+
from .base_job_parameters import BaseJobParametersParams
|
|
7
|
+
from .bulk_job_callback import BulkJobCallbackParams
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BulkJobInitResponseV1Params(typing_extensions.TypedDict):
|
|
11
|
+
job_id: str
|
|
12
|
+
"""
|
|
13
|
+
Job UUID.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
storage_container_type: StorageContainerType
|
|
17
|
+
"""
|
|
18
|
+
Storage Container Type
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
job_parameters: BaseJobParametersParams
|
|
22
|
+
job_state: JobState
|
|
23
|
+
owner_id: str
|
|
24
|
+
callback: typing_extensions.NotRequired[BulkJobCallbackParams]
|
|
25
|
+
"""
|
|
26
|
+
Parameters for callback URL
|
|
27
|
+
"""
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
3
|
import typing_extensions
|
|
6
4
|
from ..types.configure_connection_data_output_audio_bitrate import ConfigureConnectionDataOutputAudioBitrate
|
|
5
|
+
from ..types.configure_connection_data_output_audio_codec import ConfigureConnectionDataOutputAudioCodec
|
|
7
6
|
from ..types.configure_connection_data_speaker import ConfigureConnectionDataSpeaker
|
|
8
7
|
from ..types.configure_connection_data_target_language_code import ConfigureConnectionDataTargetLanguageCode
|
|
9
8
|
|
|
@@ -62,7 +61,7 @@ class ConfigureConnectionDataParams(typing_extensions.TypedDict):
|
|
|
62
61
|
of mixed-language text. Default is false.
|
|
63
62
|
"""
|
|
64
63
|
|
|
65
|
-
output_audio_codec: typing_extensions.NotRequired[
|
|
64
|
+
output_audio_codec: typing_extensions.NotRequired[ConfigureConnectionDataOutputAudioCodec]
|
|
66
65
|
"""
|
|
67
66
|
Audio codec (currently supports MP3 only, optimized for real-time playback)
|
|
68
67
|
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FileSignedUrlDetailsParams(typing_extensions.TypedDict):
|
|
9
|
+
file_url: str
|
|
10
|
+
file_metadata: typing_extensions.NotRequired[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..types.job_state import JobState
|
|
7
|
+
from ..types.storage_container_type import StorageContainerType
|
|
8
|
+
from .file_signed_url_details import FileSignedUrlDetailsParams
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FilesDownloadResponseParams(typing_extensions.TypedDict):
|
|
12
|
+
job_id: str
|
|
13
|
+
job_state: JobState
|
|
14
|
+
download_urls: typing.Dict[str, FileSignedUrlDetailsParams]
|
|
15
|
+
storage_container_type: StorageContainerType
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..types.job_state import JobState
|
|
7
|
+
from ..types.storage_container_type import StorageContainerType
|
|
8
|
+
from .file_signed_url_details import FileSignedUrlDetailsParams
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FilesUploadResponseParams(typing_extensions.TypedDict):
|
|
12
|
+
job_id: str
|
|
13
|
+
job_state: JobState
|
|
14
|
+
upload_urls: typing.Dict[str, FileSignedUrlDetailsParams]
|
|
15
|
+
storage_container_type: StorageContainerType
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..types.job_state import JobState
|
|
7
|
+
from ..types.storage_container_type import StorageContainerType
|
|
8
|
+
from .task_detail_v_1 import TaskDetailV1Params
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class JobStatusV1Params(typing_extensions.TypedDict):
|
|
12
|
+
job_state: JobState
|
|
13
|
+
"""
|
|
14
|
+
Job State
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
created_at: str
|
|
18
|
+
"""
|
|
19
|
+
Created At
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
updated_at: str
|
|
23
|
+
"""
|
|
24
|
+
Updated At
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
job_id: str
|
|
28
|
+
"""
|
|
29
|
+
Job Id
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
total_files: typing_extensions.NotRequired[int]
|
|
33
|
+
"""
|
|
34
|
+
Total Files
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
successful_files_count: typing_extensions.NotRequired[int]
|
|
38
|
+
"""
|
|
39
|
+
Success Count
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
failed_files_count: typing_extensions.NotRequired[int]
|
|
43
|
+
"""
|
|
44
|
+
Failed Count
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
owner_id: str
|
|
48
|
+
"""
|
|
49
|
+
Owner of the job
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
storage_container_type: StorageContainerType
|
|
53
|
+
"""
|
|
54
|
+
Storage Container Type
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
error_message: typing_extensions.NotRequired[str]
|
|
58
|
+
"""
|
|
59
|
+
Error Message
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
job_details: typing_extensions.NotRequired[typing.Sequence[TaskDetailV1Params]]
|
|
63
|
+
"""
|
|
64
|
+
Job details at file level.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
num_internal_retries: typing_extensions.NotRequired[int]
|
|
68
|
+
"""
|
|
69
|
+
Number of internal retries
|
|
70
|
+
"""
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing_extensions
|
|
4
|
+
from ..types.speech_to_text_model import SpeechToTextModel
|
|
5
|
+
from ..types.speech_to_text_translate_language import SpeechToTextTranslateLanguage
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SpeechToTextJobParametersParams(typing_extensions.TypedDict):
|
|
9
|
+
language_code: typing_extensions.NotRequired[SpeechToTextTranslateLanguage]
|
|
10
|
+
"""
|
|
11
|
+
Language code
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
model: typing_extensions.NotRequired[SpeechToTextModel]
|
|
15
|
+
"""
|
|
16
|
+
Model to be used for speech to text
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
with_timestamps: typing_extensions.NotRequired[bool]
|
|
20
|
+
"""
|
|
21
|
+
Whether to include timestamps in the response
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
with_diarization: typing_extensions.NotRequired[bool]
|
|
25
|
+
"""
|
|
26
|
+
Enables speaker diarization, which identifies and separates different speakers in the audio. In beta mode
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
num_speakers: typing_extensions.NotRequired[int]
|
|
30
|
+
"""
|
|
31
|
+
Number of speakers to be detected in the audio. This is used when with_diarization is true.
|
|
32
|
+
"""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing_extensions
|
|
4
|
+
from ..types.speech_to_text_translate_model import SpeechToTextTranslateModel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SpeechToTextTranslateJobParametersParams(typing_extensions.TypedDict):
|
|
8
|
+
prompt: typing_extensions.NotRequired[str]
|
|
9
|
+
"""
|
|
10
|
+
Prompt to assist the transcription
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
model: typing_extensions.NotRequired[SpeechToTextTranslateModel]
|
|
14
|
+
"""
|
|
15
|
+
Model to be used for converting speech to text in target language
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
with_diarization: typing_extensions.NotRequired[bool]
|
|
19
|
+
"""
|
|
20
|
+
Enables speaker diarization, which identifies and separates different speakers in the audio.
|
|
21
|
+
When set to true, the API will provide speaker-specific segments in the response.
|
|
22
|
+
Note: This parameter is currently in Beta mode.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
num_speakers: typing_extensions.NotRequired[int]
|
|
26
|
+
"""
|
|
27
|
+
Number of speakers to be detected in the audio. This is used when with_diarization is set to true.
|
|
28
|
+
"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..types.task_state import TaskState
|
|
7
|
+
from .task_file_details import TaskFileDetailsParams
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TaskDetailV1Params(typing_extensions.TypedDict):
|
|
11
|
+
inputs: typing_extensions.NotRequired[typing.Sequence[TaskFileDetailsParams]]
|
|
12
|
+
outputs: typing_extensions.NotRequired[typing.Sequence[TaskFileDetailsParams]]
|
|
13
|
+
state: typing_extensions.NotRequired[TaskState]
|
|
14
|
+
error_message: typing_extensions.NotRequired[str]
|
|
15
|
+
exception_name: typing_extensions.NotRequired[str]
|