Thumbnail

Google Speech Recognition

Use the online Google Speech Recognition Service (test beta)

+ How To Add This Control To Your Project (Click to Expand)
  1. Make sure you have the latest version of ARC installed.
  2. Select the Get button in this page to download the archive file.
  3. Double click the downloaded archive file to execute installer.
  4. The installer will add this control to ARC.
  5. Load ARC and press the Project -> Add Control button from the menu.
  6. Choose the Audio category tab.
  7. Press the Google Speech Recognition icon to add the control to your project.

Manual

This skill is a test for the Google Speech Service with ARC. There is some configuration necessary for testing this skill, as the Google Speech Service is paid and not free. There is a 60 day trial, which you can sign up for. This skill requires internet access, so if an I/O controller is also being used a second WiFi connection, wired network or direct UART connection to the PC is needed.

Main Window


User-inserted image


1. Load Credentials Button
This opens the location of your Google speech recognition key (.json) file. Browse to find it's location.

2. Start Recording Button
This activates Google speech recognition which will then listen for words and respond accordingly.

3. Visual Feedback Waveform
This visually displays the peaks and valleys of the detected frequency. It also shows you if your default recording device is working properly.

4. Response Field
This is where Google speech recognition will respond with its text-based response.

Configuration


User-inserted image


1. Response Script 
A response script can be activated when certain words are detected.

2. Variable Name
Here you can change the variable name for the detected words.

How to Use the Google Speech Recognition Skill


If you wish to use this skill with PandoraBot, you can send the detected speech to the PandoraBot control using the ControlCommand(). For example, you will add both a PandoraBot control and this Google Speech skill to your project.

Don't forget to PAUSE the PandoraBot skill so it doesn't attempt to pickup any audio! We will only be using the Google Speech skill for audio, so the PandoraBot skill can be PAUSED. It will receive speech phrases by the ControlCommand() from the Google Speech response script.

Your project would resemble this...
User-inserted image


Now you can edit the Google Speech skill and add this code to the response script which will send the detected speech to the PandoraBot:

Code:


ControlCommand("PandoraBot", SetPhrase, $GoogleSpeech)


The configuration would look like the following image. This will send all received data from the Google Speech skill to the PandoraBot skill.
User-inserted image



Configuring Google Services For Credentials
These instructions only provide some assistance. Google has their own support if you need assistance Generating a JSON Service Account Key. We have provided some information below.

*Disclaimer: Google's web config is an absolute frustrating experience with outdated documentation and hidden menu options. It's easy to get lost. Venture forward at your own risk:)

1) To start, visit https://cloud.google.com/speech/ and select Free Trial
User-inserted image


2) From there, you will need to create credentials
User-inserted image


3) Configure the Google Cloud Speech API when adding credentials
User-inserted image


4) Now create a new credential to get a Service Account Key
User-inserted image


5) Select the Service Account that you had already created earlier and choose JSON
User-inserted image


6) A JSON file will download automatically. This is the file that you will load in this skill for authentication before it will work. So save it somewhere useful that you can find in the future. Your Downloads Folder is probably not the best place...
User-inserted image


Enable Billing
You will need to enable billing, if you get an error that billing is not enabled. Here is assistance link from google: https://support.google.com/cloud/answer/6293499?hl=en

A credit card is necessary for Google's service. However, they won't charge you after the 60 day trial.
User-inserted image


Requirements


An internet connection is required to access Google's speech recognition database.

Resources


Here's an example project: testgooglespeech.EZB

#1  
Hi,

I am using "Google Speech Recognition" It works fine. But I couldn't find a way to Start and Stop "Recording" from the code. How this can be done programmatically.

It looks like I need to press "Start Recording " / "Stop Recording "  manually.

Is there any way to manage this from the script for "Google Speech Recognition)
PRO MEMBER
Synthiam
#2   — Edited
What does the Cheat Sheet say? I think there's a PAUSE command. Take a look, otherwise I can add something.
United Kingdom
#3  
I get an error in EZB when loading my .json credentials which begins 'please check the value of the environmental variable GOOGLE_APPLICATION_CREDENTIALS' could Google have changed the format of their API key files?
PRO MEMBER
Synthiam
#4  
Sure could have - I’ll take a look
#5  
hi. so when i load my credentials into the project it says this:
"This file must be in the root folder of this plugin. Also, if it is already in the same folder, the DLL filename and the assembly name may be different. To correct this error, either ensure the file is in the root folder of the plugin, or rename the DLL to the assembly name as presented here in this error."


can you help?