Mischa
Mischa4w ago

Audio Bandwidth Optimization

How would I reduce audio bandwidth? What are the parameters I can adjust. Mic sample rate? Opus compression settings?
3 Replies
kapa.ai
kapa.ai4w ago
Hi @Mischa. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To reduce audio bandwidth in Normcore, you can adjust several parameters: 1. Microphone Sample Rate and Channels
When creating an audio input stream, you can specify the sample rate and number of channels. Lowering the sample rate (e.g., from 48kHz to 16kHz) and reducing the number of channels (e.g., from stereo to mono) will directly reduce the amount of audio data sent over the network. This can be done using the CreateAudioInputStream(bool voice, int sampleRate, int channels) method on the client interface. For example:
var audioInputStream = client.CreateAudioInputStream(true, 16000, 1); // 16kHz, mono

var audioInputStream = client.CreateAudioInputStream(true, 16000, 1); // 16kHz, mono

Reference: Client API 2. Opus Compression
Normcore uses the Opus codec for audio compression, which is highly efficient and automatically adjusts encoding bitrate based on each client's connection quality. While the knowledge sources confirm that Opus is used and that bitrate is adjusted automatically, they do not provide explicit settings for manual adjustment of Opus parameters within the Normcore API. The system is designed to optimize quality and bandwidth dynamically for you, so there are no exposed Opus-specific settings to tweak directly. High Quality, Low Latency Audio 3. General Bandwidth Optimization
Since audio is just one part of your application's bandwidth, you can use the network profiler to monitor audio bandwidth specifically and see the impact of your changes in real time. This helps you find the right balance between quality and bandwidth for your use case. Network Profiler Guide Summary:
- Lower the microphone sample rate and use mono audio if possible. - Normcore automatically manages Opus compression and bitrate for you. - Use the network profiler to measure the impact of your changes. If you need more granular control over Opus settings, the current documentation does not indicate that this is exposed in the public API. If this is critical for your application, you may want to reach out to Normcore support for advanced configuration options. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4w ago
<@847936237003604048> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Mechabit
Mechabit4w ago
you can use push to talk or split off the voice chat into a different room

Did you find this page helpful?