AIAudioController
private
Experimental
Central controller for all AI audio operations: recording (microphone input), transcription, and text-to-speech playback. Created by the AI feature and shared with the chat panel so both layers can control audio through a single object without reaching into each other's internals.
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Set to
trueto always read aloud received messages. Set tofalseto not read aloud responses to recorded messages. Defaults toaudio-inputwhich reads received messages aloud if they are a response to a local audio message. -
Set to
trueto automatically start recording again after a voice response finishes playing. Only applies when the previous message was sent via voice input. -
Set to
trueto automatically stop any ongoing recording and audio playback when the chat panel is hidden. -
URL to send text for speech synthesis
-
URL to send audio blobs for transcription
Properties
Properties are getters/setters or publicly accessible variables on this class-
A promise that resolves when the current playback completes, or null if not playing. Useful for awaiting speech completion externally (e.g. voice conversation loop).
Functions
Functions are methods available for calling on the class-
End the current voice conversation
-
stopSpeaking( )
Stop any ongoing speech — cancels the TTS fetch if still waiting, or stops playback if already playing