Mycroft AI
  • Documentation
  • About Mycroft AI
    • Why use Mycroft AI?
    • Glossary of terms
    • Contributing
    • FAQ
  • Using Mycroft AI
    • Get Mycroft
      • Mark II
        • Mark II Dev Kit
      • Mark 1
      • Picroft
      • Linux
      • Mac OS and Windows with VirtualBox
      • Docker
      • Android
    • Pairing Your Device
    • Basic Commands
    • Installing New Skills
    • Customizations
      • Configuration Manager
      • mycroft.conf
      • Languages
        • Français (French)
        • Deutsch (German)
      • Using a Custom Wake Word
      • Speech-To-Text
      • Text-To-Speech
    • Troubleshooting
      • General Troubleshooting
      • Audio Troubleshooting
      • Wake Word Troubleshooting
      • Log Files
      • Support Skill
      • Getting more support
  • Skill Development
    • Voice User Interface Design Guidelines
      • What can a Skill do?
      • Design Process
      • Voice Assistant Personas
      • Interactions
        • Intents
        • Statements and Prompts
        • Confirmations
      • Conversations
      • Error Handling
      • Example Interaction Script
      • Prototyping
      • Design to Development
    • Development Setup
      • Python Resources
      • Your First Skill
    • Skill Structure
      • Lifecycle Methods
      • Logging
      • Skill Settings
      • Dependencies
        • Manifest.yml
        • Requirements files
      • Filesystem access
      • Skill API
    • Integration Tests
      • Test Steps
      • Scenario Outlines
      • Test Runner
      • Reviewing the Report
      • Adding Custom Steps
      • Old Test System
    • User interaction
      • Intents
        • Padatious Intents
        • Adapt Intents
      • Statements
      • Prompts
      • Parsing Utterances
      • Confirmations
      • Conversational Context
      • Converse
    • Displaying information
      • GUI Framework
      • Show Simple Content
      • Mycroft-GUI on a PC
      • Mark 1 Display
    • Advanced Skill Types
      • Fallback Skill
      • Common Play Framework
      • Common Query Framework
      • Common IoT Framework
    • Mycroft Skills Manager
      • Troubleshooting
    • Marketplace Submission
      • Skills Acceptance Process
        • Information Review Template
        • Code Review Template
        • Functional Review Template
        • Combined Template
      • Skill README.md
    • FAQ
  • Mycroft Technologies
    • Technology Overview
    • Roadmap
    • Mycroft Core
      • MessageBus
      • Message Types
      • Services
        • Enclosure
        • Voice Service
        • Audio Service
        • Skills Service
      • Plugins
        • Audioservice Plugins
        • STT Plugins
        • TTS Plugins
        • Wake Word Plugins
      • Testing
      • Legacy Repo
    • Adapt
      • Adapt Examples
      • Adapt Tutorial
    • Lingua Franca
    • Mimic TTS
      • Mimic 3
      • Mimic 2
      • Mimic 1
      • Mimic Recording Studio
    • Mycroft GUI
      • Remote STT and TTS
    • Mycroft Skills Kit
    • Mycroft Skills Manager
    • Padatious
    • Precise
    • Platforms
Powered by GitBook
On this page
  • Overview
  • 1. Language setting
  • 2. Wake Word
  • 3. Speech to Text (STT)
  • Available STT engines
  • 4. Text to Speech (TTS)
  • Available TTS engines
  • Setting your TTS engine
  • 5. Skills
  • 6. Mycroft Core - Lingua Franca library
  • Example configuration
  • Further languages support

Was this helpful?

  1. Using Mycroft AI
  2. Customizations

Languages

Learn about foreign language support in Mycroft, and how to approach configuring Mycroft to support other languages.

Previousmycroft.confNextFrançais (French)

Last updated 4 years ago

Was this helpful?

In order to support other languages, several components have to be in place in the end to end . Adding language support for Mycroft means that each of those components has to support the new language. This page walks you what has to be done for each of the elements.

At present English is the only officially supported language. Using a language other than English will require at least some editing via the commandline, and likely general troubleshooting. If you are not familiar with Mycroft's configuration files, please see our .

Adding support for a new language is a significant undertaking. It is complex and will require some development and Linux system administration knowledge.

Overview

For Mycroft to be usable in a language we need to look at six components.

  1. : To inform each of the following components which language we are using, we must set our overall language setting.

  2. : When you Speak 'Hey Mycroft, do something', you are invoking a Wake Word. To change your Wake Word to another language, you need to change the Wake Word phrase that is used.

  3. : Mycroft is designed to be modular, so you can choose which Speech to Text engine you use. You need to find and configure a Speech to Text engine for your language.

  4. : Again, Mycroft is designed to be modular, so you can choose which Text to Speech engine you use. You need to find and configure a Text to Speech engine for your language.

  5. : To support a language, a Skill must have vocab and dialog entries for that language.

  6. : To support a new language, mycroft-core needs to have supporting files added to the .

1. Language setting

Your primary language is set within your mycroft.conf file. Using the we can set the language by running:

mycroft-config set lang "it-it"

2. Wake Word

Changing your wake word is not necessary, however may be desirable in order to wake the device with a phrase that is more appropriate or relevant in your language. By default, Mycroft will continue to be awoken by the phrase "Hey Mycroft".

3. Speech to Text (STT)

Speech to text (STT) is the part of Mycroft that translates spoken words into text. That text is then used by intent parsers, and then by Skills.

Available STT engines

In order to support a new language, a Speech to Text engine (STT engine) must be available.

STT engines are made available by different vendors, and they each have different licenses and usage restrictions.

See the full range of supported STT engines and how to configure Mycroft to use them:

What if there isn't an STT engine available for my language?

Unfortunately, STT engines aren't available for every language in the world.

4. Text to Speech (TTS)

In order to support a new language, a Text to Speech (TTS) engine must be available.

Available TTS engines

TTS engines are made available by different vendors, and they each have different licenses and usage restrictions.

What if there isn't an TTS engine available for my language?

Unfortunately, TTS engines aren't available for every language in the world.

Setting your TTS engine

mycroft-config edit user

We can then add our TTS configuration values.

  "tts": {
    "module": "google",
    "google": {
      "lang": "hi"
    }
  }

The TTS options you can select from are;

  • "mimic"

  • "mimic2"

  • "google"

  • "marytts"

  • "fatts"

  • "espeak"

  • "spdsay"

  • "watson"

  • "bing"

  • "responsive_voice"

5. Skills

In order to support a new language, individual Skills must support that language too. Mycroft Skills are already structured to cater for new languages. Within the Skill's directory, you will see subdirectories called dialog, vocab or locale. Within these directories is a directory for each of the languages the Skill supports, named after the BCP-47 language code for the language - such as en-us for American English and pt-br for Brazilian Portuguese.

You can modify the individual dialog and vocab files for a Skill on your own device if you need to. Each Skill is in it's own directory on your device at /opt/mycroft/skills/.

6. Mycroft Core - Lingua Franca library

In addition to the above, mycroft-core also requires localization, in particular to extract dates and numbers.

Some common files for each language are:

  • parse_LANG.py - this file parses large numbers, extracts dates and times in formats specific to the language, and handles definite articles such as 'a, an' etc.

  • format_LANG.py - this file formats cardinal and ordinal numbers, and helps to handle pronunciation of complex phrases involving decimals and fractions. Depending on the language, this file will also help format days of the week and other complex date and time phrasing.

As of mid-2019, the languages supported by mycroft-core are:

  • French (fr)

  • Hungarian (hu)

  • Italian (it)

  • Portuguese (pt)

  • Swedish (sv)

There is also active progress being made on:

  • Danish (da)

  • Dutch (nl)

  • Spanish (es)

Contributions to this utility are warmly welcomed.

Example configuration

Putting these six components together allows us to use Mycroft in another language. A simple mycroft.conf file for Italian users might look like:

{
  "lang": "it-it",
  "stt": {
    "module": "mycroft",
    "mycroft": {
      "lang": "it-it"
    }
  },
  "tts": {
    "module": "google",
    "google": {
      "lang": "it"
    }
  }
}

This configuration will set the:

  • overall system language

  • Speech to Text (STT) engine

  • Text to Speech (TTS) engine

This configuration has not changed the Wake Word, so the device will continue responding to "Hey Mycroft".

Further languages support

. Alternatively you can create a custom wake word:

We recommend that you request your language at .

Once you've found an TTS engine for your language, you will need to configure Mycroft to use it. This is done through the file.

If you would like to build a TTS for your language, then we recommend you check out . Mimic Recording Studio facilitates the recording of phrases based on a corpus, and the recordings can be used to train a voice with the mimic2 TTS software.

Using the we can edit the User-level mycroft.conf file by running:

To have a Skill support another language, the easiest way is to contribute to translating dialog and vocab files on the platform. When significant progress has been made on a language in Mycroft Translate, the translations are automatically added to Skills.

For more information, see the .

(de)

You're welcome to post questions and queries to the or join our to connect with others from around the world.

We also have a number of .

See our documentation on changing your Wake Word, and select a Wake Word that suits your language
Using a Custom Wake Word
List of languages supported by Google STT
List of languages supported by IBM Watson
List of languages supported by Wit.AI
Speech-To-Text
Mozilla's Common Voice project
List of languages supported by eSpeak TTS
List of languages supported by Google Cloud TTS
List of languages supported by MaryTTS
List of languages supported by BingTTS
mycroft.conf
Mimic Recording Studio
Configuration Manager
Mycroft Translate
Lingua Franca Github repository
German
Languages topic on the Mycroft Forum
Languages chatroom at Mycroft Chat
language-specific channels in Chat
Mycroft Voice Stack
dedicated documentation for mycroft.conf
Lingua Franca library
Configuration Manager
Language setting
Wake Word
Speech to Text
Text to Speech
Skills
Mycroft Core