# Sound from Thid Party Plugins

**URL:** <https://qa.fmod.com/t/sound-from-thid-party-plugins/19323>\
**Category:** Unity\
**Created:** [September 27, 2022, 1:50pm UTC](https://qa.fmod.com/t/sound-from-thid-party-plugins/19323 "2022-09-27T13:50:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonym](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Anonym](https://qa.fmod.com/u/Anonym)\
**Post date:** [September 27, 2022, 1:50pm UTC](https://qa.fmod.com/t/sound-from-thid-party-plugins/19323/1 "2022-09-27T13:50:01Z")

</div>

Hi,  
we are trying to integrate a Text-To-Speech feature in our Application. For this, one of the third party plugins is from Oculus using Wit the ‘Understanding Viewer’.  
However, they use the Unity AudioSources in a script and I have no idea how to exchange this with FMOD. A simple Event Reference won’t probably not work?  
How can I trigger audio from a third party plugin?

Thank you!

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [October 4, 2022, 11:09pm UTC](https://qa.fmod.com/t/sound-from-thid-party-plugins/19323/2 "2022-10-04T23:09:57Z")

</div>

I am unfamiliar with Wit or the Understanding Viewer, but the lowest common denominator for an audio application is PCM audio data, and if two audio applications give you access to PCM audio data then you are able to share audio data between those applications.  
FMOD allows you to [read sound data](https://fmod.com/docs/2.02/api/glossary.html#reading-sound-data) using [`Sound::readData`](https://fmod.com/docs/2.02/api/core-api-sound.html#sound_readdata), and allows you to write sound data using [`Sound::lock`](https://fmod.com/docs/2.02/api/core-api-sound.html#sound_lock)/ [`Sound::unlock`](https://fmod.com/docs/2.02/api/core-api-sound.html#sound_unlock) or a [`FMOD_SOUND_PCMREAD_CALLBACK`](https://fmod.com/docs/2.02/api/core-api-sound.html#fmod_sound_pcmread_callback).  
You mention Wit utilizing Unity Audio Sources; you can hook into the PCM audio data of Unity Audio Sources by implementing [`OnAudioFilterRead`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnAudioFilterRead.html) on a monobehaviour, and passing the `float[] data` into an FMOD `Sound`. I recommend checking out this thread: Using FMOD with voice chat utilizing OnAudioFilterRead() for a discussion on how to implement `OnAudioFilterRead`, and using that to pass audio to FMOD.
