React Native Speech to Text using wenet
#Not yet ready
npm install react-native-wenet
To run the example app just fork the repository and run the following.
Need to provide the wenet model in the example app folder inside android\app\src\main\assets
yarn
yarn example android
This is a react native module of the amazing Wenet framework. We at Writtan absolutely love the simplicity of wenet and plan on integrating it into our own app. We would appreciate any help with this module please see the todo at the bottom.
This is a work in progress and the package might change drastically in the future!
You are required to provide a wenet model to use this package. In your file tree it should be located in android\app\src\main\assets
.
No support for ios yet :(
import Wenet, { Event } from 'react-native-wenet';
React.useEffect(() => {
Wenet.setupSTT();
//Need to request audio permission here
}, []);
const handleStart = async () => {
Wenet.startSTT(); //Start the service
Wenet.addEventListener(Event.Result, (data) => {
setResult(data); //Returns the results
});
};
const handleStop = async () => {
Wenet.stopSTT();
};
- Create documentation
- Convert module to send data with JSI
- Add timestamps to the final results
- Separate Final result from partial result (Not just 1 big final)
- Add ability to download new models inside the app
- Reduce package size (maybe move to pytorch-android-light, see what c++ can be removed)
- Create ios version (also not implemented in wenet yet)
See the contributing guide to learn how to contribute to the repository and the development workflow.
- Most of the code is written by the good people at Wenet
- I plan on using a lot of Playtorch code for writing jsi (linking c++ and react native)
MIT
Made with create-react-native-library