voicechat.getstatus Synchronous

Take a snapshot of the voice playback service. Check state and error after play, and use position and duration for a progress display.

Syntax
Luau
voicechat.getstatus() -> VoiceStatus

Parameters

This function takes no arguments.

Returns

VoiceStatus

A VoiceStatus table with playback, capture, format, and processing fields.

VoiceStatus fields
Luau
VoiceStatus = {
  state: string, path: string, error: string,
  position: number, duration: number, speed: number, volume: number,
  micmuted: boolean, available: boolean, capturing: boolean,
  capturerate: number, capturechannels: number, captureblocks: number,
  unsupportedblocks: number, mode: string,
  sourcerate: number, sourcechannels: number, sourcebitdepth: number,
  sourceencoding: string, formatorigin: string,
  submittedrate: number, submittedchannels: number, submittedbitdepth: number,
  submittedencoding: string, submissionresult: number, submissionfailures: number,
  sourceblocks: number, transportbitdepth: number, capturehook: string,
  fileprocessing: string, processedblocks: number, fileblocks: number,
  enginemuted: boolean
}

Usage notes

Possible playback states are stopped, loading, playing, paused, ended, and error.

available reports whether the native capture integration is installed. This snapshot is not an event; call again to see later changes.

Example

Example
Luau
local status = voicechat.getstatus()
print(status.state, status.position, "/", status.duration)
if status.error ~= "" then warn(status.error) end
Kawaii documentation