camb-sdk 1.5.4__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.
- camb/__init__.py +335 -0
- camb/audio_separation/__init__.py +4 -0
- camb/audio_separation/client.py +406 -0
- camb/audio_separation/raw_client.py +534 -0
- camb/client.py +717 -0
- camb/core/__init__.py +105 -0
- camb/core/api_error.py +23 -0
- camb/core/client_wrapper.py +113 -0
- camb/core/datetime_utils.py +28 -0
- camb/core/file.py +67 -0
- camb/core/force_multipart.py +18 -0
- camb/core/http_client.py +663 -0
- camb/core/http_response.py +55 -0
- camb/core/http_sse/__init__.py +42 -0
- camb/core/http_sse/_api.py +112 -0
- camb/core/http_sse/_decoders.py +61 -0
- camb/core/http_sse/_exceptions.py +7 -0
- camb/core/http_sse/_models.py +17 -0
- camb/core/jsonable_encoder.py +100 -0
- camb/core/pydantic_utilities.py +260 -0
- camb/core/query_encoder.py +58 -0
- camb/core/remove_none_from_dict.py +11 -0
- camb/core/request_options.py +35 -0
- camb/core/serialization.py +276 -0
- camb/deprecated_streaming/__init__.py +4 -0
- camb/deprecated_streaming/client.py +532 -0
- camb/deprecated_streaming/raw_client.py +639 -0
- camb/dictionaries/__init__.py +4 -0
- camb/dictionaries/client.py +785 -0
- camb/dictionaries/raw_client.py +1048 -0
- camb/dub/__init__.py +49 -0
- camb/dub/client.py +846 -0
- camb/dub/raw_client.py +1194 -0
- camb/dub/types/__init__.py +53 -0
- camb/dub/types/dubbed_output_in_alt_format_request_payload_output_format.py +8 -0
- camb/dub/types/get_dubbed_output_in_alt_format_dub_alt_format_run_id_language_post_response.py +9 -0
- camb/dub/types/get_dubbed_run_info_dub_result_run_id_get_response.py +7 -0
- camb/dub/types/get_dubbing_runs_results_dubbing_results_post_response_value.py +7 -0
- camb/environment.py +7 -0
- camb/errors/__init__.py +34 -0
- camb/errors/unprocessable_entity_error.py +11 -0
- camb/folders/__init__.py +4 -0
- camb/folders/client.py +213 -0
- camb/folders/raw_client.py +278 -0
- camb/languages/__init__.py +4 -0
- camb/languages/client.py +168 -0
- camb/languages/raw_client.py +223 -0
- camb/project_setup/__init__.py +4 -0
- camb/project_setup/client.py +537 -0
- camb/project_setup/raw_client.py +655 -0
- camb/py.typed +0 -0
- camb/raw_client.py +236 -0
- camb/story/__init__.py +37 -0
- camb/story/client.py +579 -0
- camb/story/raw_client.py +743 -0
- camb/story/types/__init__.py +38 -0
- camb/story/types/create_story_story_post_response.py +8 -0
- camb/story/types/setup_story_story_setup_post_response.py +8 -0
- camb/streaming/__init__.py +4 -0
- camb/streaming/client.py +645 -0
- camb/streaming/raw_client.py +796 -0
- camb/text_to_audio/__init__.py +4 -0
- camb/text_to_audio/client.py +469 -0
- camb/text_to_audio/raw_client.py +610 -0
- camb/text_to_speech/__init__.py +49 -0
- camb/text_to_speech/baseten.py +214 -0
- camb/text_to_speech/client.py +742 -0
- camb/text_to_speech/raw_client.py +995 -0
- camb/text_to_speech/types/__init__.py +47 -0
- camb/text_to_speech/types/create_stream_tts_request_payload_language.py +71 -0
- camb/text_to_speech/types/create_stream_tts_request_payload_speech_model.py +7 -0
- camb/text_to_speech/types/get_tts_results_tts_results_post_response_value.py +7 -0
- camb/text_to_speech/types/get_tts_run_info_tts_result_run_id_get_response.py +7 -0
- camb/text_to_voice/__init__.py +4 -0
- camb/text_to_voice/client.py +329 -0
- camb/text_to_voice/raw_client.py +405 -0
- camb/transcription/__init__.py +4 -0
- camb/transcription/client.py +465 -0
- camb/transcription/raw_client.py +587 -0
- camb/translated_story/__init__.py +4 -0
- camb/translated_story/client.py +309 -0
- camb/translated_story/raw_client.py +381 -0
- camb/translated_tts/__init__.py +4 -0
- camb/translated_tts/client.py +313 -0
- camb/translated_tts/raw_client.py +357 -0
- camb/translation/__init__.py +4 -0
- camb/translation/client.py +631 -0
- camb/translation/raw_client.py +787 -0
- camb/types/__init__.py +236 -0
- camb/types/add_target_language_out.py +20 -0
- camb/types/audio_output_type.py +5 -0
- camb/types/audio_stream.py +31 -0
- camb/types/config_stream.py +22 -0
- camb/types/config_stream_pipeline.py +28 -0
- camb/types/create_custom_voice_out.py +19 -0
- camb/types/create_project_setup_out.py +19 -0
- camb/types/create_stream_out.py +22 -0
- camb/types/create_stream_request_payload.py +70 -0
- camb/types/create_translated_tts_out.py +19 -0
- camb/types/create_tts_out.py +19 -0
- camb/types/data_stream.py +24 -0
- camb/types/demixing_option.py +10 -0
- camb/types/dictionary_term.py +21 -0
- camb/types/dictionary_with_terms.py +28 -0
- camb/types/dubbing_result.py +22 -0
- camb/types/exception_reasons.py +30 -0
- camb/types/folder.py +20 -0
- camb/types/formalities.py +3 -0
- camb/types/gender.py +3 -0
- camb/types/get_audio_separation_result_out.py +20 -0
- camb/types/get_create_project_setup_response.py +21 -0
- camb/types/get_probe_stream_in.py +21 -0
- camb/types/get_probe_stream_out.py +24 -0
- camb/types/get_setup_story_result_response.py +21 -0
- camb/types/get_text_to_voice_result_out.py +19 -0
- camb/types/get_tts_result_out_file_url.py +19 -0
- camb/types/http_validation_error.py +20 -0
- camb/types/language_enums.py +154 -0
- camb/types/language_pydantic_model.py +21 -0
- camb/types/languages.py +3 -0
- camb/types/orchestrator_pipeline_call_result.py +19 -0
- camb/types/orchestrator_pipeline_result.py +25 -0
- camb/types/orchestrator_pipeline_result_exception_reason.py +7 -0
- camb/types/orchestrator_pipeline_result_message.py +5 -0
- camb/types/output_format.py +10 -0
- camb/types/overdub_config.py +37 -0
- camb/types/project_details.py +28 -0
- camb/types/revoicing_option.py +5 -0
- camb/types/run_i_ds_request_payload.py +19 -0
- camb/types/segmenting_option.py +5 -0
- camb/types/source_stream.py +30 -0
- camb/types/story_details.py +27 -0
- camb/types/stream_category.py +3 -0
- camb/types/stream_tts_inference_options.py +38 -0
- camb/types/stream_tts_output_configuration.py +33 -0
- camb/types/stream_tts_voice_settings.py +28 -0
- camb/types/stream_type.py +3 -0
- camb/types/stream_url_for_languages.py +21 -0
- camb/types/target_stream.py +34 -0
- camb/types/task_status.py +5 -0
- camb/types/term_translation_input.py +21 -0
- camb/types/term_translation_output.py +20 -0
- camb/types/text_to_audio_result.py +19 -0
- camb/types/text_to_audio_type.py +5 -0
- camb/types/transcribing_option.py +5 -0
- camb/types/transcript.py +22 -0
- camb/types/transcript_data_type.py +5 -0
- camb/types/transcript_file_format.py +5 -0
- camb/types/transcription_result.py +20 -0
- camb/types/translating_option.py +5 -0
- camb/types/translation_result.py +19 -0
- camb/types/tts_provider.py +3 -0
- camb/types/validation_error.py +22 -0
- camb/types/validation_error_loc_item.py +5 -0
- camb/types/video_output_type_without_avi.py +5 -0
- camb/types/video_stream.py +28 -0
- camb/types/voice.py +28 -0
- camb/voice_cloning/__init__.py +34 -0
- camb/voice_cloning/client.py +265 -0
- camb/voice_cloning/raw_client.py +320 -0
- camb/voice_cloning/types/__init__.py +36 -0
- camb/voice_cloning/types/list_voices_list_voices_get_response_item.py +7 -0
- camb_sdk-1.5.4.dist-info/METADATA +282 -0
- camb_sdk-1.5.4.dist-info/RECORD +167 -0
- camb_sdk-1.5.4.dist-info/WHEEL +5 -0
- camb_sdk-1.5.4.dist-info/licenses/LICENSE +21 -0
- camb_sdk-1.5.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .create_stream_tts_request_payload_language import CreateStreamTtsRequestPayloadLanguage
|
|
10
|
+
from .create_stream_tts_request_payload_speech_model import CreateStreamTtsRequestPayloadSpeechModel
|
|
11
|
+
from .get_tts_results_tts_results_post_response_value import GetTtsResultsTtsResultsPostResponseValue
|
|
12
|
+
from .get_tts_run_info_tts_result_run_id_get_response import GetTtsRunInfoTtsResultRunIdGetResponse
|
|
13
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
14
|
+
"CreateStreamTtsRequestPayloadLanguage": ".create_stream_tts_request_payload_language",
|
|
15
|
+
"CreateStreamTtsRequestPayloadSpeechModel": ".create_stream_tts_request_payload_speech_model",
|
|
16
|
+
"GetTtsResultsTtsResultsPostResponseValue": ".get_tts_results_tts_results_post_response_value",
|
|
17
|
+
"GetTtsRunInfoTtsResultRunIdGetResponse": ".get_tts_run_info_tts_result_run_id_get_response",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
22
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
23
|
+
if module_name is None:
|
|
24
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
25
|
+
try:
|
|
26
|
+
module = import_module(module_name, __package__)
|
|
27
|
+
if module_name == f".{attr_name}":
|
|
28
|
+
return module
|
|
29
|
+
else:
|
|
30
|
+
return getattr(module, attr_name)
|
|
31
|
+
except ImportError as e:
|
|
32
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
33
|
+
except AttributeError as e:
|
|
34
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def __dir__():
|
|
38
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
39
|
+
return sorted(lazy_attrs)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
__all__ = [
|
|
43
|
+
"CreateStreamTtsRequestPayloadLanguage",
|
|
44
|
+
"CreateStreamTtsRequestPayloadSpeechModel",
|
|
45
|
+
"GetTtsResultsTtsResultsPostResponseValue",
|
|
46
|
+
"GetTtsRunInfoTtsResultRunIdGetResponse",
|
|
47
|
+
]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
CreateStreamTtsRequestPayloadLanguage = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"ar-kw",
|
|
8
|
+
"de-ch",
|
|
9
|
+
"ko-kr",
|
|
10
|
+
"th-th",
|
|
11
|
+
"ml-in",
|
|
12
|
+
"pt-pt",
|
|
13
|
+
"kn-in",
|
|
14
|
+
"fi-fi",
|
|
15
|
+
"es-mx",
|
|
16
|
+
"fr-ca",
|
|
17
|
+
"cs-cz",
|
|
18
|
+
"pt-br",
|
|
19
|
+
"hi-in",
|
|
20
|
+
"ar-sy",
|
|
21
|
+
"es-us",
|
|
22
|
+
"bn-bd",
|
|
23
|
+
"ja-jp",
|
|
24
|
+
"mr-in",
|
|
25
|
+
"ar-ma",
|
|
26
|
+
"es-es",
|
|
27
|
+
"en-us",
|
|
28
|
+
"zh-cn",
|
|
29
|
+
"el-gr",
|
|
30
|
+
"pl-pl",
|
|
31
|
+
"ar-om",
|
|
32
|
+
"fr-ch",
|
|
33
|
+
"en-uk",
|
|
34
|
+
"en-au",
|
|
35
|
+
"ar-jo",
|
|
36
|
+
"ar-ae",
|
|
37
|
+
"tr-tr",
|
|
38
|
+
"ar-ly",
|
|
39
|
+
"ru-ru",
|
|
40
|
+
"en-in",
|
|
41
|
+
"ar-ye",
|
|
42
|
+
"ar-eg",
|
|
43
|
+
"fr-be",
|
|
44
|
+
"ta-in",
|
|
45
|
+
"zh-tw",
|
|
46
|
+
"vi-vn",
|
|
47
|
+
"bn-in",
|
|
48
|
+
"ar-sa",
|
|
49
|
+
"de-at",
|
|
50
|
+
"pa-in",
|
|
51
|
+
"it-it",
|
|
52
|
+
"nl-nl",
|
|
53
|
+
"ar-bh",
|
|
54
|
+
"fr-fr",
|
|
55
|
+
"ar-qa",
|
|
56
|
+
"uk-ua",
|
|
57
|
+
"ar-tn",
|
|
58
|
+
"de-de",
|
|
59
|
+
"ar-xa",
|
|
60
|
+
"ar-lb",
|
|
61
|
+
"zh-hk",
|
|
62
|
+
"ro-ro",
|
|
63
|
+
"as-in",
|
|
64
|
+
"ar-iq",
|
|
65
|
+
"nl-be",
|
|
66
|
+
"te-in",
|
|
67
|
+
"id-id",
|
|
68
|
+
"ar-dz",
|
|
69
|
+
],
|
|
70
|
+
typing.Any,
|
|
71
|
+
]
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.get_text_to_voice_result_out import GetTextToVoiceResultOut
|
|
8
|
+
from ..types.orchestrator_pipeline_call_result import OrchestratorPipelineCallResult
|
|
9
|
+
from ..types.orchestrator_pipeline_result import OrchestratorPipelineResult
|
|
10
|
+
from .raw_client import AsyncRawTextToVoiceClient, RawTextToVoiceClient
|
|
11
|
+
|
|
12
|
+
# this is used as the default value for optional parameters
|
|
13
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class TextToVoiceClient:
|
|
17
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
|
+
self._raw_client = RawTextToVoiceClient(client_wrapper=client_wrapper)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def with_raw_response(self) -> RawTextToVoiceClient:
|
|
22
|
+
"""
|
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
RawTextToVoiceClient
|
|
28
|
+
"""
|
|
29
|
+
return self._raw_client
|
|
30
|
+
|
|
31
|
+
def create_text_to_voice(
|
|
32
|
+
self,
|
|
33
|
+
*,
|
|
34
|
+
text: str,
|
|
35
|
+
voice_description: str,
|
|
36
|
+
traceparent: typing.Optional[str] = None,
|
|
37
|
+
project_name: typing.Optional[str] = OMIT,
|
|
38
|
+
project_description: typing.Optional[str] = OMIT,
|
|
39
|
+
folder_id: typing.Optional[int] = OMIT,
|
|
40
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
41
|
+
) -> OrchestratorPipelineCallResult:
|
|
42
|
+
"""
|
|
43
|
+
Parameters
|
|
44
|
+
----------
|
|
45
|
+
text : str
|
|
46
|
+
The text to be converted to voice
|
|
47
|
+
|
|
48
|
+
voice_description : str
|
|
49
|
+
Description to use for the created voice
|
|
50
|
+
|
|
51
|
+
traceparent : typing.Optional[str]
|
|
52
|
+
|
|
53
|
+
project_name : typing.Optional[str]
|
|
54
|
+
|
|
55
|
+
project_description : typing.Optional[str]
|
|
56
|
+
|
|
57
|
+
folder_id : typing.Optional[int]
|
|
58
|
+
|
|
59
|
+
request_options : typing.Optional[RequestOptions]
|
|
60
|
+
Request-specific configuration.
|
|
61
|
+
|
|
62
|
+
Returns
|
|
63
|
+
-------
|
|
64
|
+
OrchestratorPipelineCallResult
|
|
65
|
+
Successful Response
|
|
66
|
+
|
|
67
|
+
Examples
|
|
68
|
+
--------
|
|
69
|
+
from camb import CambApi
|
|
70
|
+
|
|
71
|
+
client = CambApi(
|
|
72
|
+
api_key="YOUR_API_KEY",
|
|
73
|
+
)
|
|
74
|
+
client.text_to_voice.create_text_to_voice(
|
|
75
|
+
text="text",
|
|
76
|
+
voice_description="voice_description",
|
|
77
|
+
)
|
|
78
|
+
"""
|
|
79
|
+
_response = self._raw_client.create_text_to_voice(
|
|
80
|
+
text=text,
|
|
81
|
+
voice_description=voice_description,
|
|
82
|
+
traceparent=traceparent,
|
|
83
|
+
project_name=project_name,
|
|
84
|
+
project_description=project_description,
|
|
85
|
+
folder_id=folder_id,
|
|
86
|
+
request_options=request_options,
|
|
87
|
+
)
|
|
88
|
+
return _response.data
|
|
89
|
+
|
|
90
|
+
def get_text_to_voice_status(
|
|
91
|
+
self,
|
|
92
|
+
task_id: str,
|
|
93
|
+
*,
|
|
94
|
+
run_id: typing.Optional[int] = None,
|
|
95
|
+
traceparent: typing.Optional[str] = None,
|
|
96
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
97
|
+
) -> OrchestratorPipelineResult:
|
|
98
|
+
"""
|
|
99
|
+
Parameters
|
|
100
|
+
----------
|
|
101
|
+
task_id : str
|
|
102
|
+
|
|
103
|
+
run_id : typing.Optional[int]
|
|
104
|
+
|
|
105
|
+
traceparent : typing.Optional[str]
|
|
106
|
+
|
|
107
|
+
request_options : typing.Optional[RequestOptions]
|
|
108
|
+
Request-specific configuration.
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
-------
|
|
112
|
+
OrchestratorPipelineResult
|
|
113
|
+
Successful Response
|
|
114
|
+
|
|
115
|
+
Examples
|
|
116
|
+
--------
|
|
117
|
+
from camb import CambApi
|
|
118
|
+
|
|
119
|
+
client = CambApi(
|
|
120
|
+
api_key="YOUR_API_KEY",
|
|
121
|
+
)
|
|
122
|
+
client.text_to_voice.get_text_to_voice_status(
|
|
123
|
+
task_id="task_id",
|
|
124
|
+
)
|
|
125
|
+
"""
|
|
126
|
+
_response = self._raw_client.get_text_to_voice_status(
|
|
127
|
+
task_id, run_id=run_id, traceparent=traceparent, request_options=request_options
|
|
128
|
+
)
|
|
129
|
+
return _response.data
|
|
130
|
+
|
|
131
|
+
def get_text_to_voice_result(
|
|
132
|
+
self, run_id: typing.Optional[int], *, request_options: typing.Optional[RequestOptions] = None
|
|
133
|
+
) -> GetTextToVoiceResultOut:
|
|
134
|
+
"""
|
|
135
|
+
Parameters
|
|
136
|
+
----------
|
|
137
|
+
run_id : typing.Optional[int]
|
|
138
|
+
|
|
139
|
+
request_options : typing.Optional[RequestOptions]
|
|
140
|
+
Request-specific configuration.
|
|
141
|
+
|
|
142
|
+
Returns
|
|
143
|
+
-------
|
|
144
|
+
GetTextToVoiceResultOut
|
|
145
|
+
Successful Response
|
|
146
|
+
|
|
147
|
+
Examples
|
|
148
|
+
--------
|
|
149
|
+
from camb import CambApi
|
|
150
|
+
|
|
151
|
+
client = CambApi(
|
|
152
|
+
api_key="YOUR_API_KEY",
|
|
153
|
+
)
|
|
154
|
+
client.text_to_voice.get_text_to_voice_result(
|
|
155
|
+
run_id=1,
|
|
156
|
+
)
|
|
157
|
+
"""
|
|
158
|
+
_response = self._raw_client.get_text_to_voice_result(run_id, request_options=request_options)
|
|
159
|
+
return _response.data
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class AsyncTextToVoiceClient:
|
|
163
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
164
|
+
self._raw_client = AsyncRawTextToVoiceClient(client_wrapper=client_wrapper)
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def with_raw_response(self) -> AsyncRawTextToVoiceClient:
|
|
168
|
+
"""
|
|
169
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
170
|
+
|
|
171
|
+
Returns
|
|
172
|
+
-------
|
|
173
|
+
AsyncRawTextToVoiceClient
|
|
174
|
+
"""
|
|
175
|
+
return self._raw_client
|
|
176
|
+
|
|
177
|
+
async def create_text_to_voice(
|
|
178
|
+
self,
|
|
179
|
+
*,
|
|
180
|
+
text: str,
|
|
181
|
+
voice_description: str,
|
|
182
|
+
traceparent: typing.Optional[str] = None,
|
|
183
|
+
project_name: typing.Optional[str] = OMIT,
|
|
184
|
+
project_description: typing.Optional[str] = OMIT,
|
|
185
|
+
folder_id: typing.Optional[int] = OMIT,
|
|
186
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
187
|
+
) -> OrchestratorPipelineCallResult:
|
|
188
|
+
"""
|
|
189
|
+
Parameters
|
|
190
|
+
----------
|
|
191
|
+
text : str
|
|
192
|
+
The text to be converted to voice
|
|
193
|
+
|
|
194
|
+
voice_description : str
|
|
195
|
+
Description to use for the created voice
|
|
196
|
+
|
|
197
|
+
traceparent : typing.Optional[str]
|
|
198
|
+
|
|
199
|
+
project_name : typing.Optional[str]
|
|
200
|
+
|
|
201
|
+
project_description : typing.Optional[str]
|
|
202
|
+
|
|
203
|
+
folder_id : typing.Optional[int]
|
|
204
|
+
|
|
205
|
+
request_options : typing.Optional[RequestOptions]
|
|
206
|
+
Request-specific configuration.
|
|
207
|
+
|
|
208
|
+
Returns
|
|
209
|
+
-------
|
|
210
|
+
OrchestratorPipelineCallResult
|
|
211
|
+
Successful Response
|
|
212
|
+
|
|
213
|
+
Examples
|
|
214
|
+
--------
|
|
215
|
+
import asyncio
|
|
216
|
+
|
|
217
|
+
from camb import AsyncCambApi
|
|
218
|
+
|
|
219
|
+
client = AsyncCambApi(
|
|
220
|
+
api_key="YOUR_API_KEY",
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
async def main() -> None:
|
|
225
|
+
await client.text_to_voice.create_text_to_voice(
|
|
226
|
+
text="text",
|
|
227
|
+
voice_description="voice_description",
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
asyncio.run(main())
|
|
232
|
+
"""
|
|
233
|
+
_response = await self._raw_client.create_text_to_voice(
|
|
234
|
+
text=text,
|
|
235
|
+
voice_description=voice_description,
|
|
236
|
+
traceparent=traceparent,
|
|
237
|
+
project_name=project_name,
|
|
238
|
+
project_description=project_description,
|
|
239
|
+
folder_id=folder_id,
|
|
240
|
+
request_options=request_options,
|
|
241
|
+
)
|
|
242
|
+
return _response.data
|
|
243
|
+
|
|
244
|
+
async def get_text_to_voice_status(
|
|
245
|
+
self,
|
|
246
|
+
task_id: str,
|
|
247
|
+
*,
|
|
248
|
+
run_id: typing.Optional[int] = None,
|
|
249
|
+
traceparent: typing.Optional[str] = None,
|
|
250
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
251
|
+
) -> OrchestratorPipelineResult:
|
|
252
|
+
"""
|
|
253
|
+
Parameters
|
|
254
|
+
----------
|
|
255
|
+
task_id : str
|
|
256
|
+
|
|
257
|
+
run_id : typing.Optional[int]
|
|
258
|
+
|
|
259
|
+
traceparent : typing.Optional[str]
|
|
260
|
+
|
|
261
|
+
request_options : typing.Optional[RequestOptions]
|
|
262
|
+
Request-specific configuration.
|
|
263
|
+
|
|
264
|
+
Returns
|
|
265
|
+
-------
|
|
266
|
+
OrchestratorPipelineResult
|
|
267
|
+
Successful Response
|
|
268
|
+
|
|
269
|
+
Examples
|
|
270
|
+
--------
|
|
271
|
+
import asyncio
|
|
272
|
+
|
|
273
|
+
from camb import AsyncCambApi
|
|
274
|
+
|
|
275
|
+
client = AsyncCambApi(
|
|
276
|
+
api_key="YOUR_API_KEY",
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
async def main() -> None:
|
|
281
|
+
await client.text_to_voice.get_text_to_voice_status(
|
|
282
|
+
task_id="task_id",
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
asyncio.run(main())
|
|
287
|
+
"""
|
|
288
|
+
_response = await self._raw_client.get_text_to_voice_status(
|
|
289
|
+
task_id, run_id=run_id, traceparent=traceparent, request_options=request_options
|
|
290
|
+
)
|
|
291
|
+
return _response.data
|
|
292
|
+
|
|
293
|
+
async def get_text_to_voice_result(
|
|
294
|
+
self, run_id: typing.Optional[int], *, request_options: typing.Optional[RequestOptions] = None
|
|
295
|
+
) -> GetTextToVoiceResultOut:
|
|
296
|
+
"""
|
|
297
|
+
Parameters
|
|
298
|
+
----------
|
|
299
|
+
run_id : typing.Optional[int]
|
|
300
|
+
|
|
301
|
+
request_options : typing.Optional[RequestOptions]
|
|
302
|
+
Request-specific configuration.
|
|
303
|
+
|
|
304
|
+
Returns
|
|
305
|
+
-------
|
|
306
|
+
GetTextToVoiceResultOut
|
|
307
|
+
Successful Response
|
|
308
|
+
|
|
309
|
+
Examples
|
|
310
|
+
--------
|
|
311
|
+
import asyncio
|
|
312
|
+
|
|
313
|
+
from camb import AsyncCambApi
|
|
314
|
+
|
|
315
|
+
client = AsyncCambApi(
|
|
316
|
+
api_key="YOUR_API_KEY",
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
async def main() -> None:
|
|
321
|
+
await client.text_to_voice.get_text_to_voice_result(
|
|
322
|
+
run_id=1,
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
asyncio.run(main())
|
|
327
|
+
"""
|
|
328
|
+
_response = await self._raw_client.get_text_to_voice_result(run_id, request_options=request_options)
|
|
329
|
+
return _response.data
|