# Video SDK - Audio (The sound is repeated)

**URL:** <https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [July 1, 2024, 2:01am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810 "2024-07-01T02:01:38Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuanna.fed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tuanna.fed/32/58291_2.png) [@tuanna.fed](https://devforum.zoom.us/u/tuanna.fed)\
**Post date:** [July 1, 2024, 2:01am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/1 "2024-07-01T02:01:38Z")

</div>

Hi guys, please help me for this case  
I’m using the version **“1.11.5”** , but I got an issue **the sound is repeated**  
It happens in some cases and the sound is small.  
When I turn off the host’s mic it works normally  
Thanks all!

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 1, 2024, 6:32am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/2 "2024-07-01T06:32:36Z")

</div>

Hey @tuanna.fed

Thanks for your feedback.

Could you share some problematic session IDs with us for troubleshooting purposes?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![tuanna.fed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tuanna.fed/32/58291_2.png) [@tuanna.fed](https://devforum.zoom.us/u/tuanna.fed)\
**Post date:** [July 16, 2024, 3:12am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/3 "2024-07-16T03:12:33Z")

</div>

Thank for your response.  
Here is my sessionId **SCEl4G6VQmySq01gq8bPYg==**  
And this is my recording. [面談ゴックマイ20240716094439.mp4 - Google Drive](https://shorturl.at/soirF)  
Please help me check the sound is repetitive and howling when using external speakers or use a headset.  
Thank you.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 16, 2024, 6:13am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/4 "2024-07-16T06:13:36Z")

</div>

Hey @tuanna.fed

Thank you for sharing the recording with us.

This is an Audio Echo issue, and we rely on the browser’s capability to provide AEC (Acoustic Echo Cancellation) functionality.

I’ll briefly describe the scenario where this issue occurs:

- When two users are far apart, even if using external speakers to play sound, the AEC capability ensures that the sound is not repeatedly sent out.

- However, when two users are close to each other, the sound source may be from the other user rather than their own speaker. In this case, the sound is repeatedly captured and sent out, making the browser’s AEC ineffective, resulting in noticeable audio echo.

The solution for this is:

- Increase the physical distance between users
- Use headphones instead of speakers to prevent sound from directly entering the other user’s microphone.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 16, 2024, 8:59am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/5 "2024-07-16T08:59:41Z")

</div>

Hi Vic, thank for your response.  
Could you please help me clarify this my issue? In my recording file, I got this issue.

 ![test](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/7/f7570345c39807dfd746aaba3252ff2eab41d554.jpeg)

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 17, 2024, 5:37am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/6 "2024-07-17T05:37:52Z")

</div>

Hey @namttn

Thanks for your feedback.

Could you describe your question in detail?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 17, 2024, 6:14am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/7 "2024-07-17T06:14:36Z")

</div>

Hi @vic.yang, let me explain for this case  
“We had a meeting between person A and person B who are far apart, using laptops, with microphones and external speakers turned on.  
We are encountering an issue in this scenario:  
**Person A** speaks to **person B** , and because **person B** has the external speakers on, the sound is picked up by **person B’s** microphone and transmitted back to **person A** , so **person A** hears the sound twice.  
Can you tell me what the cause of this is, and if it is due to **Zoom**?”

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 17, 2024, 6:20am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/8 "2024-07-17T06:20:10Z")

</div>

Hey @namttn

I appreciate your detailed explanation.

Could you share the problematic session IDs with us for troubleshooting purposes?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 17, 2024, 6:46am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/9 "2024-07-17T06:46:26Z")

</div>

@vic.yang  
Yep,  
**SCEl4G6VQmySq01gq8bPYg==**  
I already send it above

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 17, 2024, 7:18am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/10 "2024-07-17T07:18:04Z")

</div>

Hey @namttn

I apologize for my mistake. Because it wasn’t the same person asking before, I mistakenly thought you were referring to a new issue.

We will continue to analyze this issue further.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 17, 2024, 7:29am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/11 "2024-07-17T07:29:35Z")

</div>

Hey @namttn

