UNPKG

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

Version:

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

35 lines (34 loc) 1.01 kB
"use strict"; import { NativeModules, NativeEventEmitter } from 'react-native'; const { VoiceToText } = NativeModules; const emitter = new NativeEventEmitter(VoiceToText); export function startListening() { return VoiceToText.startListening(); } export function stopListening() { return VoiceToText.stopListening(); } export function destroy() { return VoiceToText.destroy(); } export function getRecognitionLanguage() { return VoiceToText.getRecognitionLanguage(); } export function setRecognitionLanguage(languageTag) { return VoiceToText.setRecognitionLanguage(languageTag); } export function isRecognitionAvailable() { return VoiceToText.isRecognitionAvailable(); } export function getSupportedLanguages() { return VoiceToText.getSupportedLanguages(); } export function addEventListener(eventName, handler) { return emitter.addListener(eventName, handler); } export function removeAllListeners(eventName) { emitter.removeAllListeners(eventName); } //# sourceMappingURL=index.js.map