camb-sdk 1.0.1__tar.gz → 1.0.3__tar.gz
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.
Potentially problematic release.
This version of camb-sdk might be problematic. Click here for more details.
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/PKG-INFO +38 -13
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/README.md +37 -12
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/camb_sdk.egg-info/PKG-INFO +38 -13
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/__init__.py +1 -1
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/apis_api.py +294 -286
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/__init__.py +1 -1
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/pyproject.toml +1 -1
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_apis_api.py +5 -5
- camb_sdk-1.0.3/test/test_create_tts_stream_request_payload.py +59 -0
- camb_sdk-1.0.3/test/test_tts_stream_output_format.py +33 -0
- camb_sdk-1.0.1/test/test_create_tts_stream_request_payload.py +0 -59
- camb_sdk-1.0.1/test/test_tts_stream_output_format.py +0 -33
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/LICENSE +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/camb_sdk.egg-info/SOURCES.txt +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/camb_sdk.egg-info/dependency_links.txt +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/camb_sdk.egg-info/requires.txt +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/camb_sdk.egg-info/top_level.txt +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/__init__.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/audio_separation_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/dictionaries_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/dub_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/stories_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/text_to_audio_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/text_to_speech_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api/text_to_voice_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api_client.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/api_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/configuration.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/exceptions.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/audio_output_file_url_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/audio_output_type.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/audio_separation_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/body_translate_translate_post.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_api_key_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_custom_voice_out.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_text_to_audio_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_text_to_voice_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_translated_story_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_translated_tts_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_translation_stream_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_tts_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/create_tts_stream_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/dialogue_item.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/dictionary.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/dub_alt_format_response_body.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/dubbed_output_in_alt_format_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/end_to_end_dubbing_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/expire_api_key_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/formalities.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/gender.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/http_validation_error.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/language_item.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/languages.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/orchestrator_pipeline_result.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/output_api_key.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/output_format.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/output_type.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/request_dubbed_output_in_alt_format200_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/story_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/task_id.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/task_status.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/text_to_voice_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/transcript_data_type.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/transcript_file_format.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/translation_result.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/tts_stream_output_format.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/validation_error.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/validation_error_loc_inner.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/video_output_type_without_avi.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/models/voice_item.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/py.typed +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/cambai/rest.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/setup.cfg +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_audio_output_file_url_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_audio_output_type.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_audio_separation_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_audio_separation_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_body_translate_translate_post.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_api_key_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_custom_voice_out.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_text_to_audio_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_text_to_voice_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_translated_story_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_translated_tts_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_translation_stream_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_create_tts_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_dialogue_item.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_dictionaries_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_dictionary.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_dub_alt_format_response_body.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_dub_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_dubbed_output_in_alt_format_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_end_to_end_dubbing_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_expire_api_key_request_payload.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_formalities.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_gender.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_http_validation_error.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_language_item.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_languages.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_orchestrator_pipeline_result.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_output_api_key.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_output_format.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_output_type.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_request_dubbed_output_in_alt_format200_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_stories_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_story_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_task_id.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_task_status.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_text_to_audio_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_text_to_speech_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_text_to_voice_api.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_text_to_voice_run_info_response.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_transcript_data_type.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_transcript_file_format.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_translation_result.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_validation_error.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_validation_error_loc_inner.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_video_output_type_without_avi.py +0 -0
- {camb_sdk-1.0.1 → camb_sdk-1.0.3}/test/test_voice_item.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: camb-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Camb AI Python SDK for Text-to-Speech, Voice Generation, and Audio APIs
|
|
5
5
|
Author-email: Camb AI <support@camb.ai>
|
|
6
6
|
License: MIT
|
|
@@ -162,9 +162,10 @@ output_file = "generated_voice_output.mp3"
|
|
|
162
162
|
try:
|
|
163
163
|
print("Generating a new voice and speech...")
|
|
164
164
|
# The 'text_to_voice' method returns a dict consisting of 3 sample URLs
|
|
165
|
+
# Description and Text should be atleast 100 Characters.
|
|
165
166
|
result = client.text_to_voice(
|
|
166
|
-
text="Crafting a unique voice
|
|
167
|
-
voice_description="A smooth, baritone voice with a
|
|
167
|
+
text="Crafting a truly unique and captivating voice that carries a subtle air of mystery, depth, and gentle warmth.",
|
|
168
|
+
voice_description="A smooth, rich baritone voice layered with a soft echo, ideal for immersive storytelling and emotional depth.",
|
|
168
169
|
verbose=True
|
|
169
170
|
)
|
|
170
171
|
print(result)
|
|
@@ -190,7 +191,7 @@ output_file = "generated_sound_effect.mp3"
|
|
|
190
191
|
try:
|
|
191
192
|
print(f"Generating sound effect and saving to {output_file}...")
|
|
192
193
|
|
|
193
|
-
client.
|
|
194
|
+
client.text_to_sound(
|
|
194
195
|
prompt="A gentle breeze rustling through autumn leaves in a quiet forest.",
|
|
195
196
|
duration=10,
|
|
196
197
|
save_to_file=output_file,
|
|
@@ -199,13 +200,13 @@ try:
|
|
|
199
200
|
print(f"Success! Sound effect saved to {output_file}")
|
|
200
201
|
|
|
201
202
|
except ApiException as e:
|
|
202
|
-
print(f"API Exception when calling
|
|
203
|
+
print(f"API Exception when calling text_to_sound: {e}\n")
|
|
203
204
|
```
|
|
204
205
|
|
|
205
206
|
---
|
|
206
|
-
### 4.
|
|
207
|
+
### 4. Getting Client Source and Target Languages
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
Retrieve available source and target languages for translation and dubbing.
|
|
209
210
|
|
|
210
211
|
```python
|
|
211
212
|
from cambai import CambAI
|
|
@@ -214,12 +215,36 @@ from cambai.rest import ApiException
|
|
|
214
215
|
# Initialize client
|
|
215
216
|
client = CambAI(api_key="YOUR_CAMB_API_KEY")
|
|
216
217
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
218
|
+
try:
|
|
219
|
+
# Get all available target languages
|
|
220
|
+
print("Listing target languages...")
|
|
221
|
+
target_languages = client.get_target_languages()
|
|
222
|
+
print(f"Found {len(target_languages)} target languages:")
|
|
223
|
+
for language in target_languages:
|
|
224
|
+
print(f" - {language}")
|
|
225
|
+
|
|
226
|
+
# Get all available source languages
|
|
227
|
+
print("\nListing source languages...")
|
|
228
|
+
source_languages = client.get_source_languages()
|
|
229
|
+
print(f"Found {len(source_languages)} source languages:")
|
|
230
|
+
for language in source_languages:
|
|
231
|
+
print(f" - {language}")
|
|
232
|
+
|
|
233
|
+
except ApiException as e:
|
|
234
|
+
print(f"API Exception when getting languages: {e}\n")
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
### 5. End-to-End Dubbing
|
|
239
|
+
|
|
240
|
+
Dub videos into different languages with voice cloning and translation capabilities.
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
from cambai import CambAI
|
|
244
|
+
from cambai.rest import ApiException
|
|
245
|
+
|
|
246
|
+
# Initialize client
|
|
247
|
+
client = CambAI(api_key="YOUR_CAMB_API_KEY")
|
|
223
248
|
|
|
224
249
|
try:
|
|
225
250
|
print("Starting end-to-end dubbing process...")
|
|
@@ -144,9 +144,10 @@ output_file = "generated_voice_output.mp3"
|
|
|
144
144
|
try:
|
|
145
145
|
print("Generating a new voice and speech...")
|
|
146
146
|
# The 'text_to_voice' method returns a dict consisting of 3 sample URLs
|
|
147
|
+
# Description and Text should be atleast 100 Characters.
|
|
147
148
|
result = client.text_to_voice(
|
|
148
|
-
text="Crafting a unique voice
|
|
149
|
-
voice_description="A smooth, baritone voice with a
|
|
149
|
+
text="Crafting a truly unique and captivating voice that carries a subtle air of mystery, depth, and gentle warmth.",
|
|
150
|
+
voice_description="A smooth, rich baritone voice layered with a soft echo, ideal for immersive storytelling and emotional depth.",
|
|
150
151
|
verbose=True
|
|
151
152
|
)
|
|
152
153
|
print(result)
|
|
@@ -172,7 +173,7 @@ output_file = "generated_sound_effect.mp3"
|
|
|
172
173
|
try:
|
|
173
174
|
print(f"Generating sound effect and saving to {output_file}...")
|
|
174
175
|
|
|
175
|
-
client.
|
|
176
|
+
client.text_to_sound(
|
|
176
177
|
prompt="A gentle breeze rustling through autumn leaves in a quiet forest.",
|
|
177
178
|
duration=10,
|
|
178
179
|
save_to_file=output_file,
|
|
@@ -181,13 +182,13 @@ try:
|
|
|
181
182
|
print(f"Success! Sound effect saved to {output_file}")
|
|
182
183
|
|
|
183
184
|
except ApiException as e:
|
|
184
|
-
print(f"API Exception when calling
|
|
185
|
+
print(f"API Exception when calling text_to_sound: {e}\n")
|
|
185
186
|
```
|
|
186
187
|
|
|
187
188
|
---
|
|
188
|
-
### 4.
|
|
189
|
+
### 4. Getting Client Source and Target Languages
|
|
189
190
|
|
|
190
|
-
|
|
191
|
+
Retrieve available source and target languages for translation and dubbing.
|
|
191
192
|
|
|
192
193
|
```python
|
|
193
194
|
from cambai import CambAI
|
|
@@ -196,12 +197,36 @@ from cambai.rest import ApiException
|
|
|
196
197
|
# Initialize client
|
|
197
198
|
client = CambAI(api_key="YOUR_CAMB_API_KEY")
|
|
198
199
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
try:
|
|
201
|
+
# Get all available target languages
|
|
202
|
+
print("Listing target languages...")
|
|
203
|
+
target_languages = client.get_target_languages()
|
|
204
|
+
print(f"Found {len(target_languages)} target languages:")
|
|
205
|
+
for language in target_languages:
|
|
206
|
+
print(f" - {language}")
|
|
207
|
+
|
|
208
|
+
# Get all available source languages
|
|
209
|
+
print("\nListing source languages...")
|
|
210
|
+
source_languages = client.get_source_languages()
|
|
211
|
+
print(f"Found {len(source_languages)} source languages:")
|
|
212
|
+
for language in source_languages:
|
|
213
|
+
print(f" - {language}")
|
|
214
|
+
|
|
215
|
+
except ApiException as e:
|
|
216
|
+
print(f"API Exception when getting languages: {e}\n")
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
### 5. End-to-End Dubbing
|
|
221
|
+
|
|
222
|
+
Dub videos into different languages with voice cloning and translation capabilities.
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
from cambai import CambAI
|
|
226
|
+
from cambai.rest import ApiException
|
|
227
|
+
|
|
228
|
+
# Initialize client
|
|
229
|
+
client = CambAI(api_key="YOUR_CAMB_API_KEY")
|
|
205
230
|
|
|
206
231
|
try:
|
|
207
232
|
print("Starting end-to-end dubbing process...")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: camb-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Camb AI Python SDK for Text-to-Speech, Voice Generation, and Audio APIs
|
|
5
5
|
Author-email: Camb AI <support@camb.ai>
|
|
6
6
|
License: MIT
|
|
@@ -162,9 +162,10 @@ output_file = "generated_voice_output.mp3"
|
|
|
162
162
|
try:
|
|
163
163
|
print("Generating a new voice and speech...")
|
|
164
164
|
# The 'text_to_voice' method returns a dict consisting of 3 sample URLs
|
|
165
|
+
# Description and Text should be atleast 100 Characters.
|
|
165
166
|
result = client.text_to_voice(
|
|
166
|
-
text="Crafting a unique voice
|
|
167
|
-
voice_description="A smooth, baritone voice with a
|
|
167
|
+
text="Crafting a truly unique and captivating voice that carries a subtle air of mystery, depth, and gentle warmth.",
|
|
168
|
+
voice_description="A smooth, rich baritone voice layered with a soft echo, ideal for immersive storytelling and emotional depth.",
|
|
168
169
|
verbose=True
|
|
169
170
|
)
|
|
170
171
|
print(result)
|
|
@@ -190,7 +191,7 @@ output_file = "generated_sound_effect.mp3"
|
|
|
190
191
|
try:
|
|
191
192
|
print(f"Generating sound effect and saving to {output_file}...")
|
|
192
193
|
|
|
193
|
-
client.
|
|
194
|
+
client.text_to_sound(
|
|
194
195
|
prompt="A gentle breeze rustling through autumn leaves in a quiet forest.",
|
|
195
196
|
duration=10,
|
|
196
197
|
save_to_file=output_file,
|
|
@@ -199,13 +200,13 @@ try:
|
|
|
199
200
|
print(f"Success! Sound effect saved to {output_file}")
|
|
200
201
|
|
|
201
202
|
except ApiException as e:
|
|
202
|
-
print(f"API Exception when calling
|
|
203
|
+
print(f"API Exception when calling text_to_sound: {e}\n")
|
|
203
204
|
```
|
|
204
205
|
|
|
205
206
|
---
|
|
206
|
-
### 4.
|
|
207
|
+
### 4. Getting Client Source and Target Languages
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
Retrieve available source and target languages for translation and dubbing.
|
|
209
210
|
|
|
210
211
|
```python
|
|
211
212
|
from cambai import CambAI
|
|
@@ -214,12 +215,36 @@ from cambai.rest import ApiException
|
|
|
214
215
|
# Initialize client
|
|
215
216
|
client = CambAI(api_key="YOUR_CAMB_API_KEY")
|
|
216
217
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
218
|
+
try:
|
|
219
|
+
# Get all available target languages
|
|
220
|
+
print("Listing target languages...")
|
|
221
|
+
target_languages = client.get_target_languages()
|
|
222
|
+
print(f"Found {len(target_languages)} target languages:")
|
|
223
|
+
for language in target_languages:
|
|
224
|
+
print(f" - {language}")
|
|
225
|
+
|
|
226
|
+
# Get all available source languages
|
|
227
|
+
print("\nListing source languages...")
|
|
228
|
+
source_languages = client.get_source_languages()
|
|
229
|
+
print(f"Found {len(source_languages)} source languages:")
|
|
230
|
+
for language in source_languages:
|
|
231
|
+
print(f" - {language}")
|
|
232
|
+
|
|
233
|
+
except ApiException as e:
|
|
234
|
+
print(f"API Exception when getting languages: {e}\n")
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
### 5. End-to-End Dubbing
|
|
239
|
+
|
|
240
|
+
Dub videos into different languages with voice cloning and translation capabilities.
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
from cambai import CambAI
|
|
244
|
+
from cambai.rest import ApiException
|
|
245
|
+
|
|
246
|
+
# Initialize client
|
|
247
|
+
client = CambAI(api_key="YOUR_CAMB_API_KEY")
|
|
223
248
|
|
|
224
249
|
try:
|
|
225
250
|
print("Starting end-to-end dubbing process...")
|
|
@@ -108,7 +108,7 @@ from cambai.models.body_translate_translate_post import BodyTranslateTranslatePo
|
|
|
108
108
|
from cambai.models.create_api_key_request_payload import CreateAPIKeyRequestPayload as CreateAPIKeyRequestPayload
|
|
109
109
|
from cambai.models.create_custom_voice_out import CreateCustomVoiceOut as CreateCustomVoiceOut
|
|
110
110
|
from cambai.models.create_tts_request_payload import CreateTTSRequestPayload as CreateTTSRequestPayload
|
|
111
|
-
from cambai.models.create_tts_stream_request_payload import CreateTTSStreamRequestPayload as CreateTTSStreamRequestPayload
|
|
111
|
+
# from cambai.models.create_tts_stream_request_payload import CreateTTSStreamRequestPayload as CreateTTSStreamRequestPayload
|
|
112
112
|
from cambai.models.create_text_to_audio_request_payload import CreateTextToAudioRequestPayload as CreateTextToAudioRequestPayload
|
|
113
113
|
from cambai.models.create_text_to_voice_request_payload import CreateTextToVoiceRequestPayload as CreateTextToVoiceRequestPayload
|
|
114
114
|
from cambai.models.create_translated_story_request_payload import CreateTranslatedStoryRequestPayload as CreateTranslatedStoryRequestPayload
|