I’m sorry for the confusion. Could you please confirm again if the echo issue occurs specifically on certain devices or if it happens for all users whenever an external speaker is used?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 17, 2024, 7:44am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/12 "2024-07-17T07:44:23Z")

</div>

@vic.yang  
Yep, currently, we are experiencing issues in the following scenarios:

- Using a laptop with external speakers and an external microphone
- Using headphones with a single line for both the microphone and speakers

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 17, 2024, 9:28am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/13 "2024-07-17T09:28:27Z")

</div>

Hey @namttn

We tested these two scenarios on our devices, but cannot reproduce the echo issue.

Regarding the Acoustic Echo Cancellation (AEC), we rely on the browser’s built-in echo cancellation feature: [echoCancellation](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/echoCancellation).

> **[MediaTrackConstraints: echoCancellation property - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/echoCancellation)**
>
> The MediaTrackConstraints dictionary's
> echoCancellation property is a
> ConstrainBoolean describing the requested or mandatory constraints placed
> upon the value of the echoCancellation constrainable property.

Could you please help test this simple validation on your device to see if there is still audio echo?

```javascript
let audio = new Audio();
const constraints = window.constraints = {
  audio: {echoCancellation: true},
  video: false
};

function handleSuccess(stream) {
  const audioTracks = stream.getAudioTracks();
  console.log('Got stream with constraints:', constraints);
  console.log('Using audio device: ' + audioTracks[0].label);
  stream.oninactive = function() {
    console.log('Stream ended');
  };
  window.stream = stream; // make variable available to browser console
  audio.srcObject = stream;
  audio.play()
}

function handleError(error) {
  const errorMessage = 'navigator.MediaDevices.getUserMedia error: ' + error.message + ' ' + error.name;
  document.getElementById('errorMsg').innerText = errorMessage;
  console.log(errorMessage);
}

navigator.mediaDevices.getUserMedia(constraints).then(handleSuccess).catch(handleError);

```

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 18, 2024, 1:42am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/14 "2024-07-18T01:42:50Z")

</div>

@vic.yang  
Oke. Thank you so much! Let me try it

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 19, 2024, 3:40am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/15 "2024-07-19T03:40:36Z")

</div>

Hi @vic.yang  
For the source code you provided, I think it only addresses the echo phenomenon.  
However, in my case, I don’t think it’s an echo.

The problem here is: When Person 1 says “Hello,” Person 2 is using external speakers, so “Hello” goes into Person 2’s microphone. This causes Person 1 to hear “Hello” again.  
Is it true that Zoom currently cannot resolve this issue?  
To address this issue, we are currently deliberately not using external speakers.  
For other platforms, I think external speakers can still be used.  
If you have any solutions for this issue, please kindly guide me.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 19, 2024, 5:47am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/16 "2024-07-19T05:47:49Z")

</div>

Hey @namttn

Could you share if the above code also causes repeated sound?

> The problem here is: When Person 1 says “Hello,” Person 2 is using external speakers, so “Hello” goes into Person 2’s microphone. This causes Person 1 to hear “Hello” again.

What you described is the echo phenomenon. The browser uses an AEC algorithm when capturing sound, which cancels out the sound it plays itself. This means that when Person 2 sends audio, the echo should already be eliminated.

If you still have issues, could you record the problematic sound using your browser and share it with us for troubleshooting?

You can do this by

1. Opening Chrome and going to `chrome://webrtc-internals/`
2. Expanding the ‘Create diagnostic audio recordings’ option,
3. Checking ‘Enable diagnostic audio recordings’.  
 ![Screenshot](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/9/e9e96bfd9f919413b94fa48c665421938412b425.jpeg)

Then, share the recorded audio files with us.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![namttn](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@namttn](https://devforum.zoom.us/u/namttn)\
**Post date:** [July 19, 2024, 7:07am UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/17 "2024-07-19T07:07:44Z")

</div>

Thank for your response.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 18, 2024, 5:07pm UTC](https://devforum.zoom.us/t/video-sdk-audio-the-sound-is-repeated/112810/18 "2024-08-18T17:07:57Z")

</div>

Closed on August 18, 2024, 5:07pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
