# Runtime audio file implementation?

**URL:** <https://qa.fmod.com/t/runtime-audio-file-implementation/12950>\
**Category:** Unity\
**Created:** [January 27, 2017, 8:10pm UTC](https://qa.fmod.com/t/runtime-audio-file-implementation/12950 "2017-01-27T20:10:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alliyfrauenpreis](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@alliyfrauenpreis](https://qa.fmod.com/u/alliyfrauenpreis)\
**Post date:** [January 27, 2017, 8:10pm UTC](https://qa.fmod.com/t/runtime-audio-file-implementation/12950/1 "2017-01-27T20:10:52Z")

</div>

I’m working on a project where we are using FMOD to handle sound events in Unity. Some of the sounds for this are generated when the game is running using a text-to-speech library to create .wav files on demand.

Is there a good way to handle these files in FMOD?

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [January 29, 2017, 9:46pm UTC](https://qa.fmod.com/t/runtime-audio-file-implementation/12950/2 "2017-01-29T21:46:02Z")

</div>

You can use wav files but you will have to create and control them through the LowLevel API: [http://www.fmod.org/documentation/#content/generated/overview/3dsound.html](http://www.fmod.org/documentation/#content/generated/overview/3dsound.html)

---

<div class="post-metadata">

**Author:** ![zvejvoda](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/zvejvoda/32/5426_2.png) [@zvejvoda](https://qa.fmod.com/u/zvejvoda)\
**Post date:** [September 16, 2022, 11:24am UTC](https://qa.fmod.com/t/runtime-audio-file-implementation/12950/3 "2022-09-16T11:24:04Z")

</div>

Hey, I have the same question, however the link seems not to be valid anymore. I can’t find any info regarding this problem.

I’m also dealing with a soundfile that is exported by a TTS. That I’d like to run through FMOD and playback in Unity.

---

<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:** [September 19, 2022, 4:03am UTC](https://qa.fmod.com/t/runtime-audio-file-implementation/12950/4 "2022-09-19T04:03:17Z")

</div>

I think the successor to that doc would be the [3D Sounds Whitepaper](https://fmod.com/docs/2.02/api/white-papers-3d-sounds.html).  
For posterity, here is how you playback a raw wav file using the FMOD core API in Unity:

```cpp
var system = FMODUnity.RuntimeManager.CoreSystem;
system.createSound("path/to/tts.wav", FMOD.MODE.LOOP_OFF, out FMOD.Sound sound);
system.playSound(sound, new FMOD.ChannelGroup(), false, out FMOD.Channel channel);

```
