@salutejs/client
Version:
Модуль взаимодействия с виртуальным ассистентом
17 lines • 671 B
TypeScript
export interface VoicePlayerSettings {
startVoiceDelay?: number;
sampleRate?: number;
numberOfChannels?: number;
}
export declare type EventsType = {
play: (trackId: string) => void;
end: (trackId: string) => void;
stop: (trackId: string) => void;
};
export declare const createVoicePlayer: (actx: AudioContext, { startVoiceDelay, sampleRate, numberOfChannels }?: VoicePlayerSettings) => {
append: (data: Uint8Array, trackId: string, last?: boolean) => void;
setActive(value: boolean): void;
on: <K extends keyof EventsType>(event: K, cb: EventsType[K]) => () => void;
stop: () => void;
};
//# sourceMappingURL=voicePlayer.d.ts.map