https://github.com/simalexan/speechy
Voice command tool for an easy web speech recognition for your web application. In "Minority Report" style
https://github.com/simalexan/speechy
javascript speech-recognition voice-commands voice-recognition
Last synced: 4 months ago
JSON representation
Voice command tool for an easy web speech recognition for your web application. In "Minority Report" style
- Host: GitHub
- URL: https://github.com/simalexan/speechy
- Owner: simalexan
- Created: 2017-08-01T09:47:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-23T10:37:19.000Z (almost 8 years ago)
- Last Synced: 2025-01-31T07:51:26.395Z (5 months ago)
- Topics: javascript, speech-recognition, voice-commands, voice-recognition
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Speechy
_Speechy_ helps you connect your application entities and their pages to your users voice. It simplifies the recognition workflows, as it focuses you on basic sentence constructs - **verbs**, **nouns** and **attributes**. Using sentence constructs, you can easily lead the user to the wanted page, product or even product list without typing and clicking -- in Minority Report style.
### Important note!
Speechy is a wrapper around Web speech API -- to ease up building speech recognition for your frontend app. Currently, the only browsers which have implemented that feature, are Chrome, along with its Chrome Mobile and Samsung.
## How does it work
_Example request:_
1. Double press the button **S** on your keyboard
2. Say:`Open a user with id 45`
_Example response:_
```javascript
{
verb: 'open'
noun: 'user',
attribute: {
name: 'id',
type: 'number',
value: '5'
},
isConstructed: true
}
```With this response, you can, for example, lead the user to your to page `/users/5`
In case of a wrong pronunciation or undetected verbs/nouns, you would just get
```javascript
{
isConstructed: false
}
```## Usage
Setup is easy! Its just 4 easy steps
1. Include `speechy.js` as a dependency (whichever way you want)
2. Set the *language*, *verbs*, *noun* and *attributes* you want to detect:```javascript
var language = 'en-US';var verbs = [
'open',
'get',
'show',
'give',
'want',
'need'
];var nouns = [
'user',
'product'
];var attributes = [
{ name: 'id', type: 'number' },
{ name: 'list' }
];var cancelPhrase = 'stop';
```3. Set the **required** handler for the construct before initializing Speechy
```javascript
Speechy.onConstructParsed = function (construct){
console.log(construct); // do whatever you like with the received construct
};
```4. Initialize Speechy with the constructs:
`Speechy.init(language, verbs, nouns, attributes, cancelPhrase);`
Double press S and voila!
### Supported languages
[Click to see supported languages](supported-languages.json)