# angular-easy-voice

> Is a voice command library.

Latest version **2.0.2** (published 2017-03-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install angular-easy-voice
pnpm add angular-easy-voice
yarn add angular-easy-voice
bun add angular-easy-voice
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2017-03-29 |
| First published | 2017-03-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | mateusmiranda |

## Links

- npm: https://www.npmjs.com/package/angular-easy-voice
- npm.io page: https://npm.io/package/angular-easy-voice

## Dependencies (2)

- [angular](https://npm.io/package/angular.md) ^1.6.0
- [angular-ui-router](https://npm.io/package/angular-ui-router.md) ^0.3.2

## Recent versions

- 2.0.2 (latest) — 2017-03-29
- 2.0.1 — 2017-03-29

## README

# Angular Easy Voice

Is a voice command library.

## Installation
```html
bower install angular-easy-voice --save
```

## Add dependencies to the <head> section of your main html:
```html
<script src="bower_components/angular-easy-voice/dist/EasyVoice.min.js"></script>
```

## 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.

---
_Source: https://npm.io/package/angular-easy-voice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
