# How to set audio quality to maximum

**URL:** <https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860>\
**Category:** mediasoup libraries\
**Created:** [April 23, 2020, 4:58pm UTC](https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860 "2020-04-23T16:58:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luzifer](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/luzifer/32/335_2.png) [@Luzifer](https://mediasoup.discourse.group/u/Luzifer)\
**Post date:** [April 23, 2020, 4:58pm UTC](https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860/1 "2020-04-23T16:58:24Z")

</div>

Hi,

i tried to change the audio settings to

```auto
navigator.mediaDevices.getUserMedia({
        video: ...
        audio: {
          sampleRate: 48000,
          sampleSize: 16,
          autoGainControl: false,
          channelCount: 2,
          echoCancellation: false,
          latency: 0,
          noiseSuppression: false,
        },

```

I could not hear a change in audio auality, the consumer stats bitrate was always ~ 70k,

```auto
[
    {
      "bitrate": 71888,
      "byteCount": 3183750,
      "firCount": 0,
      "fractionLost": 0,
      "kind": "audio",
      "mimeType": "audio/opus",
      "nackCount": 0,
      "nackPacketCount": 0,
      "packetCount": 17727,
      "packetsDiscarded": 0,
      "packetsLost": 0,
      "packetsRepaired": 0,
      "packetsRetransmitted": 0,
      "pliCount": 0,
      "roundTripTime": 0.6561279296875,
      "score": 10,
      "ssrc": 928067862,
      "timestamp": 7710998,
      "type": "outbound-rtp"
    },
    {
      "bitrate": 73488,
      "byteCount": 3568831,
      "firCount": 0,
      "fractionLost": 0,
      "jitter": 0,
      "kind": "audio",
      "mimeType": "audio/opus",
      "nackCount": 0,
      "nackPacketCount": 0,
      "packetCount": 19425,
      "packetsDiscarded": 0,
      "packetsLost": 0,
      "packetsRepaired": 0,
      "packetsRetransmitted": 0,
      "pliCount": 0,
      "roundTripTime": 0.030517578125,
      "score": 10,
      "ssrc": 1366832477,
      "timestamp": 7710998,
      "type": "inbound-rtp"
    }
  ]
]

```

what else do I need to change to get max quality?

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [April 23, 2020, 5:22pm UTC](https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860/2 "2020-04-23T17:22:08Z")

</div>

I’m afraid this topic is not related to mediasoup at all. Maybe someone will wish to reply you, but do not expect help regarding this topic from mediasoup authors.

As we said in [https://mediasoup.discourse.group/t/community-means-helping-others-not-just-yourself/:](https://mediasoup.discourse.group/t/community-means-helping-others-not-just-yourself/:)

> I won’t help in topics such as:
> 
> - …
> - Generic questions about WebRTC (getUserMedia, browser permissions, browser limitations, etc).

---

<div class="post-metadata">

**Author:** ![Luzifer](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/luzifer/32/335_2.png) [@Luzifer](https://mediasoup.discourse.group/u/Luzifer)\
**Post date:** [April 24, 2020, 8:50am UTC](https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860/3 "2020-04-24T08:50:43Z")

</div>

Hello

i do not agree that this is not related to mediasoup, As far as I know, usually (webRTC without mediasoup) the audio quality is part of the SDP, with mediasoup v3 however you never deal with the SDP directly (mediasoup-server and client). So the question remains how to change audio quality? Maybe the question should be: At what point is the SDP exchanged from mediasoup-client -\> server ?

alos if i understand mediasoup correct the server initiate the negotiation. so the question is how modify the SDP and where ?

Regards

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [April 24, 2020, 9:08am UTC](https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860/4 "2020-04-24T09:08:46Z")

</div>

> [@Luzifer](#):
>
> i do not agree that this is not related to mediasoup,

You did not even mention any mediasoup or mediasoup-client API in your topic description. Of course this is not related to mediasoup. To be clear: `getUserMedia()` is not related to mediasoup.

> [@Luzifer](#):
>
> Maybe the question should be: At what point is the SDP exchanged from mediasoup-client → server ?

Then the response should be: read the docs. Where in the docs you read that mediasoup-client exchange a SDP with mediasoup server? I cannot explain everything from scratch so hope this helps:

- [mediasoup :: Communication Between Client and Server](https://mediasoup.org/documentation/v3/communication-between-client-and-server/)

> [@Luzifer](#):
>
> if i understand mediasoup correct the server initiate the negotiation. so the question is how modify the SDP and where ?

Where do you read that the server initiate the negotiation?

BTW mediasoup-client has options to affect OPUS settings in the SDP:

- [mediasoup :: API](https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerCodecOptions)

---

<div class="post-metadata">

**Author:** ![Luzifer](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/luzifer/32/335_2.png) [@Luzifer](https://mediasoup.discourse.group/u/Luzifer)\
**Post date:** [April 24, 2020, 9:18am UTC](https://mediasoup.discourse.group/t/how-to-set-audio-quality-to-maximum/860/5 "2020-04-24T09:18:39Z")

</div>

the quesstion was not precise enough / misleadingly written

thank you very much
