pocketsphinx.js | Speech recognition in JavaScript and WebAssembly | Binary Executable Format library
kandi X-RAY | pocketsphinx.js Summary
kandi X-RAY | pocketsphinx.js Summary
This project includes several components that can be used independently:. The file webapp/live.html illustrates how these work together in a real application, that is a good starting point. Make sure you load it through a web server or start Chrome with --disable-web-security. It is also recommended to serve the wasm file with the correct MIME type (application/wasm). For instance, you can start a small web server with ./server.py in the base directory and open in your browser (make sure it is launched with python 2). Note that the app must be served through https (or localhost, or with --disable-web-security) to allow audio recording. There is also a live demo for Chinese. To try it, open in your browser. In addition to speech recognition, there is also a keyword spotting functionality that detects a specific word or phrase in the audio input. There are live demos in webapp/live.html (via a key phrases file) and webapp/live_kws.html (via keyword spotting API).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pocketsphinx.js
pocketsphinx.js Key Features
pocketsphinx.js Examples and Code Snippets
Community Discussions
Trending Discussions on pocketsphinx.js
QUESTION
I am trying to add a continuous speech to text recognizer in a mobile application during a webrtc audio-only call.
I'm using react native on the mobile side, with the react-native-webrtc module and a custom web api for the signaling part. I've got the hand of the web api, so I am able to add the feature on it's side if it's the only solution, but I prefer to perform it on the client side to avoid consuming bandwith if there is no need.
First, I have worked and tested some ideas with my laptop browser. My first idea, was to use the SpeechRecognition interface from the webspeechapi : https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
I have merged the audio only webrtc demo with the audiovisualiser demonstration in one page but there, I did not find how to connect a mediaElementSourceNode
(created via AudioContext.createMediaElementSource(remoteStream)
at line 44 of streamvisualizer.js) to a web_speech_api SpeechRecognition
class. In the mozilla documentation, the audio stream seems to came with the constructor of the class, wich may call the getUserMedia()
api.
Second, during my researches I have found two open source speech to text engine : cmusphinx and mozilla's deep-speech. The first one have a js binding and seems great with the audioRecoder
that I can feed with my own mediaElementSourceNode
from the first try. However, how to embeed this in my react native application ?
There are also Android and iOS natives webrtc modules, which I may be able to connect with cmusphinx platform specific bindings (iOS, Android) but I don't know about native classes inter-operability. Can you help me with that ?
I haven't already created any "grammar" or define "hot-words" because I am not sure of technologies involved, but I can do it latter if I am able to connect a speech recognition engine to my audio stream.
...ANSWER
Answered 2019-May-09 at 17:49You need to stream the audio to the ASR server by either adding another webrtc party on the call or by some other protocol (TCP/Websocket/etc). On the server you perform recognition and send results back.
First, I have worked and tested some ideas with my laptop browser. My first idea, was to use the SpeechRecognition interface from the webspeechapi : https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
This is experimental and does not really work in Firefox. In Chrome it only takes microphone input directly, not dual stream from caller and callee.
The first one have a js binding and seems great with the audioRecoder that I can feed with my own mediaElementSourceNode from the first try.
You will not be able to run this as local recognition inside your react native app
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pocketsphinx.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page