
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
react-native-stt
Advanced tools
react-native-stt is a speech-to-text library for React Native.
This project combines the works of react-native-speech-to-text-ios and react-native-android-speech-recognizer.
npm install --save react-native-stt
react-native link react-native-stt
MainApplication.java
com.deadmau.rnspeechtotext.RNSpeechToTextPackage;
new RNSpeechToTextPackage()
to the getPackages()
methodandroid/settings.gradle
:include ':react-native-stt'
project(':react-native-stt').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-stt/android/lib')
android/app/build.gradle
: compile project(':react-native-stt')
import Stt from 'react-native-stt';
Sets locale & emits speech-to-text result. If locale is not set, it will start with device default locale.
Stt.start('en-US');
Stops speech recognition (but, it will process the last data it received).
Stt.stop();
Destroys Stt.
Stt.destroy();
Returns list of available languages
...
Stt.supportedLocales();
...
Stt.addListener('supportedLocales', (result) => {
if (result.error) {
alert(JSON.stringify(result.error));
} else {
if (Platform.os === 'android') {
console.log(result.supportedLanguages);
} else{
console.log(result);
}
}
});
// Prints:
//
// en-GB,
// ...
// uk-UA
MIT
FAQs
React Native extension for speech-to-text
We found that react-native-stt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.