Skip to content

Commit 46265b6

Browse files
Merge pull request #270510 from enricohuang/patch-20
Add troubleshooting guide for Azure Communication Services Web Calling SDK - audio issues
2 parents 172052d + f06f7b7 commit 46265b6

File tree

10 files changed

+404
-0
lines changed

10 files changed

+404
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Audio issues - The user experiences delays during the call
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot when the user experiences delays during the call.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/10/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# The user experiences delays during the call
16+
High round trip time and high jitter buffer delay are the most common causes of audio delay.
17+
18+
There are several reasons that can cause high round trip time.
19+
Besides the long distance or many hops between two endpoints, one common reason is network congestion, which occurs when the network is overloaded with traffic.
20+
If there's congestion, network packets wait in a queue for a longer time.
21+
Another possible reason is a high number of packets resend at the `TCP` layer if the client uses `TCP` or `TLS` relay.
22+
A high resend number can occur when packets are lost or delayed in transit.
23+
In addition, the physical medium used to transmit data can also affect the round trip time.
24+
For example, Wi-Fi usually has higher network latency than Ethernet, which can lead to higher round trip times.
25+
26+
The jitter buffer is a mechanism used by the browser to compensate for packet jitter and reordering.
27+
Depending on network conditions, the length of the jitter buffer delay can vary.
28+
The jitter buffer delay refers to the amount of time that audio samples stay in the jitter buffer.
29+
A high jitter buffer delay can cause audio delays that are noticeable to the user.
30+
31+
## How to detect using the SDK
32+
You can use the [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md) to detect the network condition changes.
33+
34+
For the network quality of the audio sending end, you can check events with the values of `networkSendQuality`.
35+
36+
For the network quality of the receiving end, you can check events with the values of `networkReceiveQuality`.
37+
38+
In addition, you can use the [Media Stats API](../../../../concepts/voice-video-calling/media-quality-sdk.md) as a method to monitor and track real time the network performance from the Web client.
39+
40+
For the quality of the audio sending end, you can check the metrics `rttInMs`.
41+
42+
For the quality of the receiving end, you can check the metrics `jitterInMs`, `jitterBufferDelayInMs`.
43+
44+
## How to mitigate or resolve
45+
From the perspective of the ACS Calling SDK, network issues are considered external problems.
46+
To solve network issues, it's often necessary to understand the network topology and the nodes causing the problem.
47+
These parts involve network infrastructure, which is outside the scope of the ACS Calling SDK.
48+
49+
However, the browser can adaptively adjust the audio sending quality according to the network condition.
50+
It's important for the application to handle events from the [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md) or to monitor the metrics provided by the MediaStats feature.
51+
In this way, users can be aware of any network quality issues and aren't surprised if they experience low-quality audio during a call.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Audio issues - The user experiences echo during the call
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot when the user experiences echo during the call.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/09/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# The user experiences echo during the call
16+
Acoustic echo happens when the microphone picks up sound from speakers, creating a loop of sound that results in an echo.
17+
Modern browsers have built-in acoustic echo cancellation capabilities in their audio processing modules.
18+
These capabilities are designed to remove near-end echoes, which can improve the overall audio quality of web based Azure Communication Service calls.
19+
However, the browser isn't able to remove all echoes.
20+
For instance, if the delay between the echo and reference signals is beyond the range of the filter, the echoes may persist.
21+
This problem can occur when a user joins an ACS call using a remote desktop client and plays the audio through their speakers.
22+
Other scenarios, such as double talk, or two devices in the same room participating in the same call can also affect the result of echo cancellation.
23+
24+
## How to detect
25+
Currently, if the browser fails to remove echoes, there is no simple way to detect this issue from the information reported by the browser.
26+
When the user reports this issue, it's described as the user hearing their own voice or other sounds repeated back to them, creating a distracting and unpleasant audio experience.
27+
28+
## How to mitigate or resolve
29+
There are many ways to help remove the potential of an echo being picked up. The fastest solution is to have people that are producing echo to use headphones.
30+
The echo exists because the microphone picks up the sound from the speaker.
31+
Since the sound played from headphone doesn't leak, the microphone doesn't pick up the far-end signal.
32+
33+
Adjusting the speaker's volume level and the microphone's sensitivity level is another way that may help.
34+
If the volume level is low enough, it can alleviate the echo issue.
35+
36+
Other solutions are to point an external speaker away from the microphone so that the external sound isn't picked up.
37+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Audio issues - The volume of the incoming audio is low
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot when the volume of the incoming audio is low.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/09/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# The volume of the incoming audio is low
16+
If users report low incoming audio volume, there could be several possible causes.
17+
One possibility is that the volume sent by the sender is low.
18+
Another possibility is that the operating system volume is set too low.
19+
Finally, it's possible that the speaker output volume is set too low.
20+
21+
If you use [raw audio](../../../../quickstarts/voice-video-calling/get-started-raw-media-access.md?pivots=platform-web) API, you may also need to check the output volume of the audio element.
22+
23+
## How to detect using the SDK
24+
The [Media Stats API](../../../../concepts/voice-video-calling/media-quality-sdk.md) provides a way to monitor the incoming audio volume at receiving end.
25+
26+
To check the audio output level, you can look at `audioOutputLevel` value, which ranges from 0 to 65536.
27+
This value is derived from `audioLevel` in WebRTC Stats. [https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-audiolevel](https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-audiolevel)
28+
A low `audioOutputLevel` value indicates that the volume sent by the sender is also low.
29+
30+
## How to mitigate or resolve
31+
If the `audioOutputLevel` value is low, this is likely that the volume sent by the sender is also low.
32+
To troubleshoot this issue, users should investigate why the audio input volume is low on the sender's side.
33+
This problem could be due to various factors, such as microphone settings, or hardware issues.
34+
35+
If the `audioOutputLevel` value appears normal, the issue may be related to system volume settings or speaker issues on the receiver's side.
36+
Users can check their device's volume settings and speaker output to ensure that they're set to an appropriate level.
37+
38+
### Using Web Audio GainNode to increase the volume
39+
It may be possible to address this issue at the application layer using Web Audio GainNode.
40+
By using this feature with the raw audio stream, it's possible to increase the output volume of the stream.
41+
42+
You can also look to display a [volume level indicator](../../../../quickstarts/voice-video-calling/get-started-volume-indicator.md?pivots=platform-web) in your client user interface to let your users know what the current volume level is.
43+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Audio issues - The speaking participant's microphone has a problem
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot one-way audio issue when the speaking participant's microphone has a problem.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/09/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# The speaking participant's microphone has a problem
16+
When the speaking's participant's microphone has a problem, it might cause the outgoing audio to be silent, resulting in one-way audio issue in the call.
17+
18+
## How to detect using the SDK
19+
Your application can use [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md) and register a listener callback to detect the device issue.
20+
21+
There are several events related to the microphone issues, including:
22+
* `noMicrophoneDevicesEnumerated`: There's no microphone device available in the system.
23+
* `microphoneNotFunctioning`: The browser ends the audio input track.
24+
* `microphoneMuteUnexpectedly`: The browser mutes the audio input track.
25+
26+
In addition, the [Media Stats API](../../../../concepts/voice-video-calling/media-quality-sdk.md) also provides a way to monitor the audio input or output level.
27+
28+
To check the audio level at the sending end, look at `audioInputLevel` value, which ranges from 0 to 65536 and indicates the volume level of the audio captured by the audio input device.
29+
30+
To check the audio level at the receiving end, look at `audioOutputLevel` value, which also ranges from 0 to 65536. This value indicates the volume level of the decoded audio samples.
31+
If the `audioOutputLevel` value is low, it indicates that the volume sent by the sender is also low.
32+
33+
## How to mitigate or resolve
34+
Microphone issues are considered external problems from the perspective of the ACS Calling SDK.
35+
For example, the `noMicrophoneDevicesEnumerated` event indicates that no microphone device is available in the system.
36+
This problem usually happens when the user removes the microphone device and there's no other microphone device in the system.
37+
The `microphoneNotFunctioning` event fires when the browser ends the current audio input track,
38+
which can happen when the operating system or driver layer terminates the audio input session.
39+
The `microphoneMuteUnexpectedly` event can occur when the audio input track's source is temporarily unable to provide media data.
40+
For example, a hardware mute button of some headset models can trigger this event.
41+
42+
The application should listen to the [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md) events.
43+
The application should display a warning message when receiving events.
44+
By doing so, the user is aware of the issue and can troubleshoot by switching to a different microphone device or by unplugging and plugging in their current microphone device.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Audio issues - The speaking participant doesn't grant the microphone permission
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot one-way audio issue when the speaking doesn't grant the microphone permission.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/09/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# The speaking participant doesn't grant the microphone permission
16+
When the speaking participant doesn't grant microphone permission, it can result in a one-way audio issue in the call.
17+
This issue occurs if the user denies permission at the browser level or doesn't grant access at the operating system level.
18+
19+
## How to detect using the SDK
20+
When an application requests microphone permission but the permission is denied,
21+
the `DeviceManager.askDevicePermission` API returns `{ audio: false }`.
22+
23+
To detect this permission issue, the application can register a listener callback through the [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md).
24+
The listener should check for events with the value of `microphonePermissionDenied`.
25+
26+
It's important to note that if the user revokes access permission during the call, this `microphonePermissionDenied` event also fires.
27+
28+
## How to mitigate or resolve
29+
Your application should always call the `askDevicePermission` API after the `CallClient` is initialized.
30+
This way gives the user a chance to grant the device permission if they didn't do so before or if the permission state is `prompt`.
31+
32+
It's also important to listen for the `microphonePermissionDenied` event. Display a warning message if the user revokes the permission during the call. By doing so, the user is aware of the issue and can adjust their browser or system settings accordingly.
33+
34+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Audio issues - There's a network issue in the call
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot one-way audio issue when there's a network issue in the call.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/09/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# There's a network issue in the call
16+
When there's a network reconnection in the call on the audio sending end or receiving end, the participant can experience one-way audio issue temporarily.
17+
It can cause an audio issue because shortly before and during the network is reconnecting, audio packets don't flow.
18+
19+
## How to detect using the SDK
20+
Through [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md), your application can register a listener callback to detect the network condition changes.
21+
22+
For the network reconnection, you can check events with the values of `networkReconnect`.
23+
24+
## How to mitigate or resolve
25+
From the perspective of the ACS Calling SDK, network issues are considered external problems.
26+
To solve network issues, it's often necessary to understand the network topology and the nodes causing the problem.
27+
These parts involve network infrastructure, which is outside the scope of the ACS Calling SDK.
28+
29+
The application should listen to the `networkReconnect` event and display a warning message when receiving them,
30+
so that the user is aware of the issue and understands that the audio loss is due to network reconnection.
31+
32+
However, if the network reconnection occurs at the sender's side,
33+
users on the receiving end are unable to know about it because currently the SDK doesn't support notifying receivers that the sender has network issues.
34+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Audio issues - Overview
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Overview of audio issues
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 04/09/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# Overview of audio issues
16+
Audio quality is important in conference calls. If any participants on a call can’t hear each other well enough, then the participants likely leave the call.
17+
To establish a voice call with good quality, several factors must be considered. These factors include:
18+
19+
- The users granted the microphone permission
20+
- The users microphone is working properly
21+
- The network conditions are good enough on sending and receiving ends
22+
- The audio output level is functioning properly
23+
24+
All of these factors are important from an end-to-end perspective.
25+
26+
Device and network issues are considered external problems from the perspective of the ACS Calling SDK.
27+
Your application should integrate the [User Facing Diagnostics API](../../../../concepts/voice-video-calling/user-facing-diagnostics.md)
28+
to monitor device and network issues and display warning messages accordingly.
29+
In this way, users are aware of the issue and can troubleshoot on their own.
30+
31+
## Common issues in audio calls
32+
Here we list several common audio issues, along with potential causes for each issue:
33+
34+
### The user can't hear sound during the call
35+
* There's a problem on the microphone of the speaking participant.
36+
* There's a problem on the audio output device of the user.
37+
* There's a network issue in the call
38+
39+
### The user experiences poor audio quality
40+
* The audio sender has poor network connectivity.
41+
* The receiver has poor network connectivity.
42+
43+
### The user experiences delays during the call
44+
* The round trip time is large between the sender and the receiver.
45+
* Other network issues.
46+
47+
### The user experiences echo during the call
48+
* The browser's acoustic echo canceler isn't able to remove the echo on the audio sender's side.
49+
50+
### The volume of the incoming audio is low
51+
* There's a low volume of outgoing audio on the sender's side.
52+
* There's an issue with the speaker or audio volume settings on the receiver's side

0 commit comments

Comments
 (0)