2

I am trying to find a Speech Recognition Javascript API ( preferably offline ) where I can set some hardcoded words like 'play', 'pause', etc and get a probability about what word a user said. i.e {word: 'play', probability: '0.72'}

I've used a simmilar API when I was programming with a Kinect device and I would like to use the same functionality into my Javascript App.

I've already done my research about suchlike API's and the only thing I've found is a speech to text service. Of course, I can compare the text strings in order to have a probability of the word but the Kinect way seemed to be more correct.

Thanks for your help :)

1 Answer 1

2

Tensorflow, the deeplearning framework by Google, is available in JavaScript. Many things can be done with it, and speech recognition is one of them.

There is a very good codelab explaining how to build a speech recognition tool in the JS version of Tensorflow. The tool works by firing if the recognizer is more that 75% confident that the word matches a known word, but it can be easily tweaked into directly getting the confidence rates as you requested.

This tutorial does a deep-dive into programming a speech recognition tool - it is written in Python, but the JS and Python version of TensorFlow share a lot of their API endpoints, so it's still a very useful pointer for what you're trying to develop.

3
  • So you mean there is no such thing already and I have to make it on my own? Commented Apr 13, 2019 at 10:16
  • Yes, you'll eventually have to write a bit of code yourself, the API model for speech recognition is incredibly wasteful in terms of network resources so there is no API available. But TensorFlow was designed to be used by beginners and professionals alike, so it won't be too much of a difficulty to write these lines of code ;) You don't really need to know about AI to make TensorFlow work
    – Nino Filiu
    Commented Apr 13, 2019 at 19:46
  • 1
    Okk I got it! Thank you so much for your time your answer was very helpful :) Commented Apr 14, 2019 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.