Skip to main content
Corvus Connection

IAudioApi

Interface
TheOmenDen.StreamPulse.Scripting.IAudioApiLocal audio playback operations available inside a script handler, bound to the desktop's audio engine. Every method is failure-safe: a missing clip/alias, an unavailable output device, a TTS fault, or an unexpected throw is logged (only a stable message — never confidential data) and surfaced as a benign no-op. A failing call can never propagate out of a node. Triggering rate is the author's concern; the engine still enforces its own per-clip cooldown and concurrent-voice cap.

Members

4
  • PlaySfxAsync
    method
    Task PlaySfxAsync(string alias, float? volume = default, CancellationToken cancellationToken = default)
    Plays a sound-effect clip from the local sound bank, addressed by its alias. An unknown alias or a clip on cooldown is a logged no-op. volume overrides the clip's default level for this play only (clamped to 0..1); null uses the clip's configured default.
  • SetChannelVolumeAsync
    method
    Task SetChannelVolumeAsync(AudioChannel channel, float volume, CancellationToken cancellationToken = default)
    Sets a channel's volume, applied live to any in-flight playback on that channel and persisted as a mix preference. volume is clamped to 0..1. All is not a valid target (use the master mute) and no-ops.
  • SpeakAsync
    method
    Task SpeakAsync(string text, TtsOverride voice = default, CancellationToken cancellationToken = default)
    Speaks text through the configured text-to-speech voice on the TTS channel. Sanitization (when enabled), the per-utterance length cap, and the bounded serial queue are applied by the engine. voice overrides the default voice parameters for this utterance only; null uses the configured defaults. Blank text no-ops.
  • StopAsync
    method
    Task StopAsync(AudioChannel channel = default, CancellationToken cancellationToken = default)
    Stops in-flight playback (and clears the TTS queue) for the given channel, or for every channel when All (the default).