Search code examples
windows-10-iot-core

Add language pack to Windows IoT Core


Is it possible to add a language pack to Windows IoT Core? I am using the SpeechRecognizer API and would like to add other languages. From what I can see in code, only en-US is an available language with the default installation.


Solution

  • You can follow these steps:

    1. Go to Settings > Time & language > Region & language and install your favorite language(here I use French) on your windows 10 PC. After the installation is complete, you need to select France listed in Languages of Settings > Time & language > Region & language and click the Options. You will see something like this:

    enter image description here

    Make sure you click on the Download button of the Speech option. After that you have "fr-FR" folder in your PC we will use in step 2 & 3.

    1. Copy the ‘fr-FR’ folder from C:\Windows\Speech_OneCore\Engines\TTS (of the PC) and paste it to Windows\Speech_OneCore\Engines\TTS of the Windows IoT device(here I use Raspberry Pi 3). You can access the files on your device using Windows file sharing.

    2. Second copy is a little more complex because the Common directory that we want to access is protected. First, you copy the ‘fr-FR’ folder from C:\Windows\System32\Speech_OneCore\Common (of the PC) and paste it to Windows\System32\Speech_OneCore of the Windows IoT device. Then, we need to use PowerShell to connect the IoT device and navigate to Windows\System32\Speech_OneCore, run this command: mv .\fr-FR\ .\Common\ will move the ‘fr-FR’ folder into Windows\System32\Speech_OneCore\Common directory.

    To test if it works, use this piece of code:

            foreach (var languages in SpeechRecognizer.SupportedTopicLanguages)
            {
                System.Diagnostics.Debug.WriteLine($"DisplayName: {languages.DisplayName} LanguageTag: {languages.LanguageTag}");
            }
    

    You will see the following printed lines in Output window of Visual Studio:

    DisplayName: English (United States) LanguageTag: en-US
    DisplayName: French (France) LanguageTag: fr-FR 
    

    Initial post is here: https://blog.paulfasola.fr/en/add-voices-windows-10-iot-core-tts/