CleanvoiceDocs
Python SDK

Quick Start

Clean your first audio file with the Python SDK.

Use this pre-built prompt to get started faster.

Get your API key

Go to app.cleanvoice.ai/developer/api-keys and create a new key.

Store it as an environment variable so you never hard-code it in source files:

export CLEANVOICE_API_KEY="your_api_key_here"

Install the SDK

pip install cleanvoice-sdk
uv add cleanvoice-sdk

Clean your audio

from cleanvoice import Cleanvoice

client = Cleanvoice.from_env()

result = client.process(
    # Option 1: public URL
    "https://example.com/episode.mp3",

    # Option 2: local file path
    # "/path/to/episode.mp3",

    # Option 3: NumPy array
    # (audio_array, sample_rate),

    fillers=True,
    long_silences=True,
    normalize=True,
)

result.audio.download("cleaned.mp3")

Processing typically takes ~30 seconds for a 2–3 minute clip and 5–10 minutes for a 1-hour file.

Common presets

Noise reduction and loudness normalization — language-agnostic, works for any recording.

result = client.process(
    "episode.mp3",
    remove_noise=True,
    studio_sound=True,
    normalize=True,
)

Full spoken-word cleanup: remove fillers, silences, mouth sounds, breathing, and stutters.

result = client.process(
    "episode.mp3",
    fillers=True,
    long_silences=True,
    mouth_sounds=True,
    breath=True,
    stutters=True,
    remove_noise=True,
    normalize=True,
)

Process a video file — audio is cleaned and returned inside the original video container. The SDK usually auto-detects common video filenames, but setting video=True explicitly is safest.

result = client.process(
    "video.mp4",
    video=True,
    remove_noise=True,
    studio_sound=True,
    normalize=True,
    output_path="clean.mp4",
)
print(result.media.url)

Minimal processing — just normalize loudness and trim excessive silences.

result = client.process(
    "episode.mp3",
    long_silences=True,
    normalize=True,
)

Deliver results to your storage

If you want the cleaned file delivered directly to your own storage (S3, GCS, etc.), pass a pre-signed PUT URL. Cleanvoice will upload the result there instead of hosting it.

result = client.process(
    "https://example.com/episode.mp3",
    fillers=True,
    normalize=True,
    signed_url="https://your-bucket.s3.amazonaws.com/cleaned.mp3?X-Amz-Signature=...",
)

Generate the pre-signed PUT URL on your backend before calling process(), then pass it as signed_url.