How to activate Online Speech Recognition on Single-App Kiosk

Nicsi 1 Reputation point
2020-12-08T08:42:16.313+00:00

Hi,

I would like to know how to turn on the Online Speech Recognition on an Single-App Kiosk session ?

My goal here, is to be able to access the Touch KeyBoard Speech-to-Text feature through an UWP' application.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,086 questions
Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,584 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. S.Sengupta 16,776 Reputation points MVP
    2020-12-09T01:52:31.223+00:00
    0 comments No comments

  2. Roy Li - MSFT 32,726 Reputation points Microsoft Vendor
    2020-12-09T06:40:49.183+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Generally, we could press Window key + H to activate the speech recognition interface. You could try to simulate this keyboard shortcut in your code to activate the function by using InputInjector Class

    Here is the sample that you could refer to:

                InputInjector inputInjector = InputInjector.TryCreate();  
      
                await Task.Delay(100);  
      
                var info1 = new InjectedInputKeyboardInfo();  
                info1.VirtualKey = (ushort)VirtualKey.LeftWindows;  
                inputInjector.InjectKeyboardInput(new[] { info1 });  
      
      
                var info2 = new InjectedInputKeyboardInfo();  
                info2.VirtualKey = (ushort)VirtualKey.H;  
                inputInjector.InjectKeyboardInput(new[] { info2 });  
      
      
                info1.KeyOptions = InjectedInputKeyOptions.KeyUp;  
                inputInjector.InjectKeyboardInput(new[] { info1 });  
    

    Thank you.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.