Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateusmirandaalmeida/angular-easy-voice
A library for voice commands
https://github.com/mateusmirandaalmeida/angular-easy-voice
command-voice control-voice user-voice voice voice-recognition
Last synced: 18 days ago
JSON representation
A library for voice commands
- Host: GitHub
- URL: https://github.com/mateusmirandaalmeida/angular-easy-voice
- Owner: mateusmirandaalmeida
- Created: 2016-12-09T18:49:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-09T13:35:10.000Z (over 7 years ago)
- Last Synced: 2024-11-10T16:17:40.132Z (about 1 month ago)
- Topics: command-voice, control-voice, user-voice, voice, voice-recognition
- Language: JavaScript
- Homepage:
- Size: 35.2 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Easy Voice
Is a voice command library.
## Installation
```html
bower install angular-easy-voice --save
```## Add dependencies to the section of your main html:
```html```
## Add module
```javascript
MODULE NAME: 'angular-easy-voice';angular.module('myApp', ['angular-easy-voice'])
.controller('myCtrl', function('$scope', EasyVoice){
console.log(EasyVoice);
});
```
## Basic usage
```javascript
// The first parameter is the phrase that will turn on the voice command.
EasyVoice.initWatch('Ok Google', {
lang: 'pt-BR', // language is optional, default: 'en-US'
debug: false // Shows the user's speech
}, false); // true or false to come active
```
## Stop
```javascript
EasyVoice.stopWatch();
```
## Example Simple Command
```javascript
EasyVoice.addCommand('hello', function(){
console.log('hello my friend!');
});
```
##Example Start-based command
```javascript
//Command will be executed when the user phrase starts with "Search people"
EasyVoice.addCommandStartingWith('Search people', function(text){
console.log(text) // Whole text
});
```
## Example Speech
```javascript
//The first parameter is speech, The second parameter is the language
// language is optional, default: 'en-US'
EasyVoice.reproduce('Hello my friend.', 'en-US');
```#Add words
```javascript
EasyVoice.addWord("Gumga"); // or ["Gumga", "Other"]
```
#Translate
```javascript
EasyVoice.setTranslate({
speakNow: 'Speak Now',
notUnderstand : 'Not understand.',
tryAgain : 'Try again.',
checkMicrophone: 'Please, check your microphone.',
listening: 'listening...'
});
```
## Installation of dependencies for use or development
```
npm install
```
## Tasks
Run the task 'npm run dev' for the development.
Run the task 'npm run prod' generating the minified file.