audiopod 2.1.0__tar.gz → 2.2.0__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.
- audiopod-2.2.0/PKG-INFO +206 -0
- audiopod-2.2.0/README.md +173 -0
- {audiopod-2.1.0 → audiopod-2.2.0}/audiopod/__init__.py +12 -13
- audiopod-2.2.0/audiopod/client.py +312 -0
- audiopod-2.2.0/audiopod/config.py +17 -0
- audiopod-2.2.0/audiopod/exceptions.py +41 -0
- audiopod-2.2.0/audiopod/services/__init__.py +30 -0
- audiopod-2.2.0/audiopod/services/base.py +69 -0
- audiopod-2.2.0/audiopod/services/credits.py +42 -0
- audiopod-2.2.0/audiopod/services/denoiser.py +136 -0
- audiopod-2.2.0/audiopod/services/music.py +217 -0
- audiopod-2.2.0/audiopod/services/speaker.py +134 -0
- audiopod-2.2.0/audiopod/services/stem_extraction.py +287 -0
- audiopod-2.2.0/audiopod/services/transcription.py +210 -0
- audiopod-2.2.0/audiopod/services/translation.py +135 -0
- audiopod-2.2.0/audiopod/services/video.py +329 -0
- audiopod-2.2.0/audiopod/services/voice.py +187 -0
- audiopod-2.2.0/audiopod/services/wallet.py +235 -0
- audiopod-2.2.0/audiopod.egg-info/PKG-INFO +206 -0
- audiopod-2.2.0/audiopod.egg-info/SOURCES.txt +24 -0
- audiopod-2.2.0/audiopod.egg-info/requires.txt +8 -0
- {audiopod-2.1.0 → audiopod-2.2.0}/pyproject.toml +14 -37
- audiopod-2.1.0/PKG-INFO +0 -205
- audiopod-2.1.0/README.md +0 -165
- audiopod-2.1.0/audiopod/client.py +0 -198
- audiopod-2.1.0/audiopod/exceptions.py +0 -49
- audiopod-2.1.0/audiopod/resources/__init__.py +0 -23
- audiopod-2.1.0/audiopod/resources/denoiser.py +0 -116
- audiopod-2.1.0/audiopod/resources/music.py +0 -166
- audiopod-2.1.0/audiopod/resources/speaker.py +0 -132
- audiopod-2.1.0/audiopod/resources/stems.py +0 -267
- audiopod-2.1.0/audiopod/resources/transcription.py +0 -205
- audiopod-2.1.0/audiopod/resources/voice.py +0 -139
- audiopod-2.1.0/audiopod/resources/wallet.py +0 -110
- audiopod-2.1.0/audiopod.egg-info/PKG-INFO +0 -205
- audiopod-2.1.0/audiopod.egg-info/SOURCES.txt +0 -19
- audiopod-2.1.0/audiopod.egg-info/requires.txt +0 -10
- {audiopod-2.1.0 → audiopod-2.2.0}/LICENSE +0 -0
- {audiopod-2.1.0 → audiopod-2.2.0}/audiopod.egg-info/dependency_links.txt +0 -0
- {audiopod-2.1.0 → audiopod-2.2.0}/audiopod.egg-info/top_level.txt +0 -0
- {audiopod-2.1.0 → audiopod-2.2.0}/setup.cfg +0 -0
audiopod-2.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: audiopod
|
|
3
|
+
Version: 2.2.0
|
|
4
|
+
Summary: AudioPod SDK for Python - Professional Audio Processing powered by AI
|
|
5
|
+
Author-email: AudioPod AI <support@audiopod.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://audiopod.ai
|
|
8
|
+
Project-URL: Documentation, https://docs.audiopod.ai
|
|
9
|
+
Project-URL: Repository, https://github.com/AudiopodAI/audiopod-python
|
|
10
|
+
Keywords: audiopod,audio,ai,voice,cloning,transcription,stem-separation,music,sdk
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: requests>=2.28.0
|
|
26
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
30
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# AudioPod Python SDK
|
|
35
|
+
|
|
36
|
+
Official Python SDK for [AudioPod AI](https://audiopod.ai) - Professional Audio Processing powered by AI.
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install audiopod
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick Start
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from audiopod import Client
|
|
48
|
+
|
|
49
|
+
# Initialize client
|
|
50
|
+
client = Client(api_key="ap_your_api_key")
|
|
51
|
+
# Or set AUDIOPOD_API_KEY environment variable
|
|
52
|
+
|
|
53
|
+
# Check wallet balance
|
|
54
|
+
balance = client.wallet.get_balance()
|
|
55
|
+
print(f"Balance: {balance['balance_usd']}")
|
|
56
|
+
|
|
57
|
+
# Extract stems from audio
|
|
58
|
+
job = client.stem_extraction.extract_stems(
|
|
59
|
+
audio_file="song.mp3",
|
|
60
|
+
stem_types=["vocals", "drums", "bass", "other"],
|
|
61
|
+
wait_for_completion=True
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Download stems
|
|
65
|
+
for stem, url in job["download_urls"].items():
|
|
66
|
+
print(f"{stem}: {url}")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Services
|
|
70
|
+
|
|
71
|
+
### Wallet (API Billing)
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
# Get balance
|
|
75
|
+
balance = client.wallet.get_balance()
|
|
76
|
+
|
|
77
|
+
# Get pricing
|
|
78
|
+
pricing = client.wallet.get_pricing()
|
|
79
|
+
|
|
80
|
+
# Estimate cost
|
|
81
|
+
estimate = client.wallet.estimate_cost("stem_extraction", duration_seconds=300)
|
|
82
|
+
|
|
83
|
+
# Top up wallet
|
|
84
|
+
checkout = client.wallet.create_topup_checkout(amount_cents=2500) # $25
|
|
85
|
+
print(f"Pay at: {checkout['url']}")
|
|
86
|
+
|
|
87
|
+
# Usage history
|
|
88
|
+
usage = client.wallet.get_usage_history(page=1, limit=50)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Stem Extraction
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
# Extract all stems
|
|
95
|
+
job = client.stem_extraction.extract_stems(
|
|
96
|
+
audio_file="song.mp3",
|
|
97
|
+
stem_types=["vocals", "drums", "bass", "other"],
|
|
98
|
+
wait_for_completion=True
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# From URL
|
|
102
|
+
job = client.stem_extraction.extract_stems(
|
|
103
|
+
url="https://example.com/song.mp3",
|
|
104
|
+
stem_types=["vocals", "other"]
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Check status
|
|
108
|
+
status = client.stem_extraction.get_job(job_id=123)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Transcription
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
# Transcribe audio
|
|
115
|
+
result = client.transcription.transcribe(
|
|
116
|
+
audio_file="podcast.mp3",
|
|
117
|
+
speaker_diarization=True,
|
|
118
|
+
wait_for_completion=True
|
|
119
|
+
)
|
|
120
|
+
print(result["transcript"])
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Voice Cloning & TTS
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
# List voices
|
|
127
|
+
voices = client.voice.list_voices()
|
|
128
|
+
|
|
129
|
+
# Generate speech
|
|
130
|
+
audio = client.voice.generate_speech(
|
|
131
|
+
text="Hello, world!",
|
|
132
|
+
voice_id=123,
|
|
133
|
+
wait_for_completion=True
|
|
134
|
+
)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Music Generation
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
# Generate music
|
|
141
|
+
result = client.music.generate(
|
|
142
|
+
prompt="upbeat electronic dance music",
|
|
143
|
+
duration=30,
|
|
144
|
+
wait_for_completion=True
|
|
145
|
+
)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Noise Reduction
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
# Denoise audio
|
|
152
|
+
result = client.denoiser.denoise(
|
|
153
|
+
audio_file="noisy.mp3",
|
|
154
|
+
mode="studio",
|
|
155
|
+
wait_for_completion=True
|
|
156
|
+
)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Async Support
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
import asyncio
|
|
163
|
+
from audiopod import AsyncClient
|
|
164
|
+
|
|
165
|
+
async def main():
|
|
166
|
+
async with AsyncClient() as client:
|
|
167
|
+
balance = await client.wallet.get_balance()
|
|
168
|
+
print(f"Balance: {balance['balance_usd']}")
|
|
169
|
+
|
|
170
|
+
asyncio.run(main())
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Error Handling
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
from audiopod import Client
|
|
177
|
+
from audiopod.exceptions import (
|
|
178
|
+
AuthenticationError,
|
|
179
|
+
InsufficientBalanceError,
|
|
180
|
+
RateLimitError,
|
|
181
|
+
APIError
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
try:
|
|
185
|
+
client = Client()
|
|
186
|
+
job = client.stem_extraction.extract_stems(audio_file="song.mp3")
|
|
187
|
+
except AuthenticationError:
|
|
188
|
+
print("Invalid API key")
|
|
189
|
+
except InsufficientBalanceError as e:
|
|
190
|
+
print(f"Need to top up: required {e.required_cents} cents")
|
|
191
|
+
except RateLimitError:
|
|
192
|
+
print("Rate limit exceeded, try again later")
|
|
193
|
+
except APIError as e:
|
|
194
|
+
print(f"API error ({e.status_code}): {e}")
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Documentation
|
|
198
|
+
|
|
199
|
+
- [API Reference](https://docs.audiopod.ai)
|
|
200
|
+
- [API Wallet](https://docs.audiopod.ai/account/api-wallet)
|
|
201
|
+
- [Stem Separation](https://docs.audiopod.ai/api-reference/stem-splitter)
|
|
202
|
+
|
|
203
|
+
## License
|
|
204
|
+
|
|
205
|
+
MIT
|
|
206
|
+
|
audiopod-2.2.0/README.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# AudioPod Python SDK
|
|
2
|
+
|
|
3
|
+
Official Python SDK for [AudioPod AI](https://audiopod.ai) - Professional Audio Processing powered by AI.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install audiopod
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from audiopod import Client
|
|
15
|
+
|
|
16
|
+
# Initialize client
|
|
17
|
+
client = Client(api_key="ap_your_api_key")
|
|
18
|
+
# Or set AUDIOPOD_API_KEY environment variable
|
|
19
|
+
|
|
20
|
+
# Check wallet balance
|
|
21
|
+
balance = client.wallet.get_balance()
|
|
22
|
+
print(f"Balance: {balance['balance_usd']}")
|
|
23
|
+
|
|
24
|
+
# Extract stems from audio
|
|
25
|
+
job = client.stem_extraction.extract_stems(
|
|
26
|
+
audio_file="song.mp3",
|
|
27
|
+
stem_types=["vocals", "drums", "bass", "other"],
|
|
28
|
+
wait_for_completion=True
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Download stems
|
|
32
|
+
for stem, url in job["download_urls"].items():
|
|
33
|
+
print(f"{stem}: {url}")
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Services
|
|
37
|
+
|
|
38
|
+
### Wallet (API Billing)
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# Get balance
|
|
42
|
+
balance = client.wallet.get_balance()
|
|
43
|
+
|
|
44
|
+
# Get pricing
|
|
45
|
+
pricing = client.wallet.get_pricing()
|
|
46
|
+
|
|
47
|
+
# Estimate cost
|
|
48
|
+
estimate = client.wallet.estimate_cost("stem_extraction", duration_seconds=300)
|
|
49
|
+
|
|
50
|
+
# Top up wallet
|
|
51
|
+
checkout = client.wallet.create_topup_checkout(amount_cents=2500) # $25
|
|
52
|
+
print(f"Pay at: {checkout['url']}")
|
|
53
|
+
|
|
54
|
+
# Usage history
|
|
55
|
+
usage = client.wallet.get_usage_history(page=1, limit=50)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Stem Extraction
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
# Extract all stems
|
|
62
|
+
job = client.stem_extraction.extract_stems(
|
|
63
|
+
audio_file="song.mp3",
|
|
64
|
+
stem_types=["vocals", "drums", "bass", "other"],
|
|
65
|
+
wait_for_completion=True
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# From URL
|
|
69
|
+
job = client.stem_extraction.extract_stems(
|
|
70
|
+
url="https://example.com/song.mp3",
|
|
71
|
+
stem_types=["vocals", "other"]
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Check status
|
|
75
|
+
status = client.stem_extraction.get_job(job_id=123)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Transcription
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
# Transcribe audio
|
|
82
|
+
result = client.transcription.transcribe(
|
|
83
|
+
audio_file="podcast.mp3",
|
|
84
|
+
speaker_diarization=True,
|
|
85
|
+
wait_for_completion=True
|
|
86
|
+
)
|
|
87
|
+
print(result["transcript"])
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Voice Cloning & TTS
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
# List voices
|
|
94
|
+
voices = client.voice.list_voices()
|
|
95
|
+
|
|
96
|
+
# Generate speech
|
|
97
|
+
audio = client.voice.generate_speech(
|
|
98
|
+
text="Hello, world!",
|
|
99
|
+
voice_id=123,
|
|
100
|
+
wait_for_completion=True
|
|
101
|
+
)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Music Generation
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
# Generate music
|
|
108
|
+
result = client.music.generate(
|
|
109
|
+
prompt="upbeat electronic dance music",
|
|
110
|
+
duration=30,
|
|
111
|
+
wait_for_completion=True
|
|
112
|
+
)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Noise Reduction
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
# Denoise audio
|
|
119
|
+
result = client.denoiser.denoise(
|
|
120
|
+
audio_file="noisy.mp3",
|
|
121
|
+
mode="studio",
|
|
122
|
+
wait_for_completion=True
|
|
123
|
+
)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Async Support
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
import asyncio
|
|
130
|
+
from audiopod import AsyncClient
|
|
131
|
+
|
|
132
|
+
async def main():
|
|
133
|
+
async with AsyncClient() as client:
|
|
134
|
+
balance = await client.wallet.get_balance()
|
|
135
|
+
print(f"Balance: {balance['balance_usd']}")
|
|
136
|
+
|
|
137
|
+
asyncio.run(main())
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Error Handling
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
from audiopod import Client
|
|
144
|
+
from audiopod.exceptions import (
|
|
145
|
+
AuthenticationError,
|
|
146
|
+
InsufficientBalanceError,
|
|
147
|
+
RateLimitError,
|
|
148
|
+
APIError
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
try:
|
|
152
|
+
client = Client()
|
|
153
|
+
job = client.stem_extraction.extract_stems(audio_file="song.mp3")
|
|
154
|
+
except AuthenticationError:
|
|
155
|
+
print("Invalid API key")
|
|
156
|
+
except InsufficientBalanceError as e:
|
|
157
|
+
print(f"Need to top up: required {e.required_cents} cents")
|
|
158
|
+
except RateLimitError:
|
|
159
|
+
print("Rate limit exceeded, try again later")
|
|
160
|
+
except APIError as e:
|
|
161
|
+
print(f"API error ({e.status_code}): {e}")
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Documentation
|
|
165
|
+
|
|
166
|
+
- [API Reference](https://docs.audiopod.ai)
|
|
167
|
+
- [API Wallet](https://docs.audiopod.ai/account/api-wallet)
|
|
168
|
+
- [Stem Separation](https://docs.audiopod.ai/api-reference/stem-splitter)
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
MIT
|
|
173
|
+
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
"""
|
|
2
2
|
AudioPod SDK for Python
|
|
3
3
|
Professional Audio Processing powered by AI
|
|
4
|
-
|
|
5
|
-
Example:
|
|
6
|
-
from audiopod import AudioPod
|
|
7
|
-
|
|
8
|
-
client = AudioPod(api_key="ap_...")
|
|
9
|
-
|
|
10
|
-
# Transcribe audio
|
|
11
|
-
job = client.transcription.create(url="https://...")
|
|
12
|
-
result = client.transcription.wait_for_completion(job.id)
|
|
13
4
|
"""
|
|
14
5
|
|
|
15
|
-
__version__ = "2.
|
|
6
|
+
__version__ = "2.2.0"
|
|
16
7
|
|
|
17
|
-
from .client import
|
|
8
|
+
from .client import Client, AsyncClient
|
|
18
9
|
from .exceptions import (
|
|
19
10
|
AudioPodError,
|
|
20
11
|
AuthenticationError,
|
|
21
12
|
APIError,
|
|
22
13
|
RateLimitError,
|
|
14
|
+
ValidationError,
|
|
23
15
|
InsufficientBalanceError,
|
|
24
16
|
)
|
|
25
17
|
|
|
18
|
+
# Alias for consistency with documentation and Node.js SDK
|
|
19
|
+
AudioPod = Client
|
|
20
|
+
|
|
26
21
|
__all__ = [
|
|
27
|
-
"
|
|
22
|
+
"Client",
|
|
23
|
+
"AsyncClient",
|
|
24
|
+
"AudioPod", # Alias for Client
|
|
28
25
|
"AudioPodError",
|
|
29
|
-
"AuthenticationError",
|
|
26
|
+
"AuthenticationError",
|
|
30
27
|
"APIError",
|
|
31
28
|
"RateLimitError",
|
|
29
|
+
"ValidationError",
|
|
32
30
|
"InsufficientBalanceError",
|
|
33
31
|
"__version__",
|
|
34
32
|
]
|
|
33
|
+
|