- Futura
DEBUG
(bool): Enable debug mode. Default:False
USERNAME
(str): Username for the Smart Mirror. Default:User
ENABLE_ASSISTANT
(bool): Enable Google Assistant. Default:True
CREDENTIALS_PATH
(str): Path to the Google Assistant credentials file. Default:~/.config/google-oauthlib-tool/credentials.json
ASSISTANT_TRIGGER
(bool): Enable Google Assistant trigger word. Default:True
- Setup Python virtual environment and install requirements:
# Create new environment file from existing .env.sample
$ cp .env.sample .env
# Setup python virtual environment and activate it
$ python -m venv venv
$ source venv/bin/activate
# Install requirements
$ pip install -r requirements.txt
$ sudo apt-get install portaudio19-dev libffi-dev libssl-dev # Optional for Google Assistant
-
Follow the steps to configure the Actions Console project and the Google account. (optional)
-
Follow the steps to register a new device model and download the client secrets file. (optional)
-
Generate device credentials using
google-oauthlib-tool
: (optional)
google-oauthlib-tool --client-secrets path/to/client_secret<client-id>.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save
- Run the code:
python main.py
-
AttributeError: 'array.array' object has no attribute 'tostring'
:- Solution: Go to the file where you get this error, its called
audio_helpers
which is part of the Google Assistant SDK. Replace thetostring()
method withtobytes()
at line 57.
- Solution: Go to the file where you get this error, its called
-
from tenacity.async import AsyncRetrying
(SyntaxError: invalid syntax
):- Solution: Upgrade the
tenacity
package to the latest version.pip install --upgrade tenacity
- Solution: Upgrade the
-
TypeError: Descriptors cannot be created directly.
:If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
- Solution: Downgrade the
protobuf
package to version3.20.x
or lower.pip install protobuf==3.20.0
- Solution: Downgrade the