annyang | : speech_balloon : Speech recognition for your site | Speech library
kandi X-RAY | annyang Summary
kandi X-RAY | annyang Summary
A tiny JavaScript Speech Recognition library that lets your users control your site with voice commands. annyang has no dependencies, weighs just 2 KB, and is free to use and modify under the MIT license.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Calculates and dist packages .
- find package paths
- load modules
- define an event handler
- this needs to be optimized because it doesn t have properties
- Main function .
- mutates a b
- Main function
- Evaluate dependencies between two dependencies
- Creates an error .
annyang Key Features
annyang Examples and Code Snippets
Community Discussions
Trending Discussions on annyang
QUESTION
I am Using annyang.js for speech-recognition which have 2 different functions, for start annyang.start()
and for stop annyang.abort()
Now how do i make a toggle button which will fire both of these functions?
my code
...ANSWER
Answered 2021-Nov-22 at 18:03You can check if action has active class you can start or if it doesnt have you can stop.
QUESTION
I am working on a project and need to input data in a form which contain input task name type=text with id=task_name. The user should be able to input data using annyang voice recognition, annyang is starting and can see red dot on page but when passing the commands nothing shows up, did i make an error somewhere. Clicking on a button will make annyang start and after that user could add use voice command to input data but voice command is not working.
Here is my code
...ANSWER
Answered 2021-Apr-07 at 18:59Your code will make annyang listen for the voice command "input task name" because you define that command here:
Try saying "input task name" and see if it places that sentence into the task_name
field.
You will want to replace that text with a command that will catch any sentence the user says.
For example:
QUESTION
My company serves e-learning lessons through HTML5 files created in H5P, Captivate, Storyline. These lessons use xAPI to communicate grades and user information to an LRS. Recently I have been working on implementing voice recognition into these lessons using either Web speech API or Annyang and eventually we would like to build our own proprietary speech API. However, I see that voice recognition only seems to be compatible with Chrome desktop right now. I am working on creating a mobile app using React Native that can access a user's lessons from the database and "play" them in an in-app browser. So my questions are as follows:
- Would it be possible to hand-roll an in-app browser like Capacitor/ Cordova/ some other IAB to support the W3C Web Speech API specification?
- Would it even be allowed? Would Apple allow an app with such an IAB in their app store?
- Am I correct in understanding that an in-app browser could still support the necessary Javascript for features like xAPI, drag and drop, and session progress saving? Or am I barking up the wrong tree entirely?
ANSWER
Answered 2021-Mar-01 at 14:18- Which Speech API's? The spec you referenced is broad and includes a number of underlying API's which are supported across different platforms.
- Probably not. Many apps submitted this way get rejected. Apple is against the method you're trying to load the app. An app that simply loads an IAB is not really an app to Apple.
2.5.2: Apps should be self-contained in their bundles, and may not read or write data outside the designated container area...
- IAB is a hit or miss. They can't access native features through plugins. It should support most web standards, but from my experience, they're use for simpler use cases. Not hosting feature rich apps. Why not make a regular Cordova/Capacitor app without the IAB?
QUESTION
I've tested Annyang in a blank file first. This worked fine, but when I connected the same code to a function in another file it didn't seem te be working. It seemed that the annyang was not connected anymore. The browser didn't ask for permission to use the microphone neither was the red circle visible. However, I've connected it the same way I did while testing.
function: playerRotate(1); I want to start when the user says: turn.
Below you can find my code:
The javascript `
...ANSWER
Answered 2020-Apr-08 at 20:20I downloaded your source code and it ran without a hitch (see image below).
Is there something else different between how you ran annyang in your test when it worked and how you ran it later?
My guess would be that what changed was how you ran it locally. Perhaps one of those times you opened it as file://
and another as http://localhost
or even http://my-local-environment
or something similar. Speech Recognition requires HTTPS (or on some versions it can run over HTTP if your host name is localhost). Your safest bet would be to try running it over SSL (even locally, without a valid certificate).
Another option is that you may have blocked speech recognition once and the browser remembers that choice (your mileage may vary depending on browser and version).
As for the code itself, it works great:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install annyang
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