How to improve the quality of the audio?

in my application I use screenshare to share music among participants, I share a tab, say youtube , in which the music is playing.
I want to improve the quality of the audio. So, I used micAudioMode property, I set bitrate to 510 * 1000 since it is the maximum bitrate for opus codec and I set stereo to true. and I configure getDisplayMedia to give only audio.

1. The way I configure getDisplayMedia

video: { width: 0, height: 0, frameRate: 0},

audio: true

2. The way I set micAudioMode
micAudioMode: {
bitrate: 510*1000,
stereo: true,

through chrome webRTC internals, I can see that the audio is being sent around 510 kbps, as I configured. Though I am not facing any packet losses or buffering issues, I still feel that the quality of the audio that being shared needs to be improved. mostly I felt audio losing its bass.

Is there anything that i can do to improve the quality of the audio ? or am I missing anything in the way I am configuring?

Also please let me know
1. If any tools or any proper ways to test the quality of the audio.
2. If there are any ways to compare the original audio which is playing (say video song in youtube or audio in Spotify) with the audio that being shared with screensharing .
3. And how browsers and Hardware affects the audio. participants of my application would mostly use modern laptops and chrome browser.
4. what are hardware or software requirements needed to get the better audio.


  • daily_joey
    daily_joey Moderator, Dailynista admin

    Hi @svm_agilis , thanks for writing in!

    We don't have any specific recommendations how ways to test or verify audio quality as it passes through Daily's servers, but we do have additional ways you can specify audio settings.

    In addition to a specific bitrate, you can also pass micAudioMode: 'music' which sets the bitrate to 256k and disables things like echo cancellation and AGC. That is typically enough to improve audio quality over the standard speech profile.

    Instead of micAudioMode you can also pass in MediaTrackConstraints via the userMediaAudioConstraints property, which offers more granular controls over the audio processing settings:

    Please keep in mind that the ultimate audio quality will be subject to browser and network constraints which aren't always configurable. We have found the music profile to be sufficient for sharing non-speech audio over Daily.

  • Hi
    I have actually set the channelCount=2 audio constraints to make the audio to be of type stereo.
    along with that I have also set constraints sampleRate=48000 and sampleSize=32, so I have used the calculation to get the kbps value. you can see the calculation below.

    Bit Rate = Sample Size (in bits) * Sample Rate (in samples per second)

    Bit Rate = 32 bits * 48,000 samples/second

    Bit Rate = 1,536,000 bits per second (bps)
    kbps = 1536,

    but when we set micAudioMode=true, a 256kbps of audio will be streamed.
    so when we have that audioConstraints and set micAudioMode as true, what will the bitrate of the audio? will that still be 256kbps or 1536kbps. what is the affect on quality of the audio if the final audio is of 256kbps or when it becomes 1536kbps?
    or is there any wrong in my caculations.

    and also after applying constraints in my application when we screenShare the youtube video and hear the audio on speakers and wired earphones, we can sense the audio as stereo, but when we hear the audio from bluetooth the audio sounds like mono.
    the same audio sounds like stereo when we hear it directly from the youtube tab on bluetooth/speakers/wired headphones, is there anything like I need to apply deviceId or so to fix the issue?

  • daily_joey
    daily_joey Moderator, Dailynista admin

    @svm_agilis apologies for the delay in replying!

    I'll need to check with the team to verify the bitrate settings and confirm what the correct behavior is.

    Can you confirm whether the same Bluetooth output device is in use between testing within a Daily call and without Daily? What is the model of Bluetooth device you're testing with?

  • Hi @daily_joey
    yes the same bluettooth device was used for testing with Daily call and without Daily .
    and I got answer for why bluetooth device fails to give stereo output when it's microphone is in use, from this ?
    I would be looking forward for the info on bitrate settings.

    Thank you 🙂