Access Dinied Windows.Media.SpeechRecognition.SpeechRecognizer

kailash solanki 1 Reputation point
2021-03-03T16:15:32.91+00:00

I have two Application as-

  1. MVC Web Application
  2. Console Application

Now i am opening Console app from Web Application so it's opening in background Process. that is fine.

but it giving me exception like Access Denied on below line of code -

var recognizer = new Windows.Media.SpeechRecognition.SpeechRecognizer();

Same application if i run from Visual Studio than it's working fine but when i deploy my MVC app in IIS
with Assigned as a administrator identity it giving me same exception.

can you please help me what kind of permission i need to assign.

i have checked microphone is enable for all the application.

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,675 questions
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,843 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 50,856 Reputation points
    2021-03-04T00:18:11.147+00:00

    Hello,

    Could you please go to your setting to double check if you enabled it successfully ?

    Privacy policy for microphone access
    If the user clicks Yes to grant access to the microphone, your app is added to the list of approved applications on the Settings -> Privacy -> Microphone page. However, as the user can choose to turn this setting off at any time, you should confirm that your app has access to the microphone before attempting to use it.

    If you also want to support dictation, Cortana, or other speech recognition services (such as a predefined grammar defined in a topic constraint), you must also confirm that Online speech recognition (Settings -> Privacy -> Speech) is enabled.

    Regards,
    Yutong

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.