Socket
Socket
Sign inDemoInstall

angular-easy-voice

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-easy-voice

Is a voice command library.


Version published
Maintainers
1
Install size
2.65 MB
Created

Readme

Source

Angular Easy Voice

Is a voice command library.

Installation

bower install angular-easy-voice --save

Add dependencies to the section of your main html:

<script src="bower_components/angular-easy-voice/dist/EasyVoice.min.js"></script>

Add module

MODULE NAME: 'angular-easy-voice';

angular.module('myApp', ['angular-easy-voice'])
       .controller('myCtrl', function('$scope', EasyVoice){
              console.log(EasyVoice);
         });

Basic usage

// 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

EasyVoice.stopWatch();

Example Simple Command

EasyVoice.addCommand('hello', function(){
    console.log('hello my friend!');
});

##Example Start-based command

//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

  //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

  EasyVoice.addWord("Gumga");  // or ["Gumga", "Other"]

#Translate

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.

FAQs

Last updated on 29 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc