Skip to content

sdetweil/wyoming-google

Repository files navigation

Wyoming Google Streaming

Wyoming protocol server for the google-streaming speech to text system.

Home Assistant Add-on

Show add-on

not yet (Jan 19, 2024)

Source

Local Install

Clone the repository and set up Python virtual environment:

git clone https://github.com/sdetweil/wyoming-google.git
cd wyoming-google
script/setup

create the Google api Credentials file

See the section further down in this readme

test run the speech to text using the microphon on this machine

execute the command

test/run_mic2google.sh

this will take microphone audio and process it for text, and print out the text of the spoken words
this confirms that the api is enabled, the billing account is setup and the service account
credentials file is in the right place for these tests.

Start a server

test/run_test_server 

run a test recognize, using two pre-recorded wav files

test/wave2text.sh

this should produce this output from the 2 separate wav files

testing testing testing testing
this is a test this is a test sometimes this is a test

Docker Image

to create a local docker image for testing do

dockerbuild/makeit

this will build 3 images

  • AMD64
  • ARM64/aarch64
  • arm32 (arm7l)

to run the docker image for this platform, do

docker run -it -p 10555:10555 -v /path_to_credentials_folder:/config rhasspy/wyoming-google 

or

make -F dockerbuild/Makefile  run

[Source] this Wyoming extension is hosted at https://github/com/sdetweil/wyoming-goole

creating the Google api Credentials file

open the Cloud Console main page

you must create a billing account, for charging any usage overages.
select the billing topic from the hamburger menu next to Google Cloud
see https://cloud.google.com/speech-to-text/pricing for current plans and pricing

click the Projects dropdown, and dialog will open, with New Project in the top right to create a new project, or select an existing project from the list main page Click NEW PROJECT main page billing required popup main page Enable billing for your project.
Select the billing account you created above main page

[Enable the Cloud Speech API.]
push the Apis and Services button main page apis landing page main page then enter speech in the search box
click search

ENABLE THE API - For more info see Cloud Speech API Pricing (for normal usage it will be free) main page click ENABLE main page

Create a new service account, click IAM and Services in the hamburger menu next to Google CLoud
click Service Accounts
main page click Create service accounnt enter a service account name that will be memorable for you
and description if you want
click DONE

select the Credentials link in the APIs and services menu entry (from the hamburger menu next to Google Cloud) main page

click CREATE CREDENTIALS and select Service Account (this gives you background callable usage of the enabled apis) click the name of the service account you just created
main page

click the KEYS tab main page click add key

main page click JSON

click CREATE
this will open the save as dialog to allow you to download and save the json file locally

place the generated file into the wyoming-google/config folder as credentials.json

the name MUST to be credentials.json

note:

you cannot download the same credentials file again.
you can create a NEW key and get a NEW file, only.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published