UNPKG

orate

Version:
16 lines (14 loc) 641 B
declare class Native { /** * Creates a speech-to-text transcription function using Web Speech API * @param {SpeechRecognition} options - Additional options to pass to the SpeechRecognition * @param {string} options.lang - The language to use for transcription. If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either. * @returns {Function} Async function that records audio and returns transcribed text */ stt(options?: { lang?: string; }): { generate: (audio: File) => Promise<string>; }; } export { Native };