Speech Recognition is designed to listen continuously to a user (i.e. pauses are ok), and then converts that speech to text. It support Chrome,FireFox,Safari and Edge
Last updated a year ago by mitulshah96 .
ISC · Original npm · Tarball · package.json
$ cnpm install speech_recognition_all_browser 
SYNC missed versions from official npm registry.

How it works SpeechRecognition is a class that wraps one of your React components. In doing so, it injects some additional properties into the component that allow it to access a transcript of speech picked up from the user's microphone.

Under the hood, it uses Web Speech API. Currently, this component will work in Chrome,firefox,safari,edge

You will need a dependency manager like Browserify or Webpack to bundle this module with your web code.

For firefox and other browser it takes audio and convert into flac format and flac file is been passed to Gapi which converts to speech for rest of the browser

You need to add below script to your index.html to access gapi

https://apis.google.com/js/api.js" src="./gapi.js"

create gapi.js and add it to the public folder and paste the below code

function start() { window.gapi.client.init({ 'apiKey': 'Your API Key' }).then(function () { window.gapi.client.load('speech', 'v1beta1'); }, function (reason) { console.log('Error: ' + reason.result.error.message); }); }; window.gapi.load('client', start);

Now, Import Speech from speech_recognition_all_browser

and create instance of speech and call start method with callback;

new Speech().start(getText)

function getText(text){ document.getElementbyId('voice').value=text; }

Current Tags

  • 1.0.12                                ...           latest (a year ago)

12 Versions

  • 1.0.12                                ...           a year ago
  • 1.0.11                                ...           a year ago
  • 1.0.10                                ...           a year ago
  • 1.0.9                                ...           a year ago
  • 1.0.8                                ...           a year ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 12
Dependencies (9)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |