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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
arcanephoenix
Posts: 2
Joined: Fri Oct 08, 2021 7:37 am

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

Post 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?
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.)
Post Reply