AudioWorkletProcessor that downsamples mic input and performs voice activity detection.
// Source: https://github.com/GoogleCloudPlatform/generative-ai | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright 2026 Google LLC
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
// RecorderProcessor downsamples client microphone input and runs voice detection.
interface AudioWorkletProcessor {
readonly port: MessagePort;
process(inputs: Float32Array[][], outputs: Float32Array[][], parameters: Record<string, Float32Array>): boolean;
}
declare let AudioWorkletProcessor: {
prototype: AudioWorkletProcessor;
new(): AudioWorkletProcessor;
};
declare function re
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key