sarvamai 0.1.7__py3-none-any.whl → 0.1.7a0__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 +60 -1
- sarvamai/client.py +3 -0
- sarvamai/core/client_wrapper.py +2 -2
- sarvamai/errors/service_unavailable_error.py +1 -2
- sarvamai/requests/__init__.py +22 -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/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/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 +454 -0
- sarvamai/speech_to_text_job/raw_client.py +1189 -0
- sarvamai/types/__init__.py +28 -0
- 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/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/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-0.1.7.dist-info → sarvamai-0.1.7a0.dist-info}/METADATA +2 -2
- {sarvamai-0.1.7.dist-info → sarvamai-0.1.7a0.dist-info}/RECORD +38 -10
- {sarvamai-0.1.7.dist-info → sarvamai-0.1.7a0.dist-info}/WHEEL +0 -0
sarvamai/types/__init__.py
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
from .audio_data import AudioData
|
|
6
6
|
from .audio_message import AudioMessage
|
|
7
|
+
from .base_job_parameters import BaseJobParameters
|
|
8
|
+
from .bulk_job_callback import BulkJobCallback
|
|
9
|
+
from .bulk_job_init_response_v_1 import BulkJobInitResponseV1
|
|
7
10
|
from .chat_completion_request_assistant_message import ChatCompletionRequestAssistantMessage
|
|
8
11
|
from .chat_completion_request_message import (
|
|
9
12
|
ChatCompletionRequestMessage,
|
|
@@ -25,8 +28,14 @@ from .error_data import ErrorData
|
|
|
25
28
|
from .error_details import ErrorDetails
|
|
26
29
|
from .error_message import ErrorMessage
|
|
27
30
|
from .events_data import EventsData
|
|
31
|
+
from .file_signed_url_details import FileSignedUrlDetails
|
|
32
|
+
from .files_download_response import FilesDownloadResponse
|
|
33
|
+
from .files_request import FilesRequest
|
|
34
|
+
from .files_upload_response import FilesUploadResponse
|
|
28
35
|
from .finish_reason import FinishReason
|
|
29
36
|
from .format import Format
|
|
37
|
+
from .job_state import JobState
|
|
38
|
+
from .job_status_v_1 import JobStatusV1
|
|
30
39
|
from .language_identification_response import LanguageIdentificationResponse
|
|
31
40
|
from .numerals_format import NumeralsFormat
|
|
32
41
|
from .reasoning_effort import ReasoningEffort
|
|
@@ -34,6 +43,7 @@ from .response_type import ResponseType
|
|
|
34
43
|
from .role import Role
|
|
35
44
|
from .sarvam_model_ids import SarvamModelIds
|
|
36
45
|
from .speech_sample_rate import SpeechSampleRate
|
|
46
|
+
from .speech_to_text_job_parameters import SpeechToTextJobParameters
|
|
37
47
|
from .speech_to_text_language import SpeechToTextLanguage
|
|
38
48
|
from .speech_to_text_model import SpeechToTextModel
|
|
39
49
|
from .speech_to_text_response import SpeechToTextResponse
|
|
@@ -48,6 +58,10 @@ from .speech_to_text_translate_streaming_response import SpeechToTextTranslateSt
|
|
|
48
58
|
from .speech_to_text_translate_transcription_data import SpeechToTextTranslateTranscriptionData
|
|
49
59
|
from .spoken_form_numerals_format import SpokenFormNumeralsFormat
|
|
50
60
|
from .stop_configuration import StopConfiguration
|
|
61
|
+
from .storage_container_type import StorageContainerType
|
|
62
|
+
from .task_detail_v_1 import TaskDetailV1
|
|
63
|
+
from .task_file_details import TaskFileDetails
|
|
64
|
+
from .task_state import TaskState
|
|
51
65
|
from .text_to_speech_language import TextToSpeechLanguage
|
|
52
66
|
from .text_to_speech_model import TextToSpeechModel
|
|
53
67
|
from .text_to_speech_response import TextToSpeechResponse
|
|
@@ -68,6 +82,9 @@ from .transliteration_response import TransliterationResponse
|
|
|
68
82
|
__all__ = [
|
|
69
83
|
"AudioData",
|
|
70
84
|
"AudioMessage",
|
|
85
|
+
"BaseJobParameters",
|
|
86
|
+
"BulkJobCallback",
|
|
87
|
+
"BulkJobInitResponseV1",
|
|
71
88
|
"ChatCompletionRequestAssistantMessage",
|
|
72
89
|
"ChatCompletionRequestMessage",
|
|
73
90
|
"ChatCompletionRequestMessage_Assistant",
|
|
@@ -87,8 +104,14 @@ __all__ = [
|
|
|
87
104
|
"ErrorDetails",
|
|
88
105
|
"ErrorMessage",
|
|
89
106
|
"EventsData",
|
|
107
|
+
"FileSignedUrlDetails",
|
|
108
|
+
"FilesDownloadResponse",
|
|
109
|
+
"FilesRequest",
|
|
110
|
+
"FilesUploadResponse",
|
|
90
111
|
"FinishReason",
|
|
91
112
|
"Format",
|
|
113
|
+
"JobState",
|
|
114
|
+
"JobStatusV1",
|
|
92
115
|
"LanguageIdentificationResponse",
|
|
93
116
|
"NumeralsFormat",
|
|
94
117
|
"ReasoningEffort",
|
|
@@ -96,6 +119,7 @@ __all__ = [
|
|
|
96
119
|
"Role",
|
|
97
120
|
"SarvamModelIds",
|
|
98
121
|
"SpeechSampleRate",
|
|
122
|
+
"SpeechToTextJobParameters",
|
|
99
123
|
"SpeechToTextLanguage",
|
|
100
124
|
"SpeechToTextModel",
|
|
101
125
|
"SpeechToTextResponse",
|
|
@@ -110,6 +134,10 @@ __all__ = [
|
|
|
110
134
|
"SpeechToTextTranslateTranscriptionData",
|
|
111
135
|
"SpokenFormNumeralsFormat",
|
|
112
136
|
"StopConfiguration",
|
|
137
|
+
"StorageContainerType",
|
|
138
|
+
"TaskDetailV1",
|
|
139
|
+
"TaskFileDetails",
|
|
140
|
+
"TaskState",
|
|
113
141
|
"TextToSpeechLanguage",
|
|
114
142
|
"TextToSpeechModel",
|
|
115
143
|
"TextToSpeechResponse",
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class BaseJobParameters(UniversalBaseModel):
|
|
10
|
+
if IS_PYDANTIC_V2:
|
|
11
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
12
|
+
else:
|
|
13
|
+
|
|
14
|
+
class Config:
|
|
15
|
+
frozen = True
|
|
16
|
+
smart_union = True
|
|
17
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class BulkJobCallback(UniversalBaseModel):
|
|
10
|
+
url: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
Webhook url to call upon job completion
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
auth_token: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Authorization token required for the callback Url
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,39 @@
|
|
|
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 .base_job_parameters import BaseJobParameters
|
|
8
|
+
from .bulk_job_callback import BulkJobCallback
|
|
9
|
+
from .job_state import JobState
|
|
10
|
+
from .storage_container_type import StorageContainerType
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class BulkJobInitResponseV1(UniversalBaseModel):
|
|
14
|
+
job_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Job UUID.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
storage_container_type: StorageContainerType = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Storage Container Type
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
job_parameters: BaseJobParameters
|
|
25
|
+
job_state: JobState
|
|
26
|
+
owner_id: str
|
|
27
|
+
callback: typing.Optional[BulkJobCallback] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Parameters for callback URL
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
if IS_PYDANTIC_V2:
|
|
33
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
34
|
+
else:
|
|
35
|
+
|
|
36
|
+
class Config:
|
|
37
|
+
frozen = True
|
|
38
|
+
smart_union = True
|
|
39
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class FileSignedUrlDetails(UniversalBaseModel):
|
|
10
|
+
file_url: str
|
|
11
|
+
file_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
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 .file_signed_url_details import FileSignedUrlDetails
|
|
8
|
+
from .job_state import JobState
|
|
9
|
+
from .storage_container_type import StorageContainerType
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FilesDownloadResponse(UniversalBaseModel):
|
|
13
|
+
job_id: str
|
|
14
|
+
job_state: JobState
|
|
15
|
+
download_urls: typing.Dict[str, FileSignedUrlDetails]
|
|
16
|
+
storage_container_type: StorageContainerType
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class FilesRequest(UniversalBaseModel):
|
|
10
|
+
job_id: str
|
|
11
|
+
files: typing.List[str]
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
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 .file_signed_url_details import FileSignedUrlDetails
|
|
8
|
+
from .job_state import JobState
|
|
9
|
+
from .storage_container_type import StorageContainerType
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FilesUploadResponse(UniversalBaseModel):
|
|
13
|
+
job_id: str
|
|
14
|
+
job_state: JobState
|
|
15
|
+
upload_urls: typing.Dict[str, FileSignedUrlDetails]
|
|
16
|
+
storage_container_type: StorageContainerType
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,80 @@
|
|
|
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 .job_state import JobState
|
|
8
|
+
from .storage_container_type import StorageContainerType
|
|
9
|
+
from .task_detail_v_1 import TaskDetailV1
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class JobStatusV1(UniversalBaseModel):
|
|
13
|
+
job_state: JobState = pydantic.Field()
|
|
14
|
+
"""
|
|
15
|
+
Job State
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
created_at: str = pydantic.Field()
|
|
19
|
+
"""
|
|
20
|
+
Created At
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
updated_at: str = pydantic.Field()
|
|
24
|
+
"""
|
|
25
|
+
Updated At
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
job_id: str = pydantic.Field()
|
|
29
|
+
"""
|
|
30
|
+
Job Id
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
total_files: typing.Optional[int] = pydantic.Field(default=None)
|
|
34
|
+
"""
|
|
35
|
+
Total Files
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
successful_files_count: typing.Optional[int] = pydantic.Field(default=None)
|
|
39
|
+
"""
|
|
40
|
+
Success Count
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
failed_files_count: typing.Optional[int] = pydantic.Field(default=None)
|
|
44
|
+
"""
|
|
45
|
+
Failed Count
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
owner_id: str = pydantic.Field()
|
|
49
|
+
"""
|
|
50
|
+
Owner of the job
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
storage_container_type: StorageContainerType = pydantic.Field()
|
|
54
|
+
"""
|
|
55
|
+
Storage Container Type
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
error_message: typing.Optional[str] = pydantic.Field(default=None)
|
|
59
|
+
"""
|
|
60
|
+
Error Message
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
job_details: typing.Optional[typing.List[TaskDetailV1]] = pydantic.Field(default=None)
|
|
64
|
+
"""
|
|
65
|
+
Job details at file level.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
num_internal_retries: typing.Optional[int] = pydantic.Field(default=None)
|
|
69
|
+
"""
|
|
70
|
+
Number of internal retries
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
if IS_PYDANTIC_V2:
|
|
74
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
75
|
+
else:
|
|
76
|
+
|
|
77
|
+
class Config:
|
|
78
|
+
frozen = True
|
|
79
|
+
smart_union = True
|
|
80
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,44 @@
|
|
|
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 .speech_to_text_model import SpeechToTextModel
|
|
8
|
+
from .speech_to_text_translate_language import SpeechToTextTranslateLanguage
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SpeechToTextJobParameters(UniversalBaseModel):
|
|
12
|
+
language_code: typing.Optional[SpeechToTextTranslateLanguage] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Language code
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
model: typing.Optional[SpeechToTextModel] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Model to be used for speech to text
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
with_timestamps: typing.Optional[bool] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
Whether to include timestamps in the response
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
with_diarization: typing.Optional[bool] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Enables speaker diarization, which identifies and separates different speakers in the audio. In beta mode
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
num_speakers: typing.Optional[int] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
Number of speakers to be detected in the audio. This is used when with_diarization is true.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
if IS_PYDANTIC_V2:
|
|
38
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
39
|
+
else:
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
frozen = True
|
|
43
|
+
smart_union = True
|
|
44
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
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 .task_file_details import TaskFileDetails
|
|
8
|
+
from .task_state import TaskState
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TaskDetailV1(UniversalBaseModel):
|
|
12
|
+
inputs: typing.Optional[typing.List[TaskFileDetails]] = None
|
|
13
|
+
outputs: typing.Optional[typing.List[TaskFileDetails]] = None
|
|
14
|
+
state: typing.Optional[TaskState] = None
|
|
15
|
+
error_message: typing.Optional[str] = None
|
|
16
|
+
exception_name: typing.Optional[str] = None
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class TaskFileDetails(UniversalBaseModel):
|
|
10
|
+
file_name: str
|
|
11
|
+
file_id: str
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sarvamai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7a0
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -34,7 +34,7 @@ The Sarvam Python library provides convenient access to the Sarvam API from Pyth
|
|
|
34
34
|
|
|
35
35
|
## Documentation
|
|
36
36
|
|
|
37
|
-
API reference documentation is available [here](https://
|
|
37
|
+
API reference documentation is available [here](https://docs.sarvam.ai/api-reference-docs/speech-to-text/).
|
|
38
38
|
|
|
39
39
|
## Installation
|
|
40
40
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
sarvamai/__init__.py,sha256
|
|
1
|
+
sarvamai/__init__.py,sha256=3wFFXJ2C_IachNm9lqXhVV5AW3kmYstLJQ19q-HHfv8,8898
|
|
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
|
-
sarvamai/client.py,sha256=
|
|
5
|
+
sarvamai/client.py,sha256=wV-wrEMzOmfiCOObayv3qGTBDuBi7FFdSPhjbK04eM0,7135
|
|
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=0AKPRXEy3V4LtQ1OjMKoGkJSlTApVUw1W_KLCOUE3vY,2078
|
|
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
|
|
@@ -23,14 +23,17 @@ sarvamai/errors/__init__.py,sha256=EEGwHETz9DGVcwYvrxxvTpfqaG-tjF-SiYEe6ULeXt4,5
|
|
|
23
23
|
sarvamai/errors/bad_request_error.py,sha256=PnE3v3kETCXm9E3LiNcHLNtjPEUvpe98-r59q-kQb78,338
|
|
24
24
|
sarvamai/errors/forbidden_error.py,sha256=JhKThpM90vF0BEmaBn-8P_0NVYmgJ2BE9kvWmLxU_nA,337
|
|
25
25
|
sarvamai/errors/internal_server_error.py,sha256=t1-kpoDC2biEuoE-Ne8v1kuQswvsIEwt_xPPoBmGG00,342
|
|
26
|
-
sarvamai/errors/service_unavailable_error.py,sha256=
|
|
26
|
+
sarvamai/errors/service_unavailable_error.py,sha256=MIoOqruDBRDJtJJFK45O4_Xwjcwh4diwKbpHlqNQ-ZI,346
|
|
27
27
|
sarvamai/errors/too_many_requests_error.py,sha256=Dl-_pfpboXJh-OtSbRaPQOB-UXvpVOElRDgjxbi4j7w,343
|
|
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=
|
|
31
|
+
sarvamai/requests/__init__.py,sha256=8F_AeXZzLn1vU4Pi47Qjb4gXZfNodyLQMetWdh5UBM0,4675
|
|
32
32
|
sarvamai/requests/audio_data.py,sha256=QI3SK5aiAg2yJ-m3l9CxOkONnH3CCKMFCl9kAdMs19o,410
|
|
33
33
|
sarvamai/requests/audio_message.py,sha256=ZBeogjGE6YFXXM-0g8zq9SoizDk21reR0YXSB-0fMjg,214
|
|
34
|
+
sarvamai/requests/base_job_parameters.py,sha256=5-DGqoCcIt5PM_-LO8hzuTqnuW5arxpEzimAmL9rLKM,161
|
|
35
|
+
sarvamai/requests/bulk_job_callback.py,sha256=6MvZSY0l2lch9skJzy8qBpuZ9KJoLv3ZL7SYP2rNlUI,345
|
|
36
|
+
sarvamai/requests/bulk_job_init_response_v_1.py,sha256=qvi0lb0squV7PXiLbspspHMXjBefXqNThx-VTwbZHSQ,710
|
|
34
37
|
sarvamai/requests/chat_completion_request_assistant_message.py,sha256=xI6nqqY2t4j56DGEAt2aasDnI7no_mxxCBk_ChxNQjg,247
|
|
35
38
|
sarvamai/requests/chat_completion_request_message.py,sha256=B5tOPGNdSaMOJRl0k26uuXaqvpTrftiu-99CDDBTnSI,736
|
|
36
39
|
sarvamai/requests/chat_completion_request_system_message.py,sha256=ZvjBuyL0oM7Vwd9bR_Yc7yGXUGLHYn9Np9jqEebiMRs,242
|
|
@@ -46,7 +49,13 @@ sarvamai/requests/error_data.py,sha256=u87qHVagiqyyowBgMDAPPLlZzr0Z5GXlOU7VIUzfQ
|
|
|
46
49
|
sarvamai/requests/error_details.py,sha256=By7cYfitQynAM1D5_3yFc22zXQJEceNgkhoyGWmg4zw,529
|
|
47
50
|
sarvamai/requests/error_message.py,sha256=-J21pfEJghsms4pNe55O_9qkODNd-BKLMt96AOztYUs,257
|
|
48
51
|
sarvamai/requests/events_data.py,sha256=3seSash8DysPUWX6mKPzoEzWZlsrK4Tann2GFSbQjZg,286
|
|
52
|
+
sarvamai/requests/file_signed_url_details.py,sha256=s1ah-U99qq1DZOJr1SHVyknnCZTDS7tkw_XWgdqyZVM,284
|
|
53
|
+
sarvamai/requests/files_download_response.py,sha256=lQg7yVJtiMvt4OR0WcDbaL9jCi77wY9iFJ0StFsTTZY,491
|
|
54
|
+
sarvamai/requests/files_request.py,sha256=VtmR-bfsOgYW_fYkreDCGkZl9uumxz-RFDBHebAQ2Yg,210
|
|
55
|
+
sarvamai/requests/files_upload_response.py,sha256=vXM35jRe_kSZ6ydSTq7MeZEkLpdeZN01n36YvdM8b8M,487
|
|
56
|
+
sarvamai/requests/job_status_v_1.py,sha256=uPki82pWAi4lo7GrJuot0qpXUq5M382d_PPRFGB0kxo,1269
|
|
49
57
|
sarvamai/requests/language_identification_response.py,sha256=BdS5U9Gic-71vb--ph6HGvd2hGNKDXERC7yrn8vFcvI,1098
|
|
58
|
+
sarvamai/requests/speech_to_text_job_parameters.py,sha256=F3V6XvdUQlWlB4-5XAcRsFLBlCRUkaGSfmi1v2uYw3k,1009
|
|
50
59
|
sarvamai/requests/speech_to_text_response.py,sha256=GS3jNmHDOxqNZ7cvftD62khUMSBIQUu6zEPdCqk8zJk,1041
|
|
51
60
|
sarvamai/requests/speech_to_text_response_data.py,sha256=69fYRdL0tCKpgKQqwzcM4T4Nf_lRxJFh-VCFe_tN964,364
|
|
52
61
|
sarvamai/requests/speech_to_text_streaming_response.py,sha256=cN5tKE9wOWuyBna4wmrf-0LfkOULMpRaJ7qjLuu76V0,348
|
|
@@ -56,6 +65,8 @@ sarvamai/requests/speech_to_text_translate_response_data.py,sha256=OmjunP9R2xert
|
|
|
56
65
|
sarvamai/requests/speech_to_text_translate_streaming_response.py,sha256=KTjYZ0_oLapuM5Iiq7UwejMsrL1TGgFAW4k5l17TkZs,385
|
|
57
66
|
sarvamai/requests/speech_to_text_translate_transcription_data.py,sha256=oAmW5ihTd301IJYN2u2KrZxB0j3EMacFBfvIhtOSjFI,595
|
|
58
67
|
sarvamai/requests/stop_configuration.py,sha256=Xmp8zyUpnN65pH5A7NqefckB8wk53_BBzOUrgRm2gXs,146
|
|
68
|
+
sarvamai/requests/task_detail_v_1.py,sha256=2rehl7dSDSgzaw13b9bODamhiN2uB-IK4cOksq8Vmqc,582
|
|
69
|
+
sarvamai/requests/task_file_details.py,sha256=yf6NVXymizG9wTsCGl-xolsxDA_nDOzM3qeabiqMs60,186
|
|
59
70
|
sarvamai/requests/text_to_speech_response.py,sha256=-FNMERV6zrwIH27htwBy3QiPY8WhbTmlmQ06RegYQaw,391
|
|
60
71
|
sarvamai/requests/timestamps_model.py,sha256=LkaYC5poipZe4r5-7Tp_Y058RXYWXwocn46GvGpZJzs,464
|
|
61
72
|
sarvamai/requests/transcription_metrics.py,sha256=FDclX2Z9Z3azrDXxtZW8xbkxxWMZQXEbaYMMheAAAdk,321
|
|
@@ -63,7 +74,10 @@ sarvamai/requests/translation_response.py,sha256=8iwQeZB1purHY757bIQI-n9QeVRBIta
|
|
|
63
74
|
sarvamai/requests/transliteration_response.py,sha256=KqRkqnegLmt7LjdVxjRePX6RoqaLm64KFGZ6q7mXyfw,426
|
|
64
75
|
sarvamai/speech_to_text/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
65
76
|
sarvamai/speech_to_text/client.py,sha256=E76V1BZ236AN37cvm7c-NTRTnDleiYQ4_hKHE3wfevY,11435
|
|
66
|
-
sarvamai/speech_to_text/raw_client.py,sha256=
|
|
77
|
+
sarvamai/speech_to_text/raw_client.py,sha256=tJIoL1ZZmHkfDIxotK90N9dBJoT4YGKp4Jib88GNFTk,25763
|
|
78
|
+
sarvamai/speech_to_text_job/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
79
|
+
sarvamai/speech_to_text_job/client.py,sha256=kmYoK39CK9TlLwSRU3sLzTbP4QzqmHbk3ehC8oUASmA,12468
|
|
80
|
+
sarvamai/speech_to_text_job/raw_client.py,sha256=v14drcQLAmpqozRUNKmw1F9j3omieMPC8R88Th1BID8,48055
|
|
67
81
|
sarvamai/speech_to_text_streaming/__init__.py,sha256=q7QygMmZCHJ-4FMhhL_6XNV_dsqlIFRCO1iSxoyxaaY,437
|
|
68
82
|
sarvamai/speech_to_text_streaming/client.py,sha256=WdkzZxKMdnQ2hHv9hzJlfSNggRJLKFljRiC7695Jcog,8224
|
|
69
83
|
sarvamai/speech_to_text_streaming/raw_client.py,sha256=7zcgVw7CXA2TySkJKQkS-NdnJOMRudmV_m4NaigICN0,7405
|
|
@@ -87,9 +101,12 @@ sarvamai/text/raw_client.py,sha256=lQ7bV9aVqxjwEUHMPEZ4x0_Xs036_yFArMK9rnYT4ZI,4
|
|
|
87
101
|
sarvamai/text_to_speech/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
88
102
|
sarvamai/text_to_speech/client.py,sha256=aVvwdGTfgVUekALLpdyxKNsGUZQ2Ee2OZBLx6WP6g_E,8842
|
|
89
103
|
sarvamai/text_to_speech/raw_client.py,sha256=3Zu6HN_FOY683Vm-EN-OL7YAbLsftjJlFm5OyRGNtYc,14780
|
|
90
|
-
sarvamai/types/__init__.py,sha256=
|
|
104
|
+
sarvamai/types/__init__.py,sha256=fH1l3na4z2VG9lo4soswfRHTd-j4dw4KuwqzV_aqBbw,6256
|
|
91
105
|
sarvamai/types/audio_data.py,sha256=rgOukLkLNJ_HBBVE2g5dfEL2CWjRoGiMvCtpq0qTB1Y,829
|
|
92
106
|
sarvamai/types/audio_message.py,sha256=sB4EgkWkWJzipYXobkmM9AYZTTZtCpg_ySKssUeznUE,560
|
|
107
|
+
sarvamai/types/base_job_parameters.py,sha256=x-6SDzT2JxsGNUNuMskw8drWj6UwqgCaeo33XrlgKvo,509
|
|
108
|
+
sarvamai/types/bulk_job_callback.py,sha256=mEpKCadWIqZhXlaJztnAhGmydln_6ykvEotFGEQ0RtI,739
|
|
109
|
+
sarvamai/types/bulk_job_init_response_v_1.py,sha256=1iPzqVz6pN9zWWxthboPl2yFHOsewkqjlNwVmV0RTaE,1085
|
|
93
110
|
sarvamai/types/chat_completion_request_assistant_message.py,sha256=pFSONJ6CBsv3frcteid66SOKMkFwQ1UJs_e0XwwbKis,624
|
|
94
111
|
sarvamai/types/chat_completion_request_message.py,sha256=4ZfaNvaphnPdJqYSeSXMZwBhkrAqBz3aob6j-4Cklho,1638
|
|
95
112
|
sarvamai/types/chat_completion_request_system_message.py,sha256=E7YhTk1zr4u7dj_yylrf7_cyRrxpBssNBHhqxsb1b74,619
|
|
@@ -106,8 +123,14 @@ sarvamai/types/error_data.py,sha256=gdlrdKLkfgGoe-znCCfWTikKlf07iZy1l4lgPyZTPwE,
|
|
|
106
123
|
sarvamai/types/error_details.py,sha256=Faggc5PWERfCN2d9E5JzsEMNq9XSnoPTEdgi0lL8ea0,935
|
|
107
124
|
sarvamai/types/error_message.py,sha256=i_vDykKyMlkWLhJCpMAeYI1NzRDFsW2CTU4-mzdBAfE,622
|
|
108
125
|
sarvamai/types/events_data.py,sha256=hDSOyODc8-lmpduJIQkps9kHlUZKYXGw3lETi8irHt0,681
|
|
126
|
+
sarvamai/types/file_signed_url_details.py,sha256=_Zc1NMHxB94mNDFfbEpXPK4Z0X3i_nSiWFDH1oEX4uo,620
|
|
127
|
+
sarvamai/types/files_download_response.py,sha256=JgclLnQl0g3MGlGRLclJjc4LbgRv3RU46tGtdUAwrio,808
|
|
128
|
+
sarvamai/types/files_request.py,sha256=Jh8xPjoOTjY7DOE2EieoRqtkWkYxz9j-BP8TvWxuRLc,549
|
|
129
|
+
sarvamai/types/files_upload_response.py,sha256=wRntZyh1-LGpo4-x_986Nv2A9rv9asDx93pqoQxNpTY,804
|
|
109
130
|
sarvamai/types/finish_reason.py,sha256=PBWtBNkX4FMaODmlUehpF6qLB5uH_zR-Mw3M4uhIB6U,209
|
|
110
131
|
sarvamai/types/format.py,sha256=57LicD0XLqW4D1QEnZWsWGifzRy1GV9P5utKPXLoxtg,144
|
|
132
|
+
sarvamai/types/job_state.py,sha256=H6Zph2mIcjsd3upEDt1VzIEORkEpnIDs0kH8BvIyrow,189
|
|
133
|
+
sarvamai/types/job_status_v_1.py,sha256=i1xopAptPVbGGIUcjKWgjAzSKwLVy6y4oGVEYcOA1P0,1798
|
|
111
134
|
sarvamai/types/language_identification_response.py,sha256=jG4ZQ6KQHCiEDqC51OniOwiRdW14Fbz22bbTsUDp_kc,1483
|
|
112
135
|
sarvamai/types/numerals_format.py,sha256=xg3lYiHcnzyFwuwRcaIteJLH_Pz6pJ9n9kTlYPEnCBU,165
|
|
113
136
|
sarvamai/types/reasoning_effort.py,sha256=_TBLn3rQgzJAdnKqV2g0PETbrSBZl0fPLfQ5ZE9H4Pc,164
|
|
@@ -115,6 +138,7 @@ sarvamai/types/response_type.py,sha256=yyk0QTIQlNa9W0Uoj_5_ey_Q3Bu8Jij5GkgR0Rt_W
|
|
|
115
138
|
sarvamai/types/role.py,sha256=3eY01zZQKB8BSD4cFDeVjz-o2qnHJKz1vnToLqbExxs,115
|
|
116
139
|
sarvamai/types/sarvam_model_ids.py,sha256=iYBMglf31KQ1iUZeAMQ-2PP9NDcyHRG7goz7O9VG8qg,124
|
|
117
140
|
sarvamai/types/speech_sample_rate.py,sha256=Hfi79KL2Y1W7OIvvrfWnt7EUvmU5i7bxYvXivrY_aUA,88
|
|
141
|
+
sarvamai/types/speech_to_text_job_parameters.py,sha256=J2DL2Q-Wzjk7vbPklbVWwn05uDfupCtQ97O32ttJa68,1438
|
|
118
142
|
sarvamai/types/speech_to_text_language.py,sha256=cq8FBOX0DfYB3v8jgNteQtHeJcqWqzKWJVyYGwwo_w0,279
|
|
119
143
|
sarvamai/types/speech_to_text_model.py,sha256=cYANeE-1Kjdpju97bLdQa8GuGqMBn0hVK4McFVqUGT0,208
|
|
120
144
|
sarvamai/types/speech_to_text_response.py,sha256=iWRGEJeHUFIOxeEhoCQu68njeA6lcqXbT2czV-O8Wx0,1438
|
|
@@ -129,6 +153,10 @@ sarvamai/types/speech_to_text_translate_streaming_response.py,sha256=J6h3AGdAJxp
|
|
|
129
153
|
sarvamai/types/speech_to_text_translate_transcription_data.py,sha256=-cZZm21um6erOzx18nAgBYKA3Qc3YzNADUCnfx9mD-k,996
|
|
130
154
|
sarvamai/types/spoken_form_numerals_format.py,sha256=soBly93wMkazIcp2GDM0Mf1MjY140Pe24hBlwNoWge0,169
|
|
131
155
|
sarvamai/types/stop_configuration.py,sha256=yA_q4s4BIrbl3FotZpg4ZcyL10C7gVI0s2dqvH32BNw,136
|
|
156
|
+
sarvamai/types/storage_container_type.py,sha256=DZXDiDj74lMmUq6jaZfIMW1zMXgoVdY6rs_FcyB9OGk,184
|
|
157
|
+
sarvamai/types/task_detail_v_1.py,sha256=Z-RotwB9BzegZqur--4HkCafyTcDvr0CosZ52St0Eeo,857
|
|
158
|
+
sarvamai/types/task_file_details.py,sha256=oJV7zaUVrbqqw-If-2_V1aLk28qW0ZbeIDtIpn5-xUM,544
|
|
159
|
+
sarvamai/types/task_state.py,sha256=fSrmD00Goi0J6s9hzqcFqz3Fkh37diBYpxnz4FkwHdU,182
|
|
132
160
|
sarvamai/types/text_to_speech_language.py,sha256=T5-rP93WyJwkdJTmNZuvNkkoVtgU0G25a8R2F3OwRZ4,254
|
|
133
161
|
sarvamai/types/text_to_speech_model.py,sha256=qRkpGCcfrLD45l499cBUcBgZDo_qKPZtFxA7wPbp1NQ,128
|
|
134
162
|
sarvamai/types/text_to_speech_response.py,sha256=Yzvwvwm65IR2vUzxZws9OLBW0GgB6bbmvjClqSuZzdg,742
|
|
@@ -146,6 +174,6 @@ sarvamai/types/transliterate_mode.py,sha256=1jSEMlGcoLkWuk12TgoOpSgwifa4rThGKZ1h
|
|
|
146
174
|
sarvamai/types/transliterate_source_language.py,sha256=bSY9wJszF0sg-Cgg6F-YcWC8ly1mIlj9rqa15-jBtx8,283
|
|
147
175
|
sarvamai/types/transliteration_response.py,sha256=yt-lzTbDeJ_ZL4I8kQa6oESxA9ebeJJY7LfFHpdEsmM,815
|
|
148
176
|
sarvamai/version.py,sha256=Qkp3Ee9YH-O9RTix90e0i7iNrFAGN-QDt2AFwGA4n8k,75
|
|
149
|
-
sarvamai-0.1.
|
|
150
|
-
sarvamai-0.1.
|
|
151
|
-
sarvamai-0.1.
|
|
177
|
+
sarvamai-0.1.7a0.dist-info/METADATA,sha256=JvOpimFkls9MQUccSlvvP2UF7YIQ6jBwertyUheoDgw,26759
|
|
178
|
+
sarvamai-0.1.7a0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
179
|
+
sarvamai-0.1.7a0.dist-info/RECORD,,
|
|
File without changes
|