Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. Contact Sales if your project requires a support plan.

How do I allow my programmer to pipe in external audio?

0 votes
Hi everyone, we are using a text-to-speech program in Unity and would like to pipe it into Wwise on a bus or something.  The voice would be coming from an in-game simulated computer monitor ( a sort of AI ), and would play as 3D audio, and perhaps some effects on it.  But I am not really sure on my end how to do it.  My programmer says I need to provide a bus ID number but I cannot find any numbers with any bus.  I created a bus in Wwise, called TTS, but can't figure out what to do next.  Any thoughts?
asked Mar 15 in General Discussion by Joker Red (170 points)

1 Answer

0 votes

I haven't done this before, but I think you can accomplish it using one of the two following features:

 

Wwise Audio Input is a source you can use on a Sound SFX object that takes sound generated by the game at runtime. I think it's commonly used for VOIP chat and network-streamed audio. 

Wwise External Source is instantiated in a Sound SFX object in the same way as Wwise Audio Input. This sounds like it works like Wwise Audio Input, except it points to an audio file that the programmer chooses.


I think I would start with Wwise External Source. I bet your programmer can write the TTS to a .wav file as it's rendered in real-time, convert it to a .wem, and send it to your External Source object. 

 

answered Mar 15 by Ian S. (1,270 points)
Thank you.  Our programmer wants to go with the first option, Audio Input source. (We can't be writing anything to hard drive, apparently) But he says he needs a bus number.  I don't know where I can find a bus number.  Are you familiar with this?

Edit: OK, he had to look in the actual data of the file to find it.  We found it, but I am wondering why bus numbers are not easily viewable in the Wwise authoring app... unless I am missing something, which is totally possible, and even probable!
The only way I know how is to open up the work unit and look. Work units are just XML, so you can read it in a text editor (like Sublime Text or Notepad++).

So if you're looking for a bus, navigate to your Wwise directory in Windows Explorer or Finder, and open Master-Mixer Hierarchy/Default Work Unit.wwu in a text editor. You should be able to find the name of all of your busses followed by their IDs.
OK, thank you so much for your help.  My programmer got that information by looking at the source files.. but now my programmer now says that there seemed to be some missing pieces in the unity integration for Wwise Audio Input.  For some reason, that rubs me the wrong way... I think he might be wrong there.  

So he switched to looking into Wwise External Source.  Now he specifically needs to know the structure of the .wem file format.  But he doesn't know where to find this.  We have the problem with the text to speech thingy that we don't have wavs before the game launches.  My programmer thinks that Wwise expects us to have wavs before the game launches, but we are generating the data real time.

He says that knowing the structure of the wem file format is the only solution unless they have a function in wwise to build a wem file from raw sound data that can be used at runtime and that does not write to the hard drive.

This is for Wwise external source, which he has been experimenting with.

Do you think we are better off with Wwise Audio Input?

And if my programmer is right, and all we now need is to be able to convert the raw audio data to wem format (we'd need to know the format of the data) then how can we get that?
Hi, the .wem format is proprietary to Audiokinetic, and the only way to generate them is via the Authoring Tool bank generation process or via the WwiseCLI.exe, both of which will write the .wem to disk.  You probably want to use the Audio Input if you're dealing with raw samples at runtime.
My programmer said that the audio input plugin is a no-go with Unity.  Like, it's just not supported.

Anyways, he figured out how to get it working but with the Wwise external source way.  He seems to think the other way was impossible with Unity.
Hi! I'm looking at implementing integrated voice chat in our game and ran in the same problem..
It would be awesome to get some information on how your programmer solved this issue using External Source. Any way to get in contact?
thanks!
If you're able, I'd like to discuss what your programmer did to pipe raw data into Wwise as an external source.  I have some ideas, but am feeling a bit lost at the moment.  Any help would be appreciated!
...