Skip to main content

Capturable sound wave

For Voice Activity Detection (VAD), refer to this page.

There is a capturable sound wave derived from the streaming sound wave. It supports capturing audio data from input devices like a microphone and playing it back, with the same capabilities as an imported sound wave (including rewinding, usage in SoundCues, etc). You can even capture and play audio simultaneously without any limitations.

It also automatically requests microphone permissions on iOS and Android once the capture is started.

First you should create a capturable sound wave.

Create Capturable Sound Wave node


To use this feature, you need to first get all available audio input devices that can be used for capturing by calling the corresponding function.

Get Available Audio Input Devices node


After that, you can start capturing audio data from the input device and stop it when needed.

Start and Stop capture nodes


Additionally, you can choose to mute or unmute sound capture to prevent the accumulation of audio data without interrupting the capturing process. This is useful when switching capturing frequently since starting recording through StartCapture may cause minor hitches on the engine's side. You should first start the capture itself, and only then mute/unmute it.

If your aim is to eliminate a slight freeze, you could consider starting the capture during a time when this freeze might be negligible. For example, you could start the capture during the loading screen of your game, mute the capturable sound wave right after that, and then unmute the capturable sound wave when needed for capturing audio data without any hitches.

Toggle Mute nodes


Finally, your implementation might look like this:

An example of using a capturable sound wave