UNPKG

voice-to-text-converter

Version:

A modern, lightweight Node.js package for speech-to-text conversion with support for multiple engines

32 lines 1.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SpeechRecognitionError = exports.SpeechRecognitionErrorType = void 0; /** * Error types that can occur during speech recognition */ var SpeechRecognitionErrorType; (function (SpeechRecognitionErrorType) { SpeechRecognitionErrorType["NO_SPEECH"] = "no-speech"; SpeechRecognitionErrorType["ABORTED"] = "aborted"; SpeechRecognitionErrorType["AUDIO_CAPTURE"] = "audio-capture"; SpeechRecognitionErrorType["NETWORK"] = "network"; SpeechRecognitionErrorType["NOT_ALLOWED"] = "not-allowed"; SpeechRecognitionErrorType["SERVICE_NOT_ALLOWED"] = "service-not-allowed"; SpeechRecognitionErrorType["BAD_GRAMMAR"] = "bad-grammar"; SpeechRecognitionErrorType["LANGUAGE_NOT_SUPPORTED"] = "language-not-supported"; SpeechRecognitionErrorType["ENGINE_ERROR"] = "engine-error"; SpeechRecognitionErrorType["INVALID_CONFIG"] = "invalid-config"; })(SpeechRecognitionErrorType || (exports.SpeechRecognitionErrorType = SpeechRecognitionErrorType = {})); /** * Speech recognition error */ class SpeechRecognitionError extends Error { constructor(type, message, originalError) { super(message); this.type = type; this.originalError = originalError; this.name = 'SpeechRecognitionError'; } } exports.SpeechRecognitionError = SpeechRecognitionError; //# sourceMappingURL=index.js.map