sarvamai 0.1.7a0__py3-none-any.whl → 0.1.8b0__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 (57) hide show
  1. sarvamai/__init__.py +50 -52
  2. sarvamai/client.py +3 -3
  3. sarvamai/core/client_wrapper.py +2 -2
  4. sarvamai/errors/service_unavailable_error.py +2 -1
  5. sarvamai/requests/__init__.py +20 -22
  6. sarvamai/requests/audio_output.py +11 -0
  7. sarvamai/requests/audio_output_data.py +15 -0
  8. sarvamai/requests/{files_request.py → close_connection.py} +2 -3
  9. sarvamai/requests/error_response.py +11 -0
  10. sarvamai/requests/error_response_data.py +18 -0
  11. sarvamai/requests/initialize_connection.py +11 -0
  12. sarvamai/requests/initialize_connection_data.py +24 -0
  13. sarvamai/requests/ping_signal.py +9 -0
  14. sarvamai/requests/send_text.py +11 -0
  15. sarvamai/requests/{base_job_parameters.py → send_text_data.py} +2 -2
  16. sarvamai/speech_to_text/raw_client.py +9 -8
  17. sarvamai/text_to_speech_streaming/client.py +136 -0
  18. sarvamai/text_to_speech_streaming/raw_client.py +113 -0
  19. sarvamai/text_to_speech_streaming/socket_client.py +177 -0
  20. sarvamai/types/__init__.py +28 -28
  21. sarvamai/types/audio_output.py +21 -0
  22. sarvamai/types/{bulk_job_callback.py → audio_output_data.py} +5 -5
  23. sarvamai/types/{files_request.py → close_connection.py} +2 -3
  24. sarvamai/types/error_response.py +21 -0
  25. sarvamai/types/{files_download_response.py → error_response_data.py} +11 -8
  26. sarvamai/types/initialize_connection.py +21 -0
  27. sarvamai/types/initialize_connection_data.py +34 -0
  28. sarvamai/types/initialize_connection_data_model.py +5 -0
  29. sarvamai/types/initialize_connection_data_output_audio_bitrate.py +7 -0
  30. sarvamai/types/initialize_connection_data_speaker.py +28 -0
  31. sarvamai/types/initialize_connection_data_target_language_code.py +8 -0
  32. sarvamai/types/{task_file_details.py → ping_signal.py} +2 -3
  33. sarvamai/types/{file_signed_url_details.py → send_text.py} +4 -3
  34. sarvamai/types/{base_job_parameters.py → send_text_data.py} +3 -1
  35. {sarvamai-0.1.7a0.dist-info → sarvamai-0.1.8b0.dist-info}/METADATA +1 -1
  36. {sarvamai-0.1.7a0.dist-info → sarvamai-0.1.8b0.dist-info}/RECORD +38 -38
  37. sarvamai/requests/bulk_job_callback.py +0 -15
  38. sarvamai/requests/bulk_job_init_response_v_1.py +0 -27
  39. sarvamai/requests/file_signed_url_details.py +0 -10
  40. sarvamai/requests/files_download_response.py +0 -15
  41. sarvamai/requests/files_upload_response.py +0 -15
  42. sarvamai/requests/job_status_v_1.py +0 -70
  43. sarvamai/requests/speech_to_text_job_parameters.py +0 -32
  44. sarvamai/requests/task_detail_v_1.py +0 -15
  45. sarvamai/requests/task_file_details.py +0 -8
  46. sarvamai/speech_to_text_job/client.py +0 -454
  47. sarvamai/speech_to_text_job/raw_client.py +0 -1189
  48. sarvamai/types/bulk_job_init_response_v_1.py +0 -39
  49. sarvamai/types/files_upload_response.py +0 -25
  50. sarvamai/types/job_state.py +0 -5
  51. sarvamai/types/job_status_v_1.py +0 -80
  52. sarvamai/types/speech_to_text_job_parameters.py +0 -44
  53. sarvamai/types/storage_container_type.py +0 -5
  54. sarvamai/types/task_detail_v_1.py +0 -25
  55. sarvamai/types/task_state.py +0 -5
  56. /sarvamai/{speech_to_text_job → text_to_speech_streaming}/__init__.py +0 -0
  57. {sarvamai-0.1.7a0.dist-info → sarvamai-0.1.8b0.dist-info}/WHEEL +0 -0
@@ -1,39 +0,0 @@
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
@@ -1,25 +0,0 @@
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
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- JobState = typing.Union[typing.Literal["Accepted", "Pending", "Running", "Completed", "Failed"], typing.Any]
@@ -1,80 +0,0 @@
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
@@ -1,44 +0,0 @@
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
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- StorageContainerType = typing.Union[typing.Literal["Azure", "Local", "Google", "Azure_V1"], typing.Any]
@@ -1,25 +0,0 @@
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
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- TaskState = typing.Union[typing.Literal["Success", "API Error", "Internal Server Error"], typing.Any]