You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: developers/discord-social-sdk/development-guides/managing-voice-chat.mdx
+85-5Lines changed: 85 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,70 @@ client->SetInputVolume(75.0f); // Set microphone to 75%
134
134
client->SetOutputVolume(120.0f); // Increase speaker volume to 120%
135
135
```
136
136
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).
// 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:
- [`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
+
137
201
## Advanced Audio Processing
138
202
139
203
### Manipulating Voice Data with Callbacks
@@ -273,6 +337,15 @@ This information is particularly useful for:
273
337
274
338
---
275
339
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.
0 commit comments