/** * Platform-agnostic microphone streaming interface for Scribe. * * The web implementation (`platform/web/scribeMicrophone.ts`) provides the * actual AudioContext + getUserMedia pipeline; other platforms can supply * their own implementation via `setScribeMicrophoneSetup`. */ export interface ScribeMicrophoneConfig { deviceId?: MediaDeviceConstraint; echoCancellation?: boolean; noiseSuppression?: boolean; autoGainControl?: boolean; channelCount?: number; } export interface ScribeMicrophoneResult { /** Track reference so the connection can toggle `track.enabled` for mute/unmute. */ mediaStreamTrack: MediaStreamTrack; /** Tear down the audio pipeline and release hardware. */ cleanup: () => void; } /** * Sets up microphone capture and streams PCM audio to the provided callback. * * @param config - Microphone constraints * @param onAudioData - Called with base64-encoded PCM16 chunks * @returns A result containing the track and cleanup function */ export type ScribeMicrophoneSetup = (config: ScribeMicrophoneConfig, onAudioData: (base64Audio: string) => void) => Promise; export declare function setScribeMicrophoneSetup(setup: ScribeMicrophoneSetup): void; export declare function getScribeMicrophoneSetup(): ScribeMicrophoneSetup; //# sourceMappingURL=microphone.d.ts.map