Configuration
This section helps you to configure options such as giving Leon a voice, understand your voice, etc.
Warning
These files should stay on your machine, never push them to a remote repository. By default, they are already being ignored thanks to the .gitignore
file.
#
Environment VariablesThe environment variables included in the following table can be found in the .env
file located at the project root directory.
Variable | Description | Values |
---|---|---|
LEON_LANG | Leon's language and his understanding. If you change the language, run: npm run train expressions . | en-US (default); fr-FR |
LEON_NODE_ENV | Environment. | development (default); production ; testing |
LEON_HOST | Leon's host. Use your machine IP address to access Leon from the outside. | http://localhost (default) |
LEON_PORT | Leon's port. | 1337 (default) |
LEON_TIME_ZONE | Leon's time zone. | Your current time zone (default); Moment Timezone |
LEON_AFTER_SPEECH | Enable/disable auto listening after talking. No need to say Leon when you have talked once. | true ; false (default) |
LEON_STT | Enable/disable STT. | true ; false (default) |
LEON_STT_PROVIDER | STT provider. | coqui-stt (default); google-cloud-stt ; watson-stt |
LEON_TTS | Enable/disable TTS. | true ; false (default) |
LEON_TTS_PROVIDER | TTS provider. | flite (default); google-cloud-tts ; amazon-polly ; watson-tts |
LEON_LOGGER | Enable/disable collaborative logger. | true (default); false |
PIPENV_PIPFILE | Pipfile path. Do not touch it unless you know what you are doing. | bridges/python/Pipfile (default) |
PIPENV_VENV_IN_PROJECT | Create the virtualenv at the same level as the Pipfile. Do not touch it unless you know what you are doing. | true (default) |
#
VoiceLeon has multiple providers for his STT and TTS. You can configure one (or several) and choose your favorite.
Tip
To enable the Leon's STT and/or Leon's TTS, in your .env
file, you need to set LEON_STT=true
and/or LEON_TTS=true
.
Also, you need to inquire the provider by setting LEON_STT_PROVIDER={YOUR STT CHOSEN PROVIDER}
and/or LEON_TTS_PROVIDER={YOUR TTS CHOSEN PROVIDER}
.
Please see the environment variables section to know the providers values.
#
OfflinePlease follow this section.
#
Amazon#
Amazon Polly (TTS)- Create a new IAM user on the AWS console. Choose a
User name
and in theAccess type
section, checkProgrammatic access
. Then clickNext
. - In the permissions section, use the
Attach existing policies directly
option and search forPolly
. Then check theAmazonPollyFullAccess
item. Then clickNext
(and skip the tag section). - Hit the
Create user
button. - You can see the
Access key ID
and you can also display theSecret access key
. Copy both of them and paste them to thecore/config/voice/amazon.json
Leon's file.
#
Google CloudWhen using this provider, the credentials are the same for the STT and TTS.
#
Google Cloud STT & Google Cloud TTS- Create or select a project on the GCP (Google Cloud Platform).
- Enable the STT API and/or the TTS API.
- Create a service account key.
- Download the JSON file and copy its content to the:
core/config/voice/google-cloud.json
Leon's file.
Tip
The GOOGLE_APPLICATION_CREDENTIALS
environment variable is used by Google to load the credentials.
Leon creates and set the value of this environment variable for you.
#
WatsonIBM Watson has credentials for each STT service and each TTS service.
#
Watson STT- Click here to create a Speech to Text service.
- Click on
Create
(orSign up to Create
if you do not have an account yet). - Click on
Service credentials
in the left menu, then expand the generated service credential or create a new one. - Copy
apikey
andurl
, then paste them to the following Leon's file:core/config/voice/watson-stt.json
.
#
Watson TTS- Click here to create a Text to Speech service.
- Click on
Create
(orSign up to Create
if you do not have an account yet). - Click on
Service credentials
in the left menu, then expand the generated service credential or create a new one. - Copy
API Key
andURL
, then paste them to the following Leon's file:core/config/voice/watson-tts.json
.
Tip
If you are using a version below 1.0.0-beta.4
, from the step 3. do: Click on Manage
in the left menu, then on Show Credentials
; copy API Key
and URL
, then paste them to the respected Leon's files: core/config/voice/watson-stt.json
and core/config/voice/watson-tts.json
.
#
SynchronizerIf a module has this option, once the module has been processed, you can synchronize your content via different methods.
E.g. the YouTube module of the Video Downloader Package allows you to synchronize your downloaded videos on your Google Drive account or on your current device.
Tip
To see if a module has this option, simply check the settings via this file: packages/{PACKAGE NAME}/config/config.json
.
In that file, set the enabled
key to true
to enable the synchronizer for this specific module.
Method | Description |
---|---|
direct | Synchronize content on your current device. |
google-drive | Synchronize content on Google Drive. |
#
Direct
packages/{PACKAGE NAME}/config/config.json
#
Google Drive- Create or select a project on the GCP (Google Cloud Platform).
- Enable the Google Drive API.
- Create a service account key.
- Download the JSON file and copy its content to the:
server/src/config/synchronizer/google-drive.json
Leon's file.
packages/{PACKAGE NAME}/config/config.json
An email is sent to this email address once Leon has synchronized your content on your Google Drive.