audiopod 1.2.0__py3-none-any.whl → 1.4.0__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.
@@ -1,454 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: audiopod
3
- Version: 1.2.0
4
- Summary: Professional Audio Processing API Client for Python
5
- Home-page: https://github.com/audiopod-ai/audiopod-python
6
- Author: AudioPod AI
7
- Author-email: AudioPod AI <support@audiopod.ai>
8
- Project-URL: Homepage, https://audiopod.ai
9
- Project-URL: Repository, https://github.com/audiopod-ai/audiopod
10
- Project-URL: Bug Tracker, https://github.com/audiopod-ai/audiopod/issues
11
- Project-URL: API Reference, https://docs.audiopod.ai/
12
- Keywords: audio,processing,ai,voice,cloning,transcription,translation,music,generation,denoising,api,sdk
13
- Classifier: Development Status :: 4 - Beta
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Topic :: Multimedia :: Sound/Audio
23
- Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
24
- Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
25
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.8
27
- Description-Content-Type: text/markdown
28
- License-File: LICENSE
29
- Requires-Dist: requests>=2.28.0
30
- Requires-Dist: aiohttp>=3.8.0
31
- Requires-Dist: pydantic>=1.10.0
32
- Requires-Dist: python-dotenv>=0.19.0
33
- Requires-Dist: tqdm>=4.64.0
34
- Requires-Dist: websockets>=10.4
35
- Requires-Dist: click>=8.0.0
36
- Provides-Extra: dev
37
- Requires-Dist: pytest>=7.0.0; extra == "dev"
38
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
39
- Requires-Dist: black>=22.0.0; extra == "dev"
40
- Requires-Dist: flake8>=5.0.0; extra == "dev"
41
- Requires-Dist: mypy>=0.991; extra == "dev"
42
- Requires-Dist: twine>=4.0.0; extra == "dev"
43
- Requires-Dist: build>=0.10.0; extra == "dev"
44
- Provides-Extra: docs
45
- Requires-Dist: sphinx>=5.0.0; extra == "docs"
46
- Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
47
- Requires-Dist: sphinx-autodoc-typehints>=1.19.0; extra == "docs"
48
- Dynamic: author
49
- Dynamic: home-page
50
- Dynamic: license-file
51
- Dynamic: requires-python
52
-
53
- # AudioPod Python SDK
54
-
55
- The official Python SDK for the AudioPod API - Professional Audio Processing powered by AI.
56
-
57
- [![PyPI version](https://badge.fury.io/py/audiopod.svg)](https://badge.fury.io/py/audiopod)
58
- [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
59
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
60
-
61
- ## Features
62
-
63
- - 🎵 **Music Generation** - Create music from text prompts, lyrics, or audio samples
64
- - 🎤 **Voice Cloning** - Clone voices from audio samples and generate speech
65
- - 📝 **Transcription** - Convert speech to text with speaker diarization
66
- - 🌍 **Translation** - Translate audio and video content between languages
67
- - 🎬 **Karaoke Generation** - Create karaoke videos with synchronized lyrics
68
- - 🔊 **Audio Enhancement** - Denoise and improve audio quality
69
- - 👥 **Speaker Analysis** - Identify and separate speakers in audio
70
- - 💰 **Credit Management** - Track usage and manage API credits
71
-
72
- ## Installation
73
-
74
- ```bash
75
- pip install audiopod
76
- ```
77
-
78
- ## Quick Start
79
-
80
- ### Authentication
81
-
82
- Get your API key from the [AudioPod Dashboard](https://app.audiopod.ai/dashboard) and set it as an environment variable:
83
-
84
- ```bash
85
- export AUDIOPOD_API_KEY="ap_your_api_key_here"
86
- ```
87
-
88
- Or pass it directly to the client:
89
-
90
- ```python
91
- import audiopod
92
-
93
- client = audiopod.Client(api_key="ap_your_api_key_here")
94
- ```
95
-
96
- ### Basic Usage
97
-
98
- #### Voice Generation (Unified TTS & Cloning)
99
-
100
- ```python
101
- import audiopod
102
-
103
- # Initialize client
104
- client = audiopod.Client()
105
-
106
- # Generate voice using file cloning (unified approach)
107
- job = client.voice.generate_voice(
108
- text="Hello! This is voice generation using a cloned voice.",
109
- voice_file="path/to/voice_sample.wav", # For voice cloning
110
- language="en",
111
- audio_format="mp3",
112
- generation_params={
113
- "speed": 1.0
114
- },
115
- wait_for_completion=True
116
- )
117
-
118
- print(f"Generated audio URL: {job.output_url}")
119
-
120
- # Generate speech with existing voice profile (unified approach)
121
- speech = client.voice.generate_voice(
122
- text="Hello from my voice profile!",
123
- voice_id="voice-profile-id", # For existing voice profiles
124
- language="en",
125
- audio_format="mp3",
126
- generation_params={
127
- "speed": 1.0
128
- },
129
- wait_for_completion=True
130
- )
131
-
132
- # Backward compatibility methods (deprecated - use generate_voice instead)
133
- legacy_clone = client.voice.clone_voice(
134
- voice_file="path/to/voice_sample.wav",
135
- text="Hello! This is a cloned voice speaking.",
136
- language="en",
137
- wait_for_completion=True
138
- )
139
- ```
140
-
141
- #### Music Generation
142
-
143
- ```python
144
- # Generate music from text
145
- music_job = client.music.generate_music(
146
- prompt="upbeat electronic dance music with heavy bass",
147
- duration=120.0, # 2 minutes
148
- wait_for_completion=True
149
- )
150
-
151
- print(f"Generated music URL: {music_job.output_url}")
152
- ```
153
-
154
- #### Audio Transcription
155
-
156
- ```python
157
- # Transcribe audio with speaker diarization
158
- transcript = client.transcription.transcribe_audio(
159
- audio_file="path/to/audio.mp3",
160
- language="en",
161
- enable_speaker_diarization=True,
162
- wait_for_completion=True
163
- )
164
-
165
- print(f"Transcript: {transcript.transcript}")
166
- print(f"Detected {len(transcript.segments)} speakers")
167
- ```
168
-
169
- #### Speech-to-Speech Translation
170
-
171
- ```python
172
- # Translate speech while preserving voice characteristics
173
- translation = client.translation.translate_speech(
174
- audio_file="path/to/english_audio.wav",
175
- target_language="es", # Spanish
176
- source_language="en", # English (optional - auto-detect)
177
- wait_for_completion=True
178
- )
179
-
180
- print(f"Translated audio URL: {translation.translated_audio_url}")
181
-
182
- # Or translate from URL
183
- url_translation = client.translation.translate_speech(
184
- url="https://example.com/audio.mp3",
185
- target_language="fr", # French
186
- wait_for_completion=True
187
- )
188
- ```
189
-
190
- ### Async Support
191
-
192
- The SDK supports async/await for better performance:
193
-
194
- ```python
195
- import asyncio
196
- import audiopod
197
-
198
- async def main():
199
- async with audiopod.AsyncClient() as client:
200
- # All the same methods are available with async support
201
- job = await client.voice.clone_voice(
202
- voice_file="voice.wav",
203
- text="Async voice cloning!",
204
- wait_for_completion=True
205
- )
206
- print(f"Async result: {job['output_url']}")
207
-
208
- asyncio.run(main())
209
- ```
210
-
211
- ### Advanced Examples
212
-
213
- #### Create Voice Profile for Reuse
214
-
215
- ```python
216
- # Create a reusable voice profile
217
- voice_profile = client.voice.create_voice_profile(
218
- name="My Custom Voice",
219
- voice_file="voice_sample.wav",
220
- description="A professional voice for narration",
221
- wait_for_completion=True
222
- )
223
-
224
- # Use the voice profile for speech generation (unified approach - recommended)
225
- speech = client.voice.generate_voice(
226
- text="This uses my custom voice profile with the unified method!",
227
- voice_id=voice_profile.id,
228
- language="en",
229
- audio_format="mp3",
230
- generation_params={
231
- "speed": 1.0
232
- },
233
- wait_for_completion=True
234
- )
235
-
236
- # Legacy method (still works - uses generate_voice internally)
237
- legacy_speech = client.voice.generate_speech(
238
- voice_id=voice_profile.id,
239
- text="This uses the legacy method.",
240
- wait_for_completion=True
241
- )
242
- ```
243
-
244
- #### Batch Processing
245
-
246
- ```python
247
- # Process multiple files
248
- audio_files = ["file1.mp3", "file2.wav", "file3.m4a"]
249
- jobs = []
250
-
251
- for audio_file in audio_files:
252
- job = client.transcription.transcribe_audio(
253
- audio_file=audio_file,
254
- language="en"
255
- )
256
- jobs.append(job)
257
-
258
- # Wait for all jobs to complete
259
- for job in jobs:
260
- completed_job = client.transcription.get_transcription_job(job.id)
261
- while completed_job.job.status != "completed":
262
- time.sleep(5)
263
- completed_job = client.transcription.get_transcription_job(job.id)
264
-
265
- print(f"Transcript for {job.id}: {completed_job.transcript}")
266
- ```
267
-
268
- #### Music Generation with Custom Parameters
269
-
270
- ```python
271
- # Generate rap music with specific parameters
272
- rap_job = client.music.generate_rap(
273
- lyrics="""
274
- Started from the bottom now we're here
275
- Building dreams with every single year
276
- AI music generation so clear
277
- AudioPod making magic appear
278
- """,
279
- style="modern",
280
- tempo=120,
281
- wait_for_completion=True
282
- )
283
-
284
- # Share the generated music
285
- share_result = client.music.share_music_track(
286
- job_id=rap_job.job.id,
287
- platform="social",
288
- message="Check out this AI-generated rap!"
289
- )
290
- print(f"Shareable URL: {share_result['share_url']}")
291
- ```
292
-
293
- #### Karaoke Video Generation
294
-
295
- ```python
296
- # Generate karaoke video from YouTube URL
297
- karaoke_job = client.karaoke.generate_karaoke(
298
- youtube_url="https://www.youtube.com/watch?v=example",
299
- video_style="modern",
300
- wait_for_completion=True
301
- )
302
-
303
- print(f"Karaoke video URL: {karaoke_job.result['karaoke_video_path']}")
304
- ```
305
-
306
- ## Error Handling
307
-
308
- ```python
309
- import audiopod
310
- from audiopod.exceptions import (
311
- AudioPodError,
312
- AuthenticationError,
313
- RateLimitError,
314
- ValidationError,
315
- ProcessingError
316
- )
317
-
318
- try:
319
- client = audiopod.Client(api_key="invalid_key")
320
- job = client.voice.clone_voice("voice.wav", "Test text")
321
-
322
- except AuthenticationError:
323
- print("Invalid API key")
324
- except RateLimitError as e:
325
- print(f"Rate limit exceeded. Retry after: {e.retry_after} seconds")
326
- except ValidationError as e:
327
- print(f"Invalid input: {e.message}")
328
- except ProcessingError as e:
329
- print(f"Processing failed: {e.message}")
330
- except AudioPodError as e:
331
- print(f"General API error: {e.message}")
332
- ```
333
-
334
- ## Credit Management
335
-
336
- ```python
337
- # Check credit balance
338
- credits = client.credits.get_credit_balance()
339
- print(f"Available credits: {credits.total_available_credits}")
340
- print(f"Next reset: {credits.next_reset_date}")
341
-
342
- # Get usage history
343
- usage = client.credits.get_usage_history()
344
- for record in usage:
345
- print(f"Service: {record['service_type']}, Credits: {record['credits_used']}")
346
-
347
- # Get credit multipliers
348
- multipliers = client.credits.get_credit_multipliers()
349
- print(f"Voice cloning: {multipliers['voice_cloning']} credits/second")
350
- ```
351
-
352
- ## Configuration
353
-
354
- ### Environment Variables
355
-
356
- - `AUDIOPOD_API_KEY`: Your AudioPod API key
357
- - `AUDIOPOD_BASE_URL`: Custom API base URL (optional)
358
- - `AUDIOPOD_TIMEOUT`: Request timeout in seconds (default: 30)
359
-
360
- ### Client Configuration
361
-
362
- ```python
363
- client = audiopod.Client(
364
- api_key="your_api_key",
365
- base_url="https://api.audiopod.ai", # Custom base URL
366
- timeout=60, # 60 second timeout
367
- max_retries=5, # Retry failed requests
368
- verify_ssl=True, # SSL verification
369
- debug=True # Enable debug logging
370
- )
371
- ```
372
-
373
- ## API Reference
374
-
375
- ### Client Classes
376
-
377
- - `audiopod.Client`: Synchronous client
378
- - `audiopod.AsyncClient`: Asynchronous client
379
-
380
- ### Services
381
-
382
- - `client.voice`: **Voice generation operations** (unified TTS & cloning using `generate_voice()`)
383
- - `client.music`: Music generation and editing
384
- - `client.transcription`: Speech-to-text transcription
385
- - `client.translation`: Audio/video translation
386
- - `client.speaker`: Speaker analysis and diarization
387
- - `client.denoiser`: Audio denoising and enhancement
388
- - `client.karaoke`: Karaoke video generation
389
- - `client.credits`: Credit management and usage tracking
390
-
391
- #### Voice Service Methods
392
-
393
- **Recommended (Unified Approach):**
394
- - `client.voice.generate_voice()` - Generate speech with voice file (cloning) or voice ID (TTS)
395
-
396
- **Legacy Methods (Backward Compatibility):**
397
- - `client.voice.clone_voice()` - Clone voice from audio file (deprecated, uses `generate_voice` internally)
398
- - `client.voice.generate_speech()` - Generate speech with voice profile (deprecated, uses `generate_voice` internally)
399
-
400
- **Voice Management:**
401
- - `client.voice.create_voice_profile()` - Create reusable voice profiles
402
- - `client.voice.list_voice_profiles()` - List available voice profiles
403
- - `client.voice.delete_voice_profile()` - Delete voice profiles
404
-
405
- ### Models
406
-
407
- - `Job`: Base job information and status
408
- - `VoiceProfile`: Voice profile details
409
- - `TranscriptionResult`: Transcription results and metadata
410
- - `MusicGenerationResult`: Music generation results
411
- - `TranslationResult`: Translation job results
412
- - `CreditInfo`: User credit information
413
-
414
- ## CLI Usage
415
-
416
- The SDK includes a command-line interface:
417
-
418
- ```bash
419
- # Check API status
420
- audiopod health
421
-
422
- # Get credit balance
423
- audiopod credits balance
424
-
425
- # Clone a voice
426
- audiopod voice clone voice.wav "Hello world!" --language en
427
-
428
- # Generate music
429
- audiopod music generate "upbeat electronic music" --duration 60
430
-
431
- # Transcribe audio
432
- audiopod transcription transcribe audio.mp3 --language en
433
- ```
434
-
435
- ## Requirements
436
-
437
- - Python 3.8+
438
- - Active AudioPod account with API access
439
- - Valid API key
440
-
441
- ## Support
442
-
443
- - 📖 [API Reference](https://docs.audiopod.ai)
444
- - 💬 [Discord Community](https://discord.gg/audiopod)
445
- - 📧 [Email Support](mailto:support@audiopod.ai)
446
- - 🐛 [Bug Reports](https://github.com/AudiopodAI/audiopod)
447
-
448
- ## License
449
-
450
- This SDK is released under the MIT License. See [LICENSE](LICENSE) for details.
451
-
452
- ---
453
-
454
- Made with ❤️ by the AudioPod team
@@ -1,24 +0,0 @@
1
- audiopod/__init__.py,sha256=jQtsXMdmCZArJ1pOWG9huymdE_-WlyW8Rk8q0kcQn-c,1790
2
- audiopod/cli.py,sha256=ZYzAQ3UpoYuOEWivMwMneJUf2z8DGGYTx1Nb6yRfdVY,9339
3
- audiopod/client.py,sha256=67oPSInSNssJpTR00ZuYSdk9lbx5KiRnDQw8UYKNVsA,11742
4
- audiopod/config.py,sha256=fuGtbuES4tXdHwqQqoZa5izCH6nVfFRP06D8eK1Cg10,1683
5
- audiopod/exceptions.py,sha256=c3Ym2tWyRE1kemVkXDaXFcfP3h6AokhKcUcCBImwGes,2386
6
- audiopod/models.py,sha256=R70iMqKDZfLtTB9FQ7KrFLBi-bFA5-FrS-5eMOtfK1o,8517
7
- audiopod/py.typed,sha256=ixa8YukDZ3kLo0WsFJRGohLMyHzbMur1ALmmASML2cs,64
8
- audiopod/services/__init__.py,sha256=9Ycl9VVscwwY42joBCSL67v8DrITW2T2QyuaokbpehM,653
9
- audiopod/services/base.py,sha256=mNbziYy2KsWWZrdHFlTl9pKLvoQUW-ZkkJuVWfCVP74,6731
10
- audiopod/services/credits.py,sha256=CjE2W8kmYjM4B02BwfPvvB3kl0YdVimM2kR7lhg43h8,1796
11
- audiopod/services/denoiser.py,sha256=Oi_1rCKs_L5lCG_2QuKwHzLe8_mbEIzlzM2X8TJ7Rnc,1750
12
- audiopod/services/karaoke.py,sha256=M0Befh4Y2DNM_uWFTmCIrzKfjqkvygrzCt0f_Dubj2o,2012
13
- audiopod/services/music.py,sha256=hDPjTSj-gAeEWBVB7PRPQrptMHJyQTz8e9p-p7yaRPI,20032
14
- audiopod/services/speaker.py,sha256=OPSOwArfrGXVzRgciS13n1QsCJSK1PB-Mz6VgwxuHAA,1866
15
- audiopod/services/stem_extraction.py,sha256=3ibMFKFR25xKHpVs3WGMNriZ88sB5PriFNa_s2Bvon4,6026
16
- audiopod/services/transcription.py,sha256=HyH6WpGWZsggYxIvt2dhB6_5UHaigk3XwXsVgarWzcE,7565
17
- audiopod/services/translation.py,sha256=oUU82c61CeAt13lzlWx8S-9xEgYlskwX8bLMbQw2Ni8,7396
18
- audiopod/services/voice.py,sha256=t0-4yjVrzWXJorfQCGbBSNRGE2wZfjoRQ76elJu1BvU,17748
19
- audiopod-1.2.0.dist-info/licenses/LICENSE,sha256=hqEjnOaGNbnLSBxbtbC7WQVREU2vQI8FmwecCiZlMfA,1068
20
- audiopod-1.2.0.dist-info/METADATA,sha256=mLpXkYWYxvd3k3LrDtH6Cr68C7Xk7JmpoBL4vwYPiOU,13048
21
- audiopod-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- audiopod-1.2.0.dist-info/entry_points.txt,sha256=uLcNDzXuOXnJAz9j91TDGayVjjZ7-ZiHBGDydqNUErU,47
23
- audiopod-1.2.0.dist-info/top_level.txt,sha256=M6yyOFFNpLdH4i1AMRqJZLRIgfpg1NvrQVmnPd8A6N8,9
24
- audiopod-1.2.0.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- audiopod = audiopod.cli:main