Best way to include 16 minutes of voice over audio?

Hi

I’m working on a kind of guided tour experience in WebGL. We’re already quite hi om memory useage while we are using asset bundles to load/unload scenes dynamically.

Now we need to include approx 16 minutes of voice over (about 50 separate tracks). What would be the best way to include this? I’m asking because audio in WebGL seems tricky. Can we stream each file on demand?

Check out c# - How do I use Unity Web Requests for streaming audio... I want to use a cloud based TTS - Stack Overflow and Unity - Scripting API: Networking.UnityWebRequestMultimedia.GetAudioClip for downloading audio on demand. I think that should allow starting audio playback up front before whole clip has finished, to stream the playback.

1 Like

So this works with WAV files, but with OGG I get: “Streaming of ‘ogg’ on this platform is not supported” for both Chrome and Safari (on MacOS),
while with MP3 I get:
“Cannot create FMOD::Sound instance for resource” in the editor. I haven’t tried to build that.
I’m using 2019.2.0
Any tips? :slight_smile:

EDIT: ok, so despite that mp3 doesn’t work in the editor, it does work in the WebGL build… Weird! But yeah, then we’ll stick with mp3.

I hope Unity can clarify the docs about what is supported and add support for OGG in the builds, and MP3 support in the editor :slight_smile: