speechtotextjs
v1.3.1
Published
web speech api based solution for voice to text conversion
Downloads
3
Maintainers
Readme
SpeechToTextJs
Single Library for Client Side Speech Detection
This library is based on html5's Web Speech API, Currently following browsers support SpeechRecognition
- Chrome
Usage
- NPM :
npm install speechtotextjs --save
- Bower :
bower install speechtotextjs --save
Or linking script files
<script type="text/javascript" src="../dist/SpeechToTextJs.min.js"></script>
Sample Code
Please see the demo
folder for working solution
var speecht2text = new SpeechToText(function(){
speecht2text.setIsContinous(true);
speecht2text.setAllowInterimResults(true);
speecht2text.setMaxAlternatives(20);
var lang = speecht2text.getAllSupportedLanguages();
speecht2text.setLanguage((lang[0]).key); // english
speecht2text.start();
speecht2text.onEnd(function () {
alert(speecht2text.getText());
});
setTimeout(function(){
speecht2text.stop();
},5000);
},function () {
alert("Browser Not Supported");
});
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Bug fixes and new features can be proposed using pull requests. Please read the contribution guidelines before submitting a pull request.
Credits
License
The MIT License (MIT). Please see License File for more information.