Skip to content

Commit b6077f9

Browse files
committed
Document noise suppression, cancellation, and no-audio-input detection
Adds three new sections to the Managing Voice Chat guide covering audio processing capabilities exposed by the Social SDK Client: - "Detecting No Audio Input" — Client::SetNoAudioInputThreshold and SetNoAudioInputCallback for surfacing "your mic appears silent" UX. - "Noise Suppression & Cancellation" — splits the WebRTC defaults (SetNoiseSuppression, SetEchoCancellation, SetAutomaticGainControl) from the optional Krisp-powered SetNoiseCancellation, and includes guidance on excluding Krisp to reduce installation size. - "Diagnosing Audio Issues" — links to the Voice Logging and Audio Logging sections of the Debug & Log guide. Also updates social-sdk-mappings.json with SetNoiseCancellation and fixes reference-link ordering in two adjacent how-to guides.
1 parent 4d39d69 commit b6077f9

4 files changed

Lines changed: 88 additions & 17 deletions

File tree

developers/discord-social-sdk/development-guides/managing-voice-chat.mdx

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,70 @@ client->SetInputVolume(75.0f); // Set microphone to 75%
134134
client->SetOutputVolume(120.0f); // Increase speaker volume to 120%
135135
```
136136

137+
### Detecting No Audio Input
138+
139+
The SDK can notify you when no audio is reaching the microphone — for example, when a user's mic is broken, muted at the OS level, or the wrong input device is selected. This lets your game surface a "your mic appears silent" hint instead of leaving the user to wonder why nobody can hear them.
140+
141+
- [`Client::SetNoAudioInputThreshold`] — dBFS threshold for what counts as "no input." Range `[-100.0, 100.0]`, defaults to `-100.0` (detection disabled). Set to something like `-60.0` to enable.
142+
- [`Client::SetNoAudioInputCallback`] — receives a `bool inputDetected` whenever the mic crosses the threshold (silent → active or active → silent).
143+
144+
```cpp
145+
// Enable detection at -60 dBFS
146+
client->SetNoAudioInputThreshold(-60.0f);
147+
148+
client->SetNoAudioInputCallback([](bool inputDetected) {
149+
if (!inputDetected) {
150+
// Show a UI hint: "Your mic appears silent — check your device settings."
151+
} else {
152+
// Mic is receiving audio again; clear the hint.
153+
}
154+
});
155+
```
156+
157+
## Noise Suppression & Cancellation
158+
159+
The SDK provides two tiers of microphone audio processing: a set of WebRTC-based defaults that are always on, and an optional Krisp-powered noise cancellation for higher-quality results.
160+
161+
<Info>
162+
Krisp delivers higher-quality noise cancellation, but ships extra libraries and model files that increase your installation size. If size is a constraint — for example on mobile — see [Excluding Krisp to Reduce Installation Size](#excluding-krisp-to-reduce-installation-size) for how to ship with only the WebRTC defaults.
163+
</Info>
164+
165+
### Default Audio Processing (WebRTC)
166+
167+
These three processors ship with every build and default to on. They use the WebRTC library's standard audio pipeline:
168+
169+
- [`Client::SetNoiseSuppression`] — suppresses steady background noise (e.g. fans, keyboards, room tone). Defaults
170+
to on.
171+
- [`Client::SetEchoCancellation`] — removes echo from speakers being picked up by the mic. Defaults to on.
172+
- [`Client::SetAutomaticGainControl`] — automatically normalizes microphone volume for clarity and consistency. Defaults to on.
173+
174+
```cpp
175+
// Toggle individual WebRTC processors from a voice settings UI
176+
client->SetNoiseSuppression(true);
177+
client->SetEchoCancellation(true);
178+
client->SetAutomaticGainControl(true);
179+
```
180+
181+
### Advanced Noise Cancellation (Krisp)
182+
183+
[`Client::SetNoiseCancellation`] enables Krisp, a noise cancellation technology that removes a much wider range of
184+
background sounds (e.g. typing, dogs barking, traffic) than the WebRTC suppression. It defaults to off.
185+
186+
<Tip>
187+
Krisp and WebRTC noise suppression are mutually exclusive. Enabling [`Client::SetNoiseCancellation`] automatically disables [`Client::SetNoiseSuppression`] — you don't need to turn it off yourself.
188+
</Tip>
189+
190+
```cpp
191+
// Enable Krisp noise cancellation
192+
client->SetNoiseCancellation(true);
193+
```
194+
195+
### Excluding Krisp to Reduce Installation Size
196+
197+
Krisp ships as additional libraries and model files alongside the core SDK, which adds to your installation size. If you're optimizing for size — for example on mobile — you can ship without Krisp and rely on the WebRTC noise suppression instead.
198+
199+
To exclude Krisp from your distribution, remove all `.kef` files along with any file or directory whose name contains `krisp` (for example `discord_krisp.dll`, `libdiscord_krisp.dylib`, `discord_partner_sdk_krisp.aar`, and `discord_partner_sdk_krisp.xcframework`).
200+
137201
## Advanced Audio Processing
138202
139203
### Manipulating Voice Data with Callbacks
@@ -273,6 +337,15 @@ This information is particularly useful for:
273337

274338
---
275339

340+
## Diagnosing Audio Issues
341+
342+
If users report echo, feedback, or other audio quality problems, the SDK offers dedicated tooling for capturing voice and audio diagnostics. See the following sections of the Debug & Log guide:
343+
344+
- [Voice Logging](/developers/discord-social-sdk/how-to/debug-log#voice-logging) — capture logs from the voice subsystem and underlying WebRTC layer.
345+
- [Audio Logging](/developers/discord-social-sdk/how-to/debug-log#audio-logging) — record input/output waveforms to disk for offline analysis.
346+
347+
---
348+
276349
## Next Steps
277350

278351
import {MagicWandIcon} from '/snippets/icons/MagicWandIcon.jsx'
@@ -300,11 +373,12 @@ import {VoiceNormalIcon} from '/snippets/icons/VoiceNormalIcon.jsx'
300373

301374
## Change Log
302375

303-
| Date | Changes |
304-
|----------------|----------------------------------|
305-
| June 30, 2025 | Add communications scope warning |
306-
| June 19, 2025 | released guide |
307-
| March 17, 2025 | initial release |
376+
| Date | Changes |
377+
|----------------|--------------------------------------------------------------------|
378+
| May 13, 2026 | Add noise suppression, cancellation, and no-audio-input detection |
379+
| June 30, 2025 | Add communications scope warning |
380+
| June 19, 2025 | released guide |
381+
| March 17, 2025 | initial release |
308382

309383
{/* Autogenerated Reference Links */}
310384
[`Call`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Call.html#a1cc8a7f73c15a960bc409d734b5edbd1
@@ -314,7 +388,13 @@ import {VoiceNormalIcon} from '/snippets/icons/VoiceNormalIcon.jsx'
314388
[`Call::SetVADThreshold`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Call.html#a7c3fd83c5dfe37d796e30c5e28c93b6e
315389
[`Client`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a91716140c699d8ef0bdf6bfd7ee0ae13
316390
[`Client::CreateOrJoinLobby`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a8b4e195555ecaa89ccdfc0acd28d3512
391+
[`Client::SetAutomaticGainControl`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a818ae7f46b5bd3873dcd51dd3d9fa64d
392+
[`Client::SetEchoCancellation`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a1def244b7ecd388902ba5256ce506ca3
317393
[`Client::SetInputVolume`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ad4358f5baffd9a5f2a6fa74d62459313
394+
[`Client::SetNoAudioInputCallback`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a479e60724bf6b0b39b555c1ff8489b9e
395+
[`Client::SetNoAudioInputThreshold`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ab33f5d70461ee7590b6f3cfccaeb6df4
396+
[`Client::SetNoiseCancellation`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a54aad09e8e06dc327695209b733d3f4c
397+
[`Client::SetNoiseSuppression`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ae3f6e33b956964525adfa4536bd1fe73
318398
[`Client::SetOutputVolume`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a61a9321a79479c8b1be1559e2bbdd934
319399
[`Client::SetSelfDeafAll`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a59be56ae5752e9f2f0f299bc552282b2
320400
[`Client::SetSelfMuteAll`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a9c6ef96590533d103a866cb8a99d2669

developers/discord-social-sdk/how-to/handle-rate-limits.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,6 @@ import {BugIcon} from '/snippets/icons/BugIcon.jsx'
112112

113113
{/* Autogenerated Reference Links */}
114114
[`ClientResult`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1ClientResult.html#a685015ca8d29a50d47fd1ed5d469ac2e
115-
[`ClientResult::Successful`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1ClientResult.html#aef3b1aca3cd156daf488ca13ae87313b
116115
[`ClientResult::Retryable`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1ClientResult.html#a0d220638f4a36c0b8b731f601e0ac02d
117116
[`ClientResult::RetryAfter`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1ClientResult.html#ac739adca52b90d6b4cbed5753c30fd65
117+
[`ClientResult::Successful`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1ClientResult.html#aef3b1aca3cd156daf488ca13ae87313b

developers/discord-social-sdk/how-to/voice-muting-for-blocked-players.mdx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,4 @@ import {ListViewIcon} from '/snippets/icons/ListViewIcon.jsx'
290290
[`Call::SetLocalMute`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Call.html#aaf8e7728b15da5d1be8d8b4258225171
291291
[`Call::SetParticipantChangedCallback`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Call.html#acb20d338a04abec2369217f41c22c0e5
292292
[`Client::BlockUser`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#add4a917c8382e411d5a55737c9edc8ad
293-
[`Client::CreateOrJoinLobbyWithMetadata`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a5c84fa76c73cf3c0bfd68794ca5595c1
294-
[`Client::GetCurrentUserV2`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ae52259570ba657252d91f5580636fe5d
295-
[`Client::GetLobbyHandle`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#aee1d8d43efe5caa2d97b64ab699e5854
296-
[`Client::GetRelationships`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ad481849835cd570f0e03adafcf90125d
297-
[`Client::StartCall`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#aef4f25d761fe198fbe9bc721fc24d83f
298-
[`LobbyHandle::GetLobbyMemberHandle`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1LobbyHandle.html#a9e64cab5c6cfbf7477c6d868a3b47c0d
299-
[`LobbyHandle::LobbyMemberIds`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1LobbyHandle.html#acf329ee87e0f2f9f14b61adbd931b9c7
300-
[`LobbyMemberHandle::Metadata`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1LobbyMemberHandle.html#ade3709e5e5f44f53428b386924416f6b
301-
[`RelationshipHandle::DiscordRelationshipType`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1RelationshipHandle.html#a5fecfb79a4a2b6f3dc5f73b09d0c3881
302-
[`RelationshipHandle::Id`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1RelationshipHandle.html#a3a14b6cfa9a9fffc61e500d8329be587
303-
[`RelationshipType`]: https://discord.com/developers/docs/social-sdk/namespacediscordpp.html#a28fc5199b9211c24124c06f30c1d0cbb
293+
[`Client::CreateOrJoinLobbyWithMetadata`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a5c84fa76c73cf3c0bfd68794ca5595c1

tools/doxygen/social-sdk-mappings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"discordpp::Client::SetInputVolume": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ad4358f5baffd9a5f2a6fa74d62459313",
221221
"discordpp::Client::SetNoAudioInputCallback": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a479e60724bf6b0b39b555c1ff8489b9e",
222222
"discordpp::Client::SetNoAudioInputThreshold": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ab33f5d70461ee7590b6f3cfccaeb6df4",
223+
"discordpp::Client::SetNoiseCancellation": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a54aad09e8e06dc327695209b733d3f4c",
223224
"discordpp::Client::SetNoiseSuppression": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ae3f6e33b956964525adfa4536bd1fe73",
224225
"discordpp::Client::SetOpusHardwareCoding": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a50f3315b3c13ad6e543b60981976fe33",
225226
"discordpp::Client::SetOutputDevice": "https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#aa06fdf131c2105cd06fb79592624678e",

0 commit comments

Comments
 (0)