UNPKG

@ascendtis/react-native-voice-to-text

Version:

This can use to convert voice to text real time in device

47 lines (46 loc) 1.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addEventListener = addEventListener; exports.destroy = destroy; exports.getRecognitionLanguage = getRecognitionLanguage; exports.getSupportedLanguages = getSupportedLanguages; exports.isRecognitionAvailable = isRecognitionAvailable; exports.removeAllListeners = removeAllListeners; exports.setRecognitionLanguage = setRecognitionLanguage; exports.startListening = startListening; exports.stopListening = stopListening; var _reactNative = require("react-native"); const { VoiceToText } = _reactNative.NativeModules; const emitter = new _reactNative.NativeEventEmitter(VoiceToText); function startListening() { return VoiceToText.startListening(); } function stopListening() { return VoiceToText.stopListening(); } function destroy() { return VoiceToText.destroy(); } function getRecognitionLanguage() { return VoiceToText.getRecognitionLanguage(); } function setRecognitionLanguage(languageTag) { return VoiceToText.setRecognitionLanguage(languageTag); } function isRecognitionAvailable() { return VoiceToText.isRecognitionAvailable(); } function getSupportedLanguages() { return VoiceToText.getSupportedLanguages(); } function addEventListener(eventName, handler) { return emitter.addListener(eventName, handler); } function removeAllListeners(eventName) { emitter.removeAllListeners(eventName); } //# sourceMappingURL=index.js.map