Skip to content

@camera.ui/sdk / plugin / AudioDetectionInterface

Interface: AudioDetectionInterface

Defined in: plugin/interfaces.ts:265

Implemented by plugins that perform audio event or keyword detection.

Methods

audioDetectionSettings()?

optional audioDetectionSettings(): Promise<JsonSchema[] | undefined>

Defined in: plugin/interfaces.ts:271

Return the JSON schema used to render the audio-detection settings form in the UI, or undefined for no schema.

Returns

Promise<JsonSchema[] | undefined>


detectAudio()?

optional detectAudio(audio, config?): Promise<AudioDetectionPluginResponse | undefined>

Defined in: plugin/interfaces.ts:269

Run detection on a pre-decoded audio frame. Called from automation / benchmark pipelines.

Parameters

audio

AudioFrameData

config?

Record<string, unknown>

Returns

Promise<AudioDetectionPluginResponse | undefined>


testAudioDetection()

testAudioDetection(audioData, metadata, config): Promise<AudioDetectionPluginResponse | undefined>

Defined in: plugin/interfaces.ts:267

Run detection on an audio buffer captured by the UI test panel; metadata carries the input MIME type.

Parameters

audioData

Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

metadata

AudioMetadata

config

Record<string, unknown>

Returns

Promise<AudioDetectionPluginResponse | undefined>