Download Latest Version Maintenance release.zip (279.0 kB)
Email in envelope

Get an email when there's a new version of annyang!

Home / v2.6.0
Name Modified Size InfoDownloads / Week
Parent folder
Added soundstart event.tar.gz 2016-10-07 169.1 kB
Added soundstart event.zip 2016-10-07 185.3 kB
README.md 2016-10-07 1.7 kB
Totals: 3 Items   356.1 kB 0

šŸ‘ This release is 100% backwards compatible with all v2 releases.

[Added] Allow listening to the soundstart event

You can now add a callback event which will run when the speech recognition's soundstart event fires.

:::javascript
annyang.addCallback('soundstart', fn);

This event will fire once per speech recognition session (due to a bug in Chrome). If you would like to get it again the next time sound is heard, you can abort and restart speech recognition… which is the default behavior in HTTPS anyway. In other words, in HTTPS it works great.

See a more complete example for detecting when the user starts and stops speaking in the FAQ.

Changed file structure and development stack

The main annyang files which you will include in your project are now in the /dist directory: - /dist/annyang.js - /dist/annyang.min.js

If you would like to work on annyang's code itself, it is now in the /src directory: - /src/annyang.js

annyang's source now passes through babel with the es2015 preset, so you can use ES2015 language features in it.

Awesome people :star:

Special thanks to: - @remybach - For the original soundstart event code, and helping determine the final functionality. - @peterdillon - Helping create a use case to test the new soundstart event.

Source: README.md, updated 2016-10-07