UNPKG

@fine-dev/fine-js

Version:

Javascript client for Fine BaaS

31 lines 998 B
import { Fetch } from "./types"; type Status = "idle" | "recording" | "paused" | "recording_error" | "stopped" | "transcribing" | "transcription_error" | "transcribed"; export declare class FineTranscriber { error: Error | null; private mediaRecorder; private chunks; private file; private statusListeners; private _status; private config; constructor({ baseUrl, headers, fetch: customFetch }: { baseUrl: string; fetch?: Fetch; headers?: HeadersInit; }); private createMediaRecorder; private setStatus; private raiseError; get status(): Status; onStatusChange(callback: (status: Status) => void): () => boolean; recording: { start: () => void | Promise<void>; stop: () => false | void | null; pause: () => false | void | null; }; fromFile(file: File): Promise<string>; transcribe(): Promise<string>; useStatus(): string; } export {}; //# sourceMappingURL=transcribe.d.ts.map