speechtotextjs

1.3.1 • Public • Published

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.

Package Sidebar

Install

npm i speechtotextjs

Weekly Downloads

0

Version

1.3.1

License

MIT

Last publish

Collaborators

  • imal