Quick Start
Clean your first audio file with the JavaScript 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
npm install @cleanvoice/cleanvoice-sdkpnpm add @cleanvoice/cleanvoice-sdkyarn add @cleanvoice/cleanvoice-sdkbun add @cleanvoice/cleanvoice-sdkClean your audio
import { Cleanvoice } from '@cleanvoice/cleanvoice-sdk';
const client = Cleanvoice.fromEnv(); // reads CLEANVOICE_API_KEY
// or: const client = new Cleanvoice({ apiKey: process.env.CLEANVOICE_API_KEY });
const result = await client.process(
// Option 1: public URL
'https://example.com/episode.mp3',
// Option 2: local file path
// '/path/to/episode.mp3',
{
fillers: true,
long_silences: true,
normalize: true,
}
);
console.log('Download:', result.audio.url);
await 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.
const result = await client.process('episode.mp3', {
remove_noise: true,
studio_sound: true,
normalize: true,
});Full spoken-word cleanup: remove fillers, silences, mouth sounds, breathing, and stutters.
const result = await 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.
const result = await client.process('video.mp4', {
video: true,
remove_noise: true,
studio_sound: true,
normalize: true,
});
console.log(result.media.url); // video with cleaned audioMinimal processing — just normalize loudness and trim excessive silences.
const result = await 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.
const result = await 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.