I set it up through the official Google Assistant tutorial document.
: https://developers.google.com/assistant/sdk/guides/library/python/embed/setup
To use Respeak module, you should input below in raspberry pi terminal.

git clone https://github.com/respeaker/seeed-voicecard.git cd seeed-voicecard sudo ./install.sh
Configure and Test the Audio
To verify that the speaker and microphone work well on the Raspberry Pi, you need to test the following with the speaker and microphone connected to the Raspberry Pi.
- Find your recording and playback devices.
a. Locate your USB microphone in the list of capture hardware devices. Write down the card number and device number.
$ arecord -l
b. Locate your speaker in the list of playback hardware devices. Write down the card number and device number. Note that the 3.5mm-jack is typically labeled Analog
or bcm2835 ALSA
(not bcm2835 IEC958/HDMI
).
$ aplay -l
2. Create a new file named .asoundrc
in the home directory (/home/pi
). Make sure it has the right slave definitions for microphone and speaker; use the configuration below but replace <card number>
and <device number>
with the numbers you wrote down in the previous step. Do this for both pcm.mic
and pcm.speaker
.
pcm.!default { type asym capture.pcm "mic" playback.pcm "speaker" } pcm.mic { type plug slave { pcm "hw:<card number>,<device number>" } } pcm.speaker { type plug slave { pcm "hw:<card number>,<device number>" } }
3. Verify that recording and playback work:
a. Adjust the playback volume.
$ alsamixer

Press the up arrow key to set the playback volume level to around 70.
b. Play a test sound (this will be a person speaking). Press Ctrl+C when done. If you don’t hear anything when you run this, check your speaker connection.
$ speaker-test -t wav
c. Record a short audio clip.
$ arecord --format=S16_LE --duration=5 --rate=16000 --file-type=raw out.raw
d. Check the recording by replaying it. If you don’t hear anything, you may need to check the recording volume in alsamixer
.
$ aplay --format=S16_LE --rate=16000 out.raw
If the microphone and speaker are not properly connected, the microphone and speaker will not work in the above test.
Configure an Actions Console project
Access the Google Console: https://console.actions.google.com
Add project: Click “Add/import project”



Do not press the large three buttons shown above on this site, but in the small text below, “Are you looking for device registration?” Click on the phrase.
Activation Google Assitant API
Next, go to the Google APIs Developers link below and go to the project to activate the Google API. : https://console.developers.google.com/apis


Return to the Google Console, create a model and click the REGISTER MODEL button. Here, Product name, Manufacturer name, and Device type can be set arbitrarily.


I typed below.

Download credentials
And this is very “important”, I download the OAuth 2.0 file. You will need it later for authentication of Google API and Raspberry Pi.
The developers homepage says: The client_secret_.json file must be located on the device. This file contains a client ID and client secret, but no access token. Later, you will run an authorization tool and reference this file in order to authorize the Google Assistant SDK sample to make Google Assistant queries (see the OAuth 2.0 documentation for more information). Do not rename this file.





