Bug Description
The SDK uses different default audio parameters than the raw RTMS WebSocket protocol. While the SDK defaults provide better quality (OPUS, 48kHz, Stereo, AUDIO_MULTI_STREAMS), this can cause confusion when users expect the WebSocket defaults.
| Parameter |
SDK Default |
WebSocket Default |
| Codec |
OPUS (4) |
L16 (1) |
| Sample Rate |
48kHz (3) |
16kHz (1) |
| Channel |
Stereo (2) |
Mono (1) |
| Data Option |
AUDIO_MULTI_STREAMS (2) |
AUDIO_MIXED_STREAM (1) |
| Duration |
20ms |
20ms |
| Frame Size |
960 |
320 |
Proposed Solution for v2.0
Align SDK defaults with WebSocket protocol defaults for consistency:
- Codec: L16 (1)
- Sample Rate: 16kHz (1)
- Channel: Mono (1)
- Data Option: AUDIO_MIXED_STREAM (1)
- Frame Size: 320
Users who want the current SDK defaults (higher quality, per-speaker attribution) would need to explicitly configure them.
Workaround (v1.x)
Users can configure audio params to match WebSocket defaults:
client.setAudioParams({
contentType: rtms.AudioContentType.RAW_AUDIO,
codec: rtms.AudioCodec.L16,
sampleRate: rtms.AudioSampleRate.SR_16K,
channel: rtms.AudioChannel.MONO,
dataOpt: rtms.AudioDataOption.AUDIO_MIXED_STREAM,
duration: 20,
frameSize: 320
});
Language/Runtime
Node.js and Python
SDK Version
1.0.x
Additional Context
This is documented in the SDK documentation with examples for both configurations.
Verification
Bug Description
The SDK uses different default audio parameters than the raw RTMS WebSocket protocol. While the SDK defaults provide better quality (OPUS, 48kHz, Stereo, AUDIO_MULTI_STREAMS), this can cause confusion when users expect the WebSocket defaults.
Proposed Solution for v2.0
Align SDK defaults with WebSocket protocol defaults for consistency:
Users who want the current SDK defaults (higher quality, per-speaker attribution) would need to explicitly configure them.
Workaround (v1.x)
Users can configure audio params to match WebSocket defaults:
Language/Runtime
Node.js and Python
SDK Version
1.0.x
Additional Context
This is documented in the SDK documentation with examples for both configurations.
Verification