Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-speech-to-text-ios

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-speech-to-text-ios

React Native speech recognition component for iOS 10+

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

alt tag

react-native-speech-to-text-ios npm version

React Native speech recognition component for iOS 10+

Getting started

$ npm install react-native-speech-to-text-ios --save

Mostly automatic installation

$ react-native link react-native-speech-to-text-ios

Usage


var SpeechToText = require('react-native-speech-to-text-ios');

...

this.subscription = NativeAppEventEmitter.addListener(
  'SpeechToText',
  (result) => {

    if (result.error) {
      alert(JSON.stringify(result.error));
    } else {
      console.log(result.bestTranscription.formattedString);
    }
	
  }
);

SpeechToText.startRecognition("en-US");

...

componentWillUnmount() {
  if (this.subscription != null) {
    this.subscription.remove();
    this.subscription = null;
  }
}

To stop recording call SpeechToText.finishRecognition() but after that you can continue to receive event with final recognition results. The events will not arrive after result.isFinal == true. Call SpeechToText.stopRecognition() to cancel current recognition task. The result objects reflects Apple SFSpeechRecognitionResult class.

Use this link to reference error codes https://developer.nuance.com/public/Help/DragonMobileSDKReference_iOS/Error-codes.html

Keywords

FAQs

Package last updated on 28 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc