@bddh/starling-realtime-client
Version:
28 lines (27 loc) • 833 B
TypeScript
import { Mic3AType } from "./interface";
export type PickAudioMode = 'pressButton' | 'free';
interface RecordControllerOptions {
pickAudioMode?: PickAudioMode;
audio3AConstraints?: Mic3AType;
onAudioData: (pcmData: ArrayBuffer) => void;
onError?: (err: Error) => void;
pullAudioFromRtc?: boolean;
brtcClient?: any;
asrSample?: number;
}
declare class RecordController {
private readonly onAudioData;
private readonly onError?;
private audioContext;
private processor;
private mediaStream;
private recording;
private audio3AConstraints?;
private asrSample?;
constructor(options: RecordControllerOptions);
preWarmStream(): Promise<void>;
start(): Promise<void>;
stop(): void;
destroy(): void;
}
export default RecordController;