It seems that "Windows.Media.SpeechRecognition.SpeechRecognizer" can recognize 2 languages at same time? (English + System Settings)

Yen Hunghsiu (顔 宏修) 1 Reputation point
2022-08-26T07:13:38.73+00:00

Hi, all!

Recently I am developing voice recognition on Hololens2 with "Windows.Media.SpeechRecognition.SpeechRecognizer" in C++/WinRT.

https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition.speechrecognizer?view=winrt-22621

According to the documentation, if you want to recognize specific language, you have to add a Language class at the constructor.

But I found some interesting fact that it seems that SpeechRecognizer implicitly use English as its default language, and you can add one more by changing your system language in device settings. It's useless to use that Language class

So you could speak two language at the same time without any adjustment and the SpeechRecognizer could detect it both.

I did some test and here are the results:

Device Language(Japanese), SpeechRecognizer() -->Can catch Japanese, English
Device Language(Japanese), SpeechRecognizer(L'en-US') -->Can catch Japanese, English
Device Language(Japanese), SpeechRecognizer(L'zh-CN') -->Can only catch Japanese, English (add one more to check whether it can detect triple languages)

Device Language(Chinese), SpeechRecognizer() -->Can catch Chinese, English
Device Language(Chinese), SpeechRecognizer(L'en-US') -->Can catch Chinese, English
Device Language(Chinese), SpeechRecognizer(L'jp-JP') -->Can only catch Chinese, English (add one more to check whether it can detect triple languages)

So it seems that the maximum is two language at the same time.
Is my conclusion right?

Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
{count} votes