Skip to main content

Official AudioPod SDK 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.

PyPI version Python 3.8+ License: MIT

Installation

pip install audiopod

Quick Start

from audiopod import AudioPod

# Initialize client
client = AudioPod(api_key="ap_your_api_key")

# Separate audio into 6 stems
result = client.stems.separate(
    url="https://youtube.com/watch?v=VIDEO_ID",
    mode="six"
)

# Download stems
for stem, url in result["download_urls"].items():
    print(f"{stem}: {url}")

Stem Separation

Extract individual audio components from mixed recordings.

Available Modes

Mode Stems Output
single 1 Specified stem only (vocals, drums, bass, guitar, piano, other)
two 2 Vocals + Instrumental
four 4 Vocals, Drums, Bass, Other
six 6 Vocals, Drums, Bass, Guitar, Piano, Other
producer 8 + Kick, Snare, Hihat
studio 12 Full production toolkit
mastering 16 Maximum detail

Examples

from audiopod import AudioPod

client = AudioPod(api_key="ap_your_api_key")

# Six-stem separation from YouTube
job = client.stems.extract(
    url="https://youtube.com/watch?v=VIDEO_ID",
    mode="six"
)
print(f"Job ID: {job['id']}")

# Wait for completion
result = client.stems.wait_for_completion(job["id"])
print(result["download_urls"])

# Or use the convenience method (extract + wait)
result = client.stems.separate(
    url="https://youtube.com/watch?v=VIDEO_ID",
    mode="six"
)

# From local file
result = client.stems.separate(
    file="./song.mp3",
    mode="four"
)

# Extract only vocals
result = client.stems.separate(
    url="https://youtube.com/watch?v=VIDEO_ID",
    mode="single",
    stem="vocals"
)

# Get available modes
modes = client.stems.modes()
for m in modes["modes"]:
    print(f"{m['mode']}: {m['description']}")

API Wallet

Check balance and manage your wallet.

# Check balance
balance = client.wallet.balance()
print(f"Balance: {balance['balance_usd']}")

# Estimate cost
estimate = client.wallet.estimate("stem_extraction", duration_seconds=180)
print(f"Estimated cost: {estimate['cost_usd']}")

# Get usage history
usage = client.wallet.usage()
for log in usage["logs"]:
    print(f"{log['service_type']}: {log['amount_usd']}")

Other Services

# Transcription
job = client.transcription.create(url="https://...")
result = client.transcription.wait_for_completion(job["id"])

# Voice cloning
voice = client.voice.clone(file="./sample.wav", name="My Voice")

# Music generation
song = client.music.generate(prompt="upbeat electronic dance music")

# Noise reduction
clean = client.denoiser.denoise(file="./noisy.wav")

# Speaker diarization
speakers = client.speaker.diarize(url="https://...")

Error Handling

from audiopod import AudioPod, InsufficientBalanceError, AuthenticationError

try:
    client = AudioPod(api_key="ap_...")
    result = client.stems.separate(url="...", mode="six")
except AuthenticationError:
    print("Invalid API key")
except InsufficientBalanceError as e:
    print(f"Need more credits. Required: {e.required_cents} cents")

Environment Variables

export AUDIOPOD_API_KEY="ap_your_api_key"
# Client reads from env automatically
client = AudioPod()

Documentation

License

MIT License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audiopod-2.1.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiopod-2.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file audiopod-2.1.0.tar.gz.

File metadata

  • Download URL: audiopod-2.1.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for audiopod-2.1.0.tar.gz
Algorithm Hash digest
SHA256 06a19259ce10fc9dee9c5b850e00e8374727a337f24b49e6332e1e8064938bf5
MD5 2e6da5b9b9a79d94f8283609611364dc
BLAKE2b-256 5698c64b0d4643c9a26d7f254a6733e74bbd7cce8e2a3d1e33f1020ee2eff297

See more details on using hashes here.

File details

Details for the file audiopod-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: audiopod-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for audiopod-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f637cc7e846e696200ebbb4963cf21cd1a78e2c2cc5e3794441d80af806d053f
MD5 ab7899210fb56ca0b91bbc0b5c396dde
BLAKE2b-256 5971290f62f70696aad49817cad2b965310a84198390d8f1152185aab250801e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page