If you've played with the TensorFlow Lite microspeech model, you will quickly get a little tired of the same word pairs that it comes with. There's just so much yes/no before you want to create your own wake/watch words!

This guide will show you how to setup your own Open Speech Recording website, just like the one Pete Warden used to collect all the words in the speech data set

If you don't already have a google cloud account, visit https://cloud.google.com/ to make an account and sign up for the free trial - you will not end up needing to pay for the amount of storage/compute this project requires.

Under GCP (Google Cloud Platform), make a new project

Check the project is made in your project list!

Next up, create a new GCP Cloud Storage bucket to store all the audio files! Select the existing project you've made

Next up, create a new GCP Cloud Storage bucket to store all the audio files! Select the existing project you've made

Pick a bucket name, we used the project name with -output at the end

For ACL, we set bucket-level access control

Finally make it Multi-regional (default)

Finally, your bucket exists, and we can keep going

Install Google Cloud SDK

Download the Google Cloud SDK, and install it.

Open up a terminal and run gcloud init

Log into the browser window that pops up

And grant permissions

After you're authenticated, the SDK will ask you to pick the project you want to work on

You'll next be asked to pick a region, for this kinda project it doesn't matter where you pick so go with whatever is close to you.

Finally, you're configured!

Configure Software

Fork/clone the https://github.com/petewarden/open-speech-recording/ repository to your local computer, and go to that directory in your terminal

Edit your local copy of app.yaml in the repo, change the cloud storage bucket to match the name you made earlier. For session secret key generate a random hex string. It's used to authenticate the session, and has nothing to do with the bucket authentication.

Edit static/scripts/app.js and find the wantedWords and fillerWords arrays and change them to whatever words you want to prompt for

Finally, run pip install -t lib -r requirements.txt

Local Deploy & Test

Before you upload up to GCP you can run the project locally! Run dev_appserver.py from within the project folder

Due to my kinda messed up Python2/3 setup, I had to manually run dev_appserver.py but either way, install the components

Install the extensions as prompted, and if necessary, rerun the appserver script, and permit Python2 access to the network

Open up a browser and visit http://localhost:8080/ to see the server setup, you should have an instance running

Click on default to load the website...it should look like this!

Deploy & Test

From the directory, in terminal, run gcloud app deploy. The first time you run it you'll be asked to setup the region

Select your local region

Type Y to continue the deployment!

Finally, visit the URL in question or just type gcloud app browse

The site is now live!

Check Recordings

After you use the open recording app, visit the output bucket you made, you should see many ogg files one for each utterance

This guide was first published on Aug 05, 2019. It was last updated on Aug 05, 2019.