Media platforms, podcast hosting backends, and video SaaS applications cannot rely on browser-based drag-and-drop workflows to clean raw speech. Ingesting hundreds of hours of multi-speaker interviews, user-generated podcasts, or automated webinar recordings requires an automated, headless audio processing pipeline. When sound engineers manually trim verbal ticks and balance dynamic ranges, editing latency compounds exponentially.
Cleanvoice provides an AI-powered speech processing engine exposed via a RESTful architecture. It identifies and trims linguistic friction—such as hesitation sounds ("um", "uh"), stuttered syllables, lip smacks, and heavy breathing—while balancing uneven speaker volume across tracks.
At 365Finds, our architectural stance is clear: Cleanvoice excels at removing conversational friction and speech artifacts without stripping natural vocal cadence, provided developers integrate it as an asynchronous worker step within a distributed queue. This guide details the engineering implementation for Cleanvoice API integration, from payload structuring and authentication to polling orchestration, voice leveling, and timeline cutlist (EDL) handling.
Architecture Overview: The Headless Audio Pipeline
In an enterprise media ingestion system, Cleanvoice functions as an intermediate pre-processing and voice-optimization microservice situated between file ingestion and final transcoding/publishing:
- Ingest & Staging: An upstream service (mobile app, podcast client, or browser upload) pushes raw multi-track or single-track audio to an object storage bucket (e.g., AWS S3, Cloudflare R2, or Google Cloud Storage).
- Pre-Signed Dispatch: The backend generates a secure pre-signed GET URL for the raw media and submits a creation job to Cleanvoice.
- Asynchronous Execution & State Monitoring: Cleanvoice queues the job on its GPU clusters. The ingestion worker polls Cleanvoice task status.
- Asset Ingestion & Event Dispatch: Once processing succeeds, the worker immediately pulls the processed audio binary into private object storage, saves metadata and Edit Decision List (EDL) timestamps to the database, and fires an internal event or webhook to alert downstream transcription or master distribution services.
Authentication and Endpoint Standards
All Cleanvoice REST API endpoints require HTTP header-based authentication. API keys are provisioned under your account settings at app.cleanvoice.ai/settings.
- Base URL:
https://api.cleanvoice.ai - Core Job Submission:
POST /v2/edits - Task Polling & Retrieval:
GET /v2/edits/{id} - Direct File Binary Staging:
POST /v2/upload - Auth Header:
X-API-Key: <CLEANVOICE_API_KEY>
365Finds API Versioning Note: While legacy documentation and third-party tutorials occasionally cite
/v1/edits, Cleanvoice currently uses its OpenAPI 3.1 standardized/v2/editsendpoints. The v2 specification supports modular speech filters, template IDs, enhanced multi-track definitions, and improved noise reduction engines. Always target the/v2/namespace in production.
Audio Submission Strategies: Pre-Signed Object Storage vs. Direct Binary Upload
The Cleanvoice API accepts input media through two primary mechanisms:
Method 1: Pre-Signed Cloud Storage URLs (Recommended)
For production media architectures, passing a pre-signed cloud storage URL inside input.files is the cleanest, most scalable pattern. Your application server avoids handling heavy multipart file uploads twice:
{
"input": {
"files": [
"https://media-ingest.storage.company.internal/raw/podcasts/ep-102.wav?X-Amz-Signature=..."
],
"config": {
"fillers": true,
"normalize": true
}
}
}
Method 2: Direct Binary Upload via POST /v2/upload
If your audio resides in an ephemeral compute container or behind a strictly closed VPC with no public presigning capability, you can request an upload slot directly from Cleanvoice:
- Send
POST https://api.cleanvoice.ai/v2/upload?filename=recording.wav&size_bytes=45201920with theX-API-Keyheader. - Cleanvoice returns signed upload target metadata.
- Stream the raw audio payload via HTTP PUT to the provided target URL, and then reference that designated identifier in your
POST /v2/editspayload.
Configuring Speech Filtering and Voice Leveling
The Cleanvoice editing engine evaluates conversational speech characteristics using specialized sub-models. These are toggled within the input.config dictionary.
Here is an enterprise payload configuration designed for automated podcast leveling and speech clean-up:
{
"input": {
"files": [
"https://storage.example.com/audio/raw_interview_track.wav"
],
"config": {
"fillers": true,
"stutters": true,
"mouth_sounds": true,
"breath": true,
"long_silences": true,
"normalize": true,
"remove_noise": true,
"studio_sound": false,
"export_format": "wav",
"export_timestamps": true,
"audio_for_edl": false
},
"upload_type": "singletrack"
}
}
Parameter Reference & Operational Guidelines
| Parameter | Type | Default | 365Finds Recommendation & Technical Rationale |
|---|---|---|---|
fillers | Boolean | true | Keep Enabled. Trims verbal hesitations ("um", "uh", "ah") across 20+ languages. |
stutters | Boolean | true | Enable for unscripted interviews. Removes word repetitions and false starts without cutting natural cadence. |
mouth_sounds | Boolean | true | Enable. Excels at removing dry mouth clicks, saliva snaps, and lip pops. Essential for high-gain dynamic mics. |
breath | Boolean / String | false | Use cautiously. While aggressive breath removal tightens fast-paced ads, set to conservative or evaluate output on podcasts to avoid suffocating conversational flow. |
long_silences | Boolean | false | Enable with threshold validation. Cuts awkward pauses and dead air. If your format relies on dramatic pauses, disable this or rely on EDL markers. |
normalize | Boolean | false | Enable for voice leveling. Smooths out inconsistent speaker volumes and brings dialogues up to broadcast-standard loudness levels. |
remove_noise | Boolean / String | true | Enable (true or "v2"). Suppresses stationary background noise, room hums, and HVAC noise using the Noise v2 engine. |
studio_sound | Boolean / String | false | Test per environment. Reconstructs voice frequencies and damps severe room reverb. Recommended for non-acoustically treated recordings; avoid on professional broadcast mics. |
export_format | String | "auto" | Set explicitly to "wav" for intermediate processing steps to avoid lossy re-encoding artifacts, or "mp3" for direct distribution. |
export_timestamps | Boolean | false | Enable for non-destructive workflows. Generates timestamped markers and EDL cuts for manual oversight. |
Orchestrating the Asynchronous Lifecycle
Cleanvoice processes audio asynchronously. An hour-long audio recording generally takes between 1 to 4 minutes to process, depending on pipeline queue depth and audio complexity.
Because Cleanvoice's core /v2/edits REST interface does not accept an inbound user-defined HTTP callback URL in the initial POST payload, engineering teams must not maintain a persistent synchronous HTTP socket. Doing so triggers gateway timeouts (HTTP 504) at the load balancer level.
Instead, the standard integration pattern is a Queue-Backed Polling Worker:
- Submission Phase: Submit
POST /v2/edits. Cleanvoice returns200 OKwith{"id": "edit_65c..."}. - Worker Scheduling: Dispatch a task to an asynchronous worker queue (e.g., Celery, BullMQ, Temporal, or AWS SQS + Lambda).
- Backoff Polling: The worker queries
GET /v2/edits/{id}on an exponential backoff schedule (e.g., every 5 seconds for the first 30 seconds, then every 10 seconds). - Terminal States:
SUCCESS: Extract the processed media URL, statistics, and EDL data.FAILURE: Log the error payload, trigger a dead-letter alert, and fall back to the unedited source track.
- Internal Webhook / Event Dispatch: Your worker notifies downstream microservices via your application's own webhook dispatcher or internal pub/sub event bus.
Production Python Implementation
Below is a complete, production-ready integration class demonstrating how to authenticate, submit an audio job, monitor completion with exponential backoff, and download assets:
import os
import time
import logging
from typing import Dict, Any, Optional
import requests
logger = logging.getLogger("media_pipeline.cleanvoice")
class CleanvoicePipelineClient:
BASE_URL = "https://api.cleanvoice.ai"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.getenv("CLEANVOICE_API_KEY")
if not self.api_key:
raise ValueError("Cleanvoice API key must be provided or set in CLEANVOICE_API_KEY.")
self.headers = {
"X-API-Key": self.api_key,
"Content-Type": "application/json",
"User-Agent": "MediaPipelineWorker/1.0"
}
def submit_edit_job(self, media_url: str, config_overrides: Optional[Dict[str, Any]] = None) -> str:
"""
Submits an asynchronous editing job to Cleanvoice.
Returns the job/edit ID.
"""
endpoint = f"{self.BASE_URL}/v2/edits"
default_config = {
"fillers": True,
"stutters": True,
"mouth_sounds": True,
"long_silences": True,
"normalize": True,
"remove_noise": True,
"export_format": "wav",
"export_timestamps": True
}
if config_overrides:
default_config.update(config_overrides)
payload = {
"input": {
"files": [media_url],
"config": default_config,
"upload_type": "singletrack"
}
}
response = requests.post(endpoint, headers=self.headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
edit_id = data.get("id")
if not edit_id:
raise RuntimeError(f"Unexpected response from Cleanvoice: {data}")
logger.info(f"Cleanvoice job initiated successfully. Edit ID: {edit_id}")
return edit_id
def poll_until_complete(
self,
edit_id: str,
max_retries: int = 60,
base_interval_sec: float = 5.0
) -> Dict[str, Any]:
"""
Polls GET /v2/edits/{id} until the job completes, fails, or times out.
"""
endpoint = f"{self.BASE_URL}/v2/edits/{edit_id}"
for attempt in range(max_retries):
response = requests.get(endpoint, headers=self.headers, timeout=15)
response.raise_for_status()
task_data = response.json()
status = task_data.get("status")
logger.debug(f"Job {edit_id} status (poll #{attempt + 1}): {status}")
if status == "SUCCESS":
logger.info(f"Job {edit_id} completed successfully.")
return task_data
elif status == "FAILURE":
error_detail = task_data.get("error", "Unknown processing failure")
raise RuntimeError(f"Cleanvoice job {edit_id} failed: {error_detail}")
sleep_duration = min(base_interval_sec * (1.1 ** attempt), 20.0)
time.sleep(sleep_duration)
raise TimeoutError(f"Cleanvoice job {edit_id} did not complete within the maximum polling threshold.")
def download_cleaned_asset(self, download_url: str, target_file_path: str) -> None:
"""
Streams processed audio binary to local storage or an internal staging buffer.
"""
with requests.get(download_url, stream=True, timeout=60) as r:
r.raise_for_status()
with open(target_file_path, "wb") as f:
for chunk in r.iter_content(chunk_size=1024 * 1024):
if chunk:
f.write(chunk)
logger.info(f"Asset successfully archived to {target_file_path}")
Non-Destructive Post-Production: Consuming EDL Markers
In professional audio engineering workflows, automated cuts should not always be permanently baked into the audio master. If a host purposely repeats a word for comedic effect or uses an unusual proper noun, an automated algorithm might mistakenly identify it as a stutter or filler sound.
By setting "export_timestamps": true and "audio_for_edl": true, Cleanvoice returns an Edit Decision List (result.edl) alongside cut markers in the response:
{
"id": "edit_65c9f1a2",
"status": "SUCCESS",
"result": {
"download_url": "https://api.cleanvoice.ai/v2/download/signed_rendered_audio.wav",
"statistics": {
"FILLER_SOUND": 34,
"MOUTH_SOUND": 22,
"STUTTER": 6,
"LONG_SILENCE": 9,
"TIME_REMOVED_SECONDS": 84.6
},
"edl": {
"format": "edl",
"url": "https://api.cleanvoice.ai/v2/download/edit_markers.edl",
"markers": [
{
"start": 14.25,
"end": 14.80,
"type": "FILLER_SOUND",
"description": "um"
},
{
"start": 52.10,
"end": 52.45,
"type": "MOUTH_SOUND",
"description": "click"
}
]
}
}
}
Implementing a Human-in-the-Loop Fallback
- Automated Pipeline Mode: In fully automated podcast syndication where speed is paramount, ingest
download_urldirectly as the new release candidate. - DAW Assist Mode: For premium studios using Pro Tools, Reaper, Adobe Audition, or DaVinci Resolve, inject the
.edlfile directly into your session template. Sound editors open the timeline with cut markers already aligned, shaving hours off manual scrubbing while preserving 100% editing control.
365Finds Operational Recommendations & Caveats
- Immediate S3 Ingestion (Storage Ephemerality): Cleanvoice is an audio processor, not a cold storage repository. Cleanvoice ephemeral download URLs expire after a short window. As soon as a polling worker detects
status == "SUCCESS", stream the audio payload directly into your private S3 or Cloudflare R2 bucket. - Volume Normalization Placement: Cleanvoice's
normalize: trueapplies perceptual voice leveling. If your media pipeline applies aggressive post-processing downstream (such as custom multiband limiting or loudness normalization to -16 LUFS for podcasts or -14 LUFS for YouTube), test your mastering chain. In most cases, letting Cleanvoice level the dynamic range first delivers cleaner, more predictable inputs to your final limiter. - Network Timeouts & Graceful Degradation: Always wrap Cleanvoice calls with try-catch blocks in your pipeline. If Cleanvoice encounters an unrecognized audio codec or temporary outage, your media worker should flag the episode, retain the raw input track, and proceed with fallback encoding so publishing schedules remain intact.