Automate voice recording in Chrome

I am trying to automate the recording of speech in Google speech input (works only in Chrome).

Be that as it may, the user must click the microphone to start recording, but I am working on an installation where the user will not interact with the computer. So I have to initiate the recording in a different way.

As you see it, you cannot access the speech input functions by code, i.e. You cannot call a function to start recording. So now I am looking at imitating a mouse click on a microphone.
I tried using javaScript, but it seems that only events and event handlers affect it (for example, a simulated click on the input field will trigger its click handlers, but will not give focus to the field.)

So, now I look at modeling clicks of Windows system mice, and I found several programs that can do this (mostly at intervals), and it works, recording starts. But the problem is that I need to activate click simulation from a browser application.
For the better, AutoHotkey has become so far, which allows you to create custom scripts, in my case a script that simulates a mouse click on a given position. So, if I could run this script from a browser, I would be safe, but I don't know how to do it.

Any ideas and / or thoughts are welcome!

+3
source share
2 answers

I am facing a similar problem. We wanted to start and stop recording in order to check how the google api works with voice recognition in German. But no solution has yet been found.

The html5 function is still limited and works with only five input fields. You may find some information here: http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html We will return to the topic tomorrow.

0
source

I ran into a similar problem, then I looked at this site by Mike Pultz -

http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/

Basically, he creates the audio file himself, uses Sox to convert it to .flac format, and then sends it to Google Voice Api. This way, you don’t have to click on the microphone, or rather, you can create your own answer to the mike.

I also created a C # solution at https://github.com/seigneur/Voice-Biometrics And you can watch this video for further help - http://www.youtube.com/watch?v=PA00SPOTL-M

Hope this helps

0
source

Source: https://habr.com/ru/post/1413311/


All Articles