Search code examples
c#raspberry-pispeech-recognitionwindows-10-iot-core

Windows 10 iot core language installation for speechRecognizer


I am trying to use the SpeechRecognizer in French on a raspberry pi running windows 10 iot core. I managed to install the language following the instructions found on that thread: Add language pack to Windows IoT Core. It gets listed in the SupportedTopicLanguages but as soon as I call this: speechRecognizer = new SpeechRecognizer(speechLanguage); I get an exception with only a code -2147155934 (no explanation what the problem is).

Anybody has an idea what I am doing wrong?

Thanks Laurent


Solution

  • The suggested way to enable speech languages on IoTCore is including appropriate speech language packages during image creation. This way these packages will receive the updates properly. For image creating solution, you can refer to this document.

    But, if you want to use this feature for developer’s experimentation only, you can deploy the speech language feature package at runtime using applyupdate.exe tool.

    Here I show how to install a speech language package via applyupdate tool. (Here I use de-DE as example, other supported languages will be added using the same way.)

    1. Install the OS packages for custom and commercial FFU. You can download "Windows 10 IoT Core Packages – Windows 10 October 2018 Update (SAC)" from here. You will see all four architectures IoTCore packages MSI in the ISO. Install all four or install which one architecture speech package cab you are looking for. I am referring to arm in below example and you have to use appropriate architecture based on the device you are using.

    enter image description here

    1. Find the speech language CAB file under C:\Program Files (x86)\Windows Kits\10\MSPackages\retail\\fre. For me the path is C:\Program Files (x86)\Windows Kits\10\MSPackages\retail\arm\fre. The file name will be "Microsoft-Windows-OneCore-Microsoft-SpeechData-de-DE-Package.cab" for version 17134 and "Microsoft-Windows-OneCore-Microsoft-SpeechData-de-DE-Package~31bf3856ad364e35~arm~~.cab" for version 17763.

    2. Copy the speech language CAB file to the device.

    3. Use applyupdate tool install it. See the following snapshot.

    enter image description here

    1. After commit success the device will auto reboot and apply the update. When the device comes back again you can set the speech language to de-DE and check the result:

    enter image description here