Web Component that allows you to pass forward/backward slides using Speech Recognition API.
Install the component using Bower:
$ bower install slide-chimp --save
-
Import Web Components polyfill:
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
-
Import Custom Element:
<link rel="import" href="bower_components/slide-chimp/slide-chimp.html">
-
Start using it!
<slide-chimp auto forward="next, go, change, forward" backward="back, previous, back one slide"></slide-chimp>
Attribute | Options | Default | Description |
---|---|---|---|
auto |
boolean | false |
Specifies if the API speech should started when page loads. |
forward |
string | undefined |
Specifies the list of the words separated by comma to pass slides forward. |
backward |
string | undefined |
Specifies the list of the words separated by comma to pass slides backward. |
text |
string | undefined |
Stores the string of the recognized text. |
language |
string | en_US |
Specifies the language to be reconized. |
Method | Parameters | Returns | Description |
---|---|---|---|
start() |
None. | Nothing | Triggers the voice-elements to be played. |
stop() |
None. | Nothing | Triggers the voice-elements to be stoped. |
Event | Description |
---|---|
forward |
Triggers when the slide-chimp matchs word(s) defined in foward with speech recognition. |
backward |
Triggers when the slide-chimp matchs word(s) defined in backward with speech recognition. |
In order to run it locally you'll need to fetch some dependencies and a basic server setup.
-
$ [sudo] npm install -g bower polyserve
-
Install local dependencies:
$ bower install && npm install
-
Polyserve:
$ polyserver Starting Polyserve on port 8080 Files in this directory are available under http://localhost:8080/components/slide-chimp/
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature-or-fix
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature-or-fix
- Submit a pull request :P
For detailed changelog, check Releases.