Skip to main content
Version: 1.0.0-beta.5

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 Variables#

The environment variables included in the following table can be found in the .env file located at the project root directory.

VariableDescriptionValues
LEON_LANGLeon's language and his understanding. If you change the language, run: npm run train expressions.en-US (default); fr-FR
LEON_NODE_ENVEnvironment.development (default); production; testing
LEON_HOSTLeon's host. Use your machine IP address to access Leon from the outside.http://localhost (default)
LEON_PORTLeon's port.1337 (default)
LEON_TIME_ZONELeon's time zone.Your current time zone (default); Moment Timezone
LEON_AFTER_SPEECHEnable/disable auto listening after talking. No need to say Leon when you have talked once.true; false (default)
LEON_STTEnable/disable STT.true; false (default)
LEON_STT_PROVIDERSTT provider.deepspeech (default); google-cloud-stt; watson-stt
LEON_TTSEnable/disable TTS.true; false (default)
LEON_TTS_PROVIDERTTS provider.flite (default); google-cloud-tts; amazon-polly; watson-tts
LEON_LOGGEREnable/disable collaborative logger.true (default); false
PIPENV_PIPFILEPipfile path. Do not touch it unless you know what you are doing.bridges/python/Pipfile (default)
PIPENV_VENV_IN_PROJECTCreate the virtualenv at the same level as the Pipfile. Do not touch it unless you know what you are doing.true (default)

Voice#

Leon 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.

Offline#

Please follow this section.

Amazon#

Amazon Polly (TTS)#

  1. Create a new IAM user on the AWS console. Choose a User name and in the Access type section, check Programmatic access. Then click Next.
  2. In the permissions section, use the Attach existing policies directly option and search for Polly. Then check the AmazonPollyFullAccess item. Then click Next (and skip the tag section).
  3. Hit the Create user button.
  4. You can see the Access key ID and you can also display the Secret access key. Copy both of them and paste them to the server/src/config/voice/amazon.json Leon's file.

Google Cloud#

When using this provider, the credentials are the same for the STT and TTS.

Google Cloud STT & Google Cloud TTS#

  1. Create or select a project on the GCP (Google Cloud Platform).
  2. Enable the STT API and/or the TTS API.
  3. Create a service account key.
  4. Download the JSON file and copy its content to the: server/src/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.

Watson#

IBM Watson has credentials for each STT service and each TTS service.

Watson STT#

  1. Click here to create a Speech to Text service.
  2. Click on Create (or Sign up to Create if you do not have an account yet).
  3. Click on Service credentials in the left menu, then expand the generated service credential or create a new one.
  4. Copy apikey and url, then paste them to the following Leon's file: server/src/config/voice/watson-stt.json.

Watson TTS#

  1. Click here to create a Text to Speech service.
  2. Click on Create (or Sign up to Create if you do not have an account yet).
  3. Click on Service credentials in the left menu, then expand the generated service credential or create a new one.
  4. Copy API Key and URL, then paste them to the following Leon's file: server/src/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: server/src/config/voice/watson-stt.json and server/src/config/voice/watson-tts.json.

Synchronizer#

If 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.

MethodDescription
directSynchronize content on your current device.
google-driveSynchronize content on Google Drive.

Direct#

"synchronization": {
"enabled": true,
"method": "direct",
"email": ""
}

packages/{PACKAGE NAME}/config/config.json

Google Drive#

  1. Create or select a project on the GCP (Google Cloud Platform).
  2. Enable the Google Drive API.
  3. Create a service account key.
  4. Download the JSON file and copy its content to the: server/src/config/synchronizer/google-drive.json Leon's file.
"synchronization": {
"enabled": true,
"method": "google-drive",
"email": "{YOUR GOOGLE EMAIL ADDRESS}"
}

packages/{PACKAGE NAME}/config/config.json

An email is sent to this email address once Leon has synchronized your content on your Google Drive.