Skip to main content
Corvus Connection

IAudioEngine

Interface
TheOmenDen.StreamPulse.Scripting.IAudioEngineThe long-lived local audio engine the desktop implements (a MediaPlayer pool plus offline TTS). The script-facing ctx.Audio facade (AudioApi) wraps this per invocation and is the failure-safe boundary — this surface may throw, and the wrapper logs and swallows. Registered in the in-process container so the script runtime resolves the desktop implementation. Implementations must not marshal to the WinUI UI thread.

Members

4
  • PlaySfxAsync
    method
    Task PlaySfxAsync(string alias, float? volume = default, CancellationToken cancellationToken = default)
    Plays a sound-bank clip by alias on the SFX channel. volume (0..1) overrides the clip default; null uses it.
  • SetChannelVolumeAsync
    method
    Task SetChannelVolumeAsync(AudioChannel channel, float volume, CancellationToken cancellationToken = default)
    Sets a channel's volume (0..1), applied live to in-flight playback and persisted as a mix preference.
  • SpeakAsync
    method
    Task SpeakAsync(string text, TtsOverride voice = default, CancellationToken cancellationToken = default)
    Speaks text on the TTS channel using the default voice unless voice overrides it.
  • StopAsync
    method
    Task StopAsync(AudioChannel channel = default, CancellationToken cancellationToken = default)
    Stops in-flight playback (and clears the TTS queue) for a channel, or all channels.