AudioPod SDK + CLI for Python - Professional Audio Processing powered by AI
Project description
AudioPod Python SDK
Official Python SDK for AudioPod AI — professional audio processing powered by AI: stem separation, transcription, voice cloning, TTS, music generation, and noise reduction.
This SDK is the Platform (API + Agent) surface of AudioPod — the developer entry point alongside the Node.js SDK, the CLI, and the MCP server. API access is pay-as-you-go ($1 = 7,500 credits, credits never expire) — no subscription required. Get a key at audiopod.ai/dashboard/account/api-keys.
Installation
pip install audiopod
Quick Start
from audiopod import Client
# Initialize client
client = Client(api_key="ap_your_api_key")
# Or set AUDIOPOD_API_KEY environment variable
# Check wallet balance
balance = client.wallet.get_balance()
print(f"Balance: {balance['balance_usd']}")
# Extract stems from audio
job = client.stem_extraction.extract_stems(
audio_file="song.mp3",
stem_types=["vocals", "drums", "bass", "other"],
wait_for_completion=True
)
# Download stems
for stem, url in job["download_urls"].items():
print(f"{stem}: {url}")
Services
Wallet (API Billing)
# Get balance
balance = client.wallet.get_balance()
# Get pricing
pricing = client.wallet.get_pricing()
# Estimate cost
estimate = client.wallet.estimate_cost("stem_extraction", duration_seconds=300)
# Top up wallet
checkout = client.wallet.create_topup_checkout(amount_cents=2500) # $25
print(f"Pay at: {checkout['url']}")
# Usage history
usage = client.wallet.get_usage_history(page=1, limit=50)
Stem Extraction
# Extract all stems
job = client.stem_extraction.extract_stems(
audio_file="song.mp3",
stem_types=["vocals", "drums", "bass", "other"],
wait_for_completion=True
)
# From URL
job = client.stem_extraction.extract_stems(
url="https://example.com/song.mp3",
stem_types=["vocals", "other"]
)
# Check status
status = client.stem_extraction.get_job(job_id=123)
Transcription
# Transcribe audio
result = client.transcription.transcribe(
audio_file="podcast.mp3",
speaker_diarization=True,
wait_for_completion=True
)
print(result["transcript"])
Voice Cloning & TTS
# List voices
voices = client.voice.list_voices()
# Generate speech
audio = client.voice.generate_speech(
text="Hello, world!",
voice_id=123,
wait_for_completion=True
)
Music Generation
# Generate music
result = client.music.generate(
prompt="upbeat electronic dance music",
duration=30,
wait_for_completion=True
)
Noise Reduction
# Denoise audio
result = client.denoiser.denoise(
audio_file="noisy.mp3",
mode="studio",
wait_for_completion=True
)
Async Support
import asyncio
from audiopod import AsyncClient
async def main():
async with AsyncClient() as client:
balance = await client.wallet.get_balance()
print(f"Balance: {balance['balance_usd']}")
asyncio.run(main())
Error Handling
from audiopod import Client
from audiopod.exceptions import (
AuthenticationError,
InsufficientBalanceError,
RateLimitError,
APIError
)
try:
client = Client()
job = client.stem_extraction.extract_stems(audio_file="song.mp3")
except AuthenticationError:
print("Invalid API key")
except InsufficientBalanceError as e:
print(f"Need to top up: required {e.required_cents} cents")
except RateLimitError:
print("Rate limit exceeded, try again later")
except APIError as e:
print(f"API error ({e.status_code}): {e}")
Documentation
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file audiopod-2.5.0.tar.gz.
File metadata
- Download URL: audiopod-2.5.0.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a15a80ce31195eed6c13f4317cc03435e0da7dc013d0ee8eea455087d32e8785
|
|
| MD5 |
ec3eaeafda05493e5ca881658c14e21b
|
|
| BLAKE2b-256 |
0eb4183398f2c27bfbf99548cac8e5058c6e121cd01b19f47bd00a8ba9d3fcbe
|
File details
Details for the file audiopod-2.5.0-py3-none-any.whl.
File metadata
- Download URL: audiopod-2.5.0-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e2d5bbbc8a342830ac7bca5880b5ddbe79dc51886e0bb60d5311b15de020ff1
|
|
| MD5 |
508f1a74c771cd5c793c409589b5e942
|
|
| BLAKE2b-256 |
0504d3a2ba89718f58728aab01fe818a6067dcdaf0fc1b09e87ad34676480f2d
|