webkitSpeechRecognition won’t capture audio played in front of a mic in the Google Chrome browser

I am using webkitSpeechRecognition in the browser. I can get speech-to-text when I talk directly on a mic. But it won’t work if I play audio in front of a mic in the Google Chrome browser. At the same time, it works on Microsoft’s edge. So, do you have a solution to capture audio played over a mic and get speech-to-text in the Google Chrome browser?

I tried all settings. But Goole chrome wont captures played audio file to get speech-to-text.