Music Mode (iOS Only)

Use music mode to enable high quality audio streaming. This is useful when you have a use-case of streaming music that's getting captured through the mic.

Minimum Requirements

  • SDK version 1.6.0 or higher
  • iOS Platform only. Android support will be released soon.

What is Music Mode?

Music Mode is a feature that allows you to capture audio in its highest quality by disabling voice processing and increasing the maximum bandwidth limit. By default, audio is processed to enhance human voice clarity, which includes techniques like noise cancellation and automatic gain control. However, this processing can suppress background music and lower its quality.

With Music Mode, you can remove these voice processing methods and capture all types of frequencies with your microphone, making it ideal for recording music or any other audio that isn't focused solely on voice. Additionally, the maximum bandwidth limit for audio is increased from 32 Kbps to 320 Kbps. This higher limit ensures that music is not compressed too much and is captured in its original quality.

To enable Music Mode, simply update the Audio Track Settings while building the HMSSDK. With this feature, you can achieve high-quality audio recordings with full, rich sound, whether you're recording music, podcasts, or any other type of audio.

How to turn on Music Mode?

  1. You can create an instance of the HMSAudioTrackSettings class with the audioMode property set to HMSIOSAudioMode.MUSIC.

Then, you can use this HMSAudioTrackSettings instance when building an instance of the HMSDK class using the static build method.

// Creating Audio Setting with 'audioMode' set to `HMSIOSAudioMode.MUSIC` const audioSettings = new HMSAudioTrackSettings({
audioMode: HMSIOSAudioMode.MUSIC
}); // Creating Track settings with Audio Settings for HMSSDK const trackSettings = HMSTrackSettings({ audio: audioSettings }); // Pass the Track Settings object to the `build` method // Now, the SDK will use Music Mode on iOS devices c̶o̶n̶s̶t̶ ̶h̶m̶s̶I̶n̶s̶t̶a̶n̶c̶e̶ ̶=̶ ̶a̶w̶a̶i̶t̶ ̶H̶M̶S̶S̶D̶K̶.̶b̶u̶i̶l̶d̶(̶)̶;̶ const hmsInstance = await{ trackSettings });

If you don't want to use Music Mode, don't create HMSAudioTrackSettings class with audioMode property, it's an optional property.

  1. In the newer iPhones (iPhone XS onwards) make sure that 'Wide Spectrum' mic mode is selected in the control center. If you select 'Standard' or 'Voice Isolation' mode then your iPhone might apply voice processing on top to affect the music quality.

Have a suggestion? Recommend changes ->

Was this helpful?