MicroPhone Access Issue in K12 Widget

vinod kumar asked on October 6, 2024 20:15

I'm currently working on a custom form component within the K12 widget and attempting to integrate the Azure AI Speech Service for voice-to-text functionality. You can find the relevant documentation here: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-to-text

Here’s a brief overview of my implementation so far: Speech Service Setup: I registered the Azure Speech service using Autofac. Custom Form Component: I created a custom component called VoiceRecordingComponent, which includes a record button. JavaScript Implementation: In the _VoiceRecordingComponent.cshtml, I've added JavaScript to access the microphone when the record button is pressed. However, I’m encountering an issue. After hitting the record button, I receive an error message: "[Violation] Permission policy violation: Microphone is not allowed in this document." Interestingly, I have a separate ASP.NET web application project where the same microphone access code works perfectly. You can view that application here: https://speechrecognizationaspdotnet-d5bwgfgahnafafak.australiacentral-01.azurewebsites.net/.

Additionally, in a separate MVC live site, I created a simple JavaScript for microphone access that works without any issues when injected into the layout.

Could you please provide any insights or suggestions on resolving the microphone access issue within the K12 widget? Any guidance would be greatly appreciated.

   Please, sign in to be able to submit a new answer.