Voice Commands is an app that allows you to execute actions in Liferay using your voice. The portal admin can configure those voice commands. This app requires access to your computer microphone.
The app uses the Web Speech API which currently is only supported by Google Chrome version 25 or later. If the browser does not support the Web Speech API then the microphone icon is hidden.
Allowing access to computers microphones is a sensitive action and browsers recognize that. By default if a non HTTPS page tries to access your microphone the browser will request your permission. The problem is that each time your web page is refreshed, your browser will request your permission again. That can become tedious. If you want to avoid that, you can configure your server to support SSL. Now when a HTTPS page wants to access your microphone, the browser will request your permission, but this time it is going to remember your choice and won't ask you again each time your web page is refreshed. For that reason we recommend you to access this app using HTTPS.
The Voice Commands plugins consist of two different plugins one hook "voice-commands-hook" and one portlet "voice-commands-portlet". The installation steps are as follow:
- HTTPS Server Configuration (optional, but recommended).
- Obtain the Voice commands manager app from the Liferay Marketplace.
- Deploy the app in your existing Liferay installation. If you haven’s installed Liferay, please download and follow the instructions to do so.
- Go to Control Panel -> Configuration.
- Click “Voice Command”.
- Add your commands.
HTTPS Server Configuration
$Tomcat\bin>keytool -genkey -alias keyspeech -keyalg RSA -keystore keyspeech.ks
and fill the certificate’s detail.
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
web.server.http.port=80 # Or any other port like 8080
web.server.https.port=443 # Or any other port like 8443
How to use
Voice Commands uses the Web Speech API which currently is only supported by Google Chrome browser version 25 or later. When the browser does not support the Web Speech API the microphone icon is hidden.
Add your commands
Add every command that you need in "Voice Commands" option.
Then click "Add" button and add your commands
The first text field "Key phrase" is first phrase the user must to say when she/he wants to execute a command. Example: 'Go to' create user. This value is optional.
The second text field "Voice command" is the phrase the user must to say after the "Key phrase" if it exists. Example: Go to 'create user'. If the "Key phrase" does not exist, the user just need to say the phrase "create user" to execute the command.
And the last text field "URL" or "Command Value" is the URL where the user will be redirected after saying ['KEY PHRASE'] + 'VOICE COMMAND'.
Using Voice Commands
After the commands have been added, you can start executing them with your voice, by clicking the microphone icon on the dockbar. After you do that, the browser will request your permission to use your computer microphone.
If you allow the browser to use the microphone you will see one more icon next to bookmarks star in your browser .
and the microphone icon will look like this
If you can see the red microphone icon (after you clicked it) but it doesn't seem to recognize your voice, make sure your browser is using the correct input by selecting the correct one as shown in the following image:
The latest source code is located at the following location:
We welcome feature/bug reports concerning the Voice Commands. Discussion helps to clarify the ways the app can be used and also helps define directions for future development. Please post your concerns at http://issues.rivetlogic.com/browse/LRA
New feature: Help page.