File

data class File(val path: String, val loop: Boolean = false, val leadInSilenceMs: Long = 0) : AudioInputSource

A WAV file streamed as microphone input.

The file must be a canonical PCM WAV (integer PCM 8/16/24/32-bit or IEEE float 32/64-bit). Multi-channel audio is downmixed to mono by averaging; output is always mono regardless of the configured channel count.

Constructors

Link copied to clipboard
constructor(path: String, loop: Boolean = false, leadInSilenceMs: Long = 0)

Properties

Link copied to clipboard

Milliseconds of silence emitted before the file's audio begins. Emitted once, not repeated on loop. Useful when consumers discard an initial mic warm-up window.

Link copied to clipboard

If true, the file restarts from the beginning at EOF; if false, digital silence is emitted after EOF (a quiet room, not a dead mic) until recording stops.

Link copied to clipboard

Absolute path to the WAV file.