Skip to content

Commit

Permalink
Merge branch 'rocketbear27-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TalAter committed Feb 22, 2019
2 parents 7318420 + d0a113f commit 30cb1fe
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 49 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A lot of annyang's functionality came from pull requests sent over GitHub. Here
:bulb: A great alternative to repeatedly running `$ grunt` is to run `$ grunt watch` once, and leave this process running. It will continuously run all the tests and build the files every time you make a change to one of annyang's files. It will even *beep* if you make an error, and help you debug it. :+1:
- [x] You can run a local server to test your work in the browser by running `$ grunt dev`. This will also automatically run `$ grunt watch` for you.
Point your browser to `https://localhost:8443/demo/` to see the demo page.
Since it's using self-signed certificate, you might need to click *"Proceed Anyway"*.
Since it's using a self-signed certificate, you might need to click *"Proceed Anyway"*.
- [x] Before committing your changes, the last step must always be running `$ grunt`. This makes sure everything works, and all files are kept up to date with your changes.
- [x] Once you've made sure all your changes work correctly and have been committed, push your local changes back to github with `$ git push -u origin master`
- [x] Visit your fork on GitHub.com ([https://github.com/YOUR-USER-NAME/annyang](https://github.com/YOUR-USER-NAME/annyang)) and create a pull request for your changes.
Expand All @@ -50,7 +50,7 @@ annyang is tested using [Jasmine](http://jasmine.github.io/2.0/introduction.html
Please include tests for any changes you make:
* If you found a bug, please write a test that fails because of that bug, then fix the bug so that the test passes.
* If you are adding a new feature, write tests that thoroughly test every possible use of your code.
* If you are changing existing functionality, make sure to update existing tests so they pass. (This is a last resort. Whenever possible try to maintain backwards compatibility)
* If you are changing existing functionality, make sure to update existing tests so they pass. (This is a last resort move. Whenever possible try to maintain backward compatibility)

The tests reside in *BasicSpec.js*. The file contains a series of spec groups (e.g. `describe('a spec group', function() {});`) which each contain 1 or more specs (e.g. `it('should do stuff', function() {});`). Some of the spec groups also contain some code which runs before each spec (`beforeEach(function() {});`).

Expand All @@ -70,6 +70,6 @@ Explain the problem and include additional details to help maintainers reproduce

### Feature Requests and Ideas

We track discussions of new features, proposed changes and other ideas as [GitHub issues](https://github.com/TalAter/annyang/issues). If you would like to discuss one of those, please first look through existing open and closed [GitHub issues](https://github.com/TalAter/annyang/issues?q=is%3Aissue) and see if there is already a discussion on this topic which you can join. If there isn't, please open a [new issue](https://github.com/TalAter/annyang/issues/new).
We track discussions of new features, proposed changes, and other ideas as [GitHub issues](https://github.com/TalAter/annyang/issues). If you would like to discuss one of those, please first look through existing open and closed [GitHub issues](https://github.com/TalAter/annyang/issues?q=is%3Aissue) and see if there is already a discussion on this topic which you can join. If there isn't, please open a [new issue](https://github.com/TalAter/annyang/issues/new).

When discussing new ideas or proposing changes, please take the time to be as descriptive as possible about the topic at hand. Please take the time to explain the issue you are facing, or the problem you propose to solve in as much detail as possible.
28 changes: 14 additions & 14 deletions dist/annyang.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/annyang.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Another possible reason for this might be that you are offline.

## Can annyang work offline?

No. annyang relies on the browser's own speech recognition engine. In Chrome, this engine performs the recognition in the cloud.
No. annyang relies on the browser's own speech recognition engine. In Chrome, this engine performs recognition in the cloud.

## Which browsers are supported?

Expand Down Expand Up @@ -207,11 +207,11 @@ annyang.addCallback('result', function() {

## Can annyang be used in Chromium or Electron?

Yes, however you must create your own Chromium keys and are limited to 50 requests/day. To do this you'll need to provide your own keys at runtime by following the instructions for [Acquiring Keys](https://www.chromium.org/developers/how-tos/api-keys) in the Chromium developer docs.
Yes, however, you must create your own Chromium keys and are limited to 50 requests/day. To do this you'll need to provide your own keys at runtime by following the instructions for [Acquiring Keys](https://www.chromium.org/developers/how-tos/api-keys) in the Chromium developer docs.

## Can annyang be used in Cordova?

Yes. In order to use `webKitSpeechRecognition` you will need to use [Crosswalk](https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview) and the [Cordova Media Plugin](https://github.com/apache/cordova-plugin-media). These can be added to an existing cordova project with the following commands:
Yes. In order to use `webKitSpeechRecognition` you will need to use [Crosswalk](https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview) and the [Cordova Media Plugin](https://github.com/apache/cordova-plugin-media). These can be added to an existing Cordova project with the following commands:

```
cordova plugin add cordova-plugin-crosswalk-webview
Expand Down
28 changes: 14 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Start src/annyang.js -->

# Quick Tutorial, Intro and Demos
# Quick Tutorial, Intro, and Demos

The quickest way to get started is to visit the [annyang homepage](https://www.talater.com/annyang/).

Expand Down Expand Up @@ -76,12 +76,12 @@ See: [abort()](#abort)

## resume()

Resumes listening and restores command callback execution when a result matches.
Resumes listening and restore command callback execution when a result matches.
If SpeechRecognition was aborted (stopped), start it.

## debug([newState=true])

Turn on output of debug messages to the console. Ugly, but super-handy!
Turn on the output of debug messages to the console. Ugly, but super-handy!

### Params:

Expand Down Expand Up @@ -119,7 +119,7 @@ See: [Commands Object](#commands-object)

## removeCommands([commandsToRemove])

Remove existing commands. Called with a single phrase, array of phrases, or methodically. Pass no params to remove all commands.
Remove existing commands. Called with a single phrase, an array of phrases, or methodically. Pass no params to remove all commands.

#### Examples:
````javascript
Expand Down Expand Up @@ -152,31 +152,31 @@ Add a callback function to be called in case one of the following events happens

This will fire once per Speech Recognition starting. See https://is.gd/annyang_sound_start.

* `error` - Fired when the browser's Speech Recogntion engine returns an error, this generic error callback will be followed by more accurate error callbacks (both will fire if both are defined).
* `error` - Fired when the browser's Speech Recognition engine returns an error, this generic error callback will be followed by more accurate error callbacks (both will fire if both are defined).

Callback function will be called with the error event as the first argument.
The Callback function will be called with the error event as the first argument.

* `errorNetwork` - Fired when Speech Recognition fails because of a network error.

Callback function will be called with the error event as the first argument.
The Callback function will be called with the error event as the first argument.

* `errorPermissionBlocked` - Fired when the browser blocks the permission request to use Speech Recognition.

Callback function will be called with the error event as the first argument.
The Callback function will be called with the error event as the first argument.

* `errorPermissionDenied` - Fired when the user blocks the permission request to use Speech Recognition.

Callback function will be called with the error event as the first argument.
The Callback function will be called with the error event as the first argument.

* `end` - Fired when the browser's Speech Recognition engine stops.

* `result` - Fired as soon as some speech was identified. This generic callback will be followed by either the `resultMatch` or `resultNoMatch` callbacks.

Callback functions for this event will be called with an array of possible phrases the user said as the first argument.
The Callback functions for this event will be called with an array of possible phrases the user said as the first argument.

* `resultMatch` - Fired when annyang was able to match between what the user said and a registered command.

Callback functions for this event will be called with three arguments in the following order:
The Callback functions for this event will be called with three arguments in the following order:

* The phrase the user said that matched a command.
* The command that was matched.
Expand Down Expand Up @@ -269,7 +269,7 @@ Useful in case you want direct access to the browser's Speech Recognition engine
Simulate speech being recognized. This will trigger the same events and behavior as when the Speech Recognition
detects speech.

Can accept either a string containing a single sentence, or an array containing multiple sentences to be checked
Can accept either a string containing a single sentence or an array containing multiple sentences to be checked
in order until one of them matches a command (similar to the way Speech Recognition Alternatives are parsed)

#### Examples:
Expand All @@ -296,7 +296,7 @@ Both the [init()]() and addCommands() methods receive a `commands` object.

annyang understands commands with `named variables`, `splats`, and `optional words`.

* Use `named variables` for one word arguments in your command.
* Use `named variables` for one-word arguments in your command.
* Use `splats` to capture multi-word text at the end of your command (greedy).
* Use `optional words` or phrases to define a part of the command as optional.

Expand All @@ -308,7 +308,7 @@ var commands = {
// e.g. saying "Show me Batman and Robin" will call showFlickr('Batman and Robin');
'show me *tag': showFlickr,
// A named variable is a one word variable, that can fit anywhere in your command.
// A named variable is a one-word variable, that can fit anywhere in your command.
// e.g. saying "calculate October stats" will call calculateStats('October');
'calculate :month stats': calculateStats,
Expand Down
Loading

0 comments on commit 30cb1fe

Please sign in to comment.