Recipes← all recipesView on GitHub

Reduce background noise on a call

VoiceAI noise suppression

Turn call noise reduction on or off in the call flow or during a live call through REST.

The claim

Noise reduction is a switch, not a setting. In SWML, the denoise verb starts it and stop_denoise stops it; the bundled schema gives both an empty object and describes denoise as “Start noise reduction. You can stop it at any time using stop_denoise”. Over REST, the vendored spec has the same pair as call commands, calling.denoise and calling.denoise.stop, addressed to a live call by id with empty params. The SDK wraps those as client.calling.denoise and client.calling.denoise_stop.

How it works

- answer: {}
- denoise: {}
- play: { url: "say:Leave your message after the tone." }
- record: { beep: true, max_length: 60, terminators: "#" }
- stop_denoise: {}
- play: { url: "say:Thanks. Goodbye." }
- hangup: {}

Noise reduction is on while the caller records and off for the goodbye. The Python surface builds the same document with SWMLService, and adds two helpers for the REST side:

def quiet(call_id):
    return client.calling.denoise(call_id)

def loud(call_id):
    return client.calling.denoise_stop(call_id)

What the platform receives from quiet:

{"command": "calling.denoise", "id": "6d3f4a0e-2b1c-4e7a-9f0d-1c2b3a4d5e6f", "params": {}}

params is empty because the spec’s variant has no properties; id is the call’s id.

Limitations

The verifier proves the documents and the requests. What noise reduction does to the audio is the platform’s processing on a live call.

What to change first

Move stop_denoise above record in both surfaces and run the verifier. The order assertion fails, which is the point: the switch is on exactly between the two verbs, and the recording sat between them.

Where this sits

Before this