/** * Capture worklet shared by the browser-direct adapters (ADR 0005): posts * each mono render quantum to the main thread until told to stop. */ export declare const REALTIME_AUDIO_PROCESSOR_NAME = "realtime-audio-processor"; export declare const REALTIME_AUDIO_WORKLET_CODE = "\nclass RealtimeAudioProcessor extends AudioWorkletProcessor {\n constructor(options) {\n super();\n this.active = true;\n this.port.onmessage = (event) => {\n if (event?.data?.type === \"sofya-stop\") {\n this.active = false;\n }\n };\n }\n\n process(inputs, outputs, params) {\n if (!this.active) {\n return false;\n }\n\n const channel = inputs[0]?.[0];\n if (channel) {\n // ASR and VAD models typically require mono audio.\n this.port.postMessage(channel);\n }\n\n return true;\n }\n}\n\nregisterProcessor(\"realtime-audio-processor\", RealtimeAudioProcessor);\n"; //# sourceMappingURL=worklet.d.ts.map