voice-to-text-converter
Version:
A modern, lightweight Node.js package for speech-to-text conversion with support for multiple engines
58 lines • 2.32 kB
TypeScript
export { VoiceToText } from './voice-to-text';
export * from './types';
export { BaseSpeechRecognitionEngine } from './engines/base-engine';
export { WebSpeechEngine } from './engines/web-speech-engine';
export { isSupportedAudioFormat, SUPPORTED_AUDIO_FORMATS } from './utils/audio';
import { VoiceToText } from './voice-to-text';
export default VoiceToText;
import { SpeechRecognitionConfig, SpeechRecognitionResult, MicrophoneOptions } from './types';
/**
* Quick transcription from microphone (browser only)
* @param options Microphone and recognition options
* @returns Promise resolving to transcription results
*/
export declare function transcribeFromMicrophone(options?: MicrophoneOptions & {
language?: string;
config?: SpeechRecognitionConfig;
}): Promise<SpeechRecognitionResult[]>;
/**
* Create a VoiceToText instance optimized for browser
* @param options Configuration options
* @returns Configured VoiceToText instance
*/
export declare function createVoiceToText(options?: {
language?: string;
continuous?: boolean;
interimResults?: boolean;
debug?: boolean;
}): VoiceToText;
/**
* Check browser capabilities
* @returns Browser support information
*/
export declare function getBrowserSupport(): import("./types").BrowserSupport;
/**
* Get available audio input devices
* @returns Promise resolving to list of audio input devices
*/
export declare function getAudioDevices(): Promise<MediaDeviceInfo[]>;
/**
* Request microphone permission
* @returns Promise resolving to whether permission was granted
*/
export declare function requestMicrophonePermission(): Promise<boolean>;
export declare const VERSION = "1.0.0";
export type { SpeechRecognitionConfig, SpeechRecognitionResult, MicrophoneOptions, BrowserSupport, SpeechRecognitionError, SpeechRecognitionErrorType } from './types';
declare global {
interface Window {
VoiceToText: typeof VoiceToText;
voiceToText: {
transcribeFromMicrophone: typeof transcribeFromMicrophone;
createVoiceToText: typeof createVoiceToText;
getBrowserSupport: typeof getBrowserSupport;
getAudioDevices: typeof getAudioDevices;
requestMicrophonePermission: typeof requestMicrophonePermission;
};
}
}
//# sourceMappingURL=browser.d.ts.map