Page 1 of 1

How to use AudioWWW functionality? Can the player choose audio at runtime for dialogue?

Posted: Fri Oct 08, 2021 7:59 am
by arcanephoenix
Hello! Thank you for making a great product!

I am making a project where the dialogue is generated at runtime and stored in audio files and read from them at runtime also. In order to play the dialogue in sync with the dialogue text, I would typically use the AudioWWW command. However, I have seen that this functionality had been deprecated in the new version of the Dialogue System. Is there any kind of alternative that you would suggest for this kind of situation?

Re: How to use AudioWWW functionality? Can the player choose audio at runtime for dialogue?

Posted: Fri Oct 08, 2021 8:10 am
by Tony Li
Hi,

You can write a custom sequencer command (tutorial) to read and play audio files from a custom location.

Side note: AudioWWW() used the old 'WWW' Unity API, which is not available in Unity 2018+. Now, the preferred method to pull audio data from a server is to use AudioWait() with addressables. However, these addressables are created at design time, not at runtime. So you will need to write a custom sequencer command, similar to how the Dialogue System's RT-Voice integration works. (RT-Voice is a runtime text-to-speech plugin.)