Summary
Add a lightweight audio level monitoring utility that wraps the Web Audio API AnalyserNode to provide real-time microphone volume levels, frequency data, and speaking/silent state detection alongside Deepgram streaming transcription.
Problem it solves
Voice agent UIs universally need visual feedback showing microphone activity — animated waveforms, volume meters, and speaking indicators. Currently, developers must implement Web Audio API AnalyserNode setup, volume calculation (RMS), silence threshold detection, and animation frame loops from scratch every time they build a Deepgram-powered voice interface. This is a solved problem that should be a one-line SDK utility.
Proposed API
import { createAudioLevelMonitor } from '@deepgram/sdk/browser';
const monitor = createAudioLevelMonitor(mediaStream, {
fftSize: 2048,
silenceThreshold: -50, // dB
smoothingTimeConstant: 0.8,
});
monitor.on('level', ({ volume, isSpeaking, frequencyData }) => {
// Update UI — volume is 0-1 normalized, frequencyData is Float32Array
});
monitor.on('silence', ({ duration }) => {
// User stopped speaking for `duration` ms
});
monitor.on('speech', () => {
// User started speaking
});
monitor.stop();
Acceptance criteria
Raised by the DX intelligence system.
Summary
Add a lightweight audio level monitoring utility that wraps the Web Audio API AnalyserNode to provide real-time microphone volume levels, frequency data, and speaking/silent state detection alongside Deepgram streaming transcription.
Problem it solves
Voice agent UIs universally need visual feedback showing microphone activity — animated waveforms, volume meters, and speaking indicators. Currently, developers must implement Web Audio API AnalyserNode setup, volume calculation (RMS), silence threshold detection, and animation frame loops from scratch every time they build a Deepgram-powered voice interface. This is a solved problem that should be a one-line SDK utility.
Proposed API
Acceptance criteria
Raised by the DX intelligence system.