Skip to content
Version 2.32.0
↓ Get the launcher

IVoiceInjection.LoadFileAsync method

Decode an audio file off-thread (WAV natively; MP3/WMA/M4A via Windows Media Foundation) into a reusable clip. Does NOT require the capture format to be known — the clip keeps its source PCM and is (re)resampled to the capture format on demand. Throws on a missing file or an unsupported/corrupt encoding. Media Foundation is absent on Windows “N” editions → non-WAV will fail there (WAV still works). Call from any thread; the returned task completes on a background thread.

public Task<IVoiceClip> LoadFileAsync(string path)
parameter description
path Absolute path to the audio file.