# How to injcect sound effect to local audio?

**URL:** <https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291>\
**Category:** Android\
**Created:** [May 28, 2021, 3:38pm UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291 "2021-05-28T15:38:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiro](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Jiro](https://devforum.zoom.us/u/Jiro)\
**Post date:** [May 28, 2021, 3:38pm UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/1 "2021-05-28T15:38:18Z")

</div>

**Description**  
Hi,  
I’m trying to implement Zoom Videoo SDK to my app.(Android)

I want to make a sound when received chat message from another peer.

If I played a sound locally, this sound will go to mic and grows to echo hell.  
So I need to inject to my sound to Zoom Audio Streaming pipeline to work Echo Canceller.

I’m plannning use `onMixedAudioRawDataReceived` API and compose sound PCM  
to the buffer.

Please tell me if this method works or not.

Or another solution?

Regards,  
Jiro

**Which Mobile Video SDK version?**  
zoom-instant-sdk-android-1.0.2.zip  
zoom-instant-sdk-iOS-1.0.2.zip

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [May 28, 2021, 5:49pm UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/2 "2021-05-28T17:49:43Z")

</div>

Hi @Jiro,

In order to perform an action upon receiving a new message, you should listen for the [`onChatNewMessageNotify`](https://marketplacefront.zoom.us/sdk/custom/android/us/zoom/sdk/ZoomInstantSDKDelegate.html#onChatNewMessageNotify-us.zoom.sdk.ZoomInstantSDKChatHelper-us.zoom.sdk.ZoomInstantSDKChatMessage-) callback.

The SDK does not yet support sending raw audio data, but we have an upcoming release in which the ability to do so will be included. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![Jiro](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Jiro](https://devforum.zoom.us/u/Jiro)\
**Post date:** [May 29, 2021, 1:48am UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/3 "2021-05-29T01:48:00Z")

</div>

Chat Notification already worked.

I want to play local audio and not send it to remote users.  
So I think to compose raw audio to the buffer from onMixedAudioRawDataReceived.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [June 1, 2021, 6:43pm UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/4 "2021-06-01T18:43:40Z")

</div>

Hi @Jiro,

Thanks for clarifying. You can freely modify the raw audio output received from the callback you mentioned, but the SDK would not be aware of any modifications you have performed. If the sound playing is an issue, the only possibility would be to filter it out through the raw audio you will be able to send in the upcoming SDK release.

Thanks!

---

<div class="post-metadata">

**Author:** ![Jiro](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Jiro](https://devforum.zoom.us/u/Jiro)\
**Post date:** [June 1, 2021, 11:47pm UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/5 "2021-06-01T23:47:56Z")

</div>

Hi,

OK, Thanks. I understood.

I’ll wait future update of Zoom SDK.

I hope you’ll implement API like Agora’s Video call startAudioMixing() API.

Thanks,  
Jiro

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [June 2, 2021, 8:41pm UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/6 "2021-06-02T20:41:43Z")

</div>

We openly welcome any feedback you have on our newly added features in the upcoming release!

---

<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:** [July 3, 2021, 6:42am UTC](https://devforum.zoom.us/t/how-to-injcect-sound-effect-to-local-audio/51291/7 "2021-07-03T06:42:09Z")

</div>

Closed on July 3, 2021, 6:42am UTC

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