Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Iam trying to make voice control form in html through webkit speech

for example if I say in voice "add first name" it will go in first name field the "focus" in form, and then I will say "Moon" so in first name field it will input the word I said, I wont ask that if its possible because I know its possible someone did this in reactjs but reactjs coding is to complicated I want to do this in html through js only

sorry for my bad English if you are having trouble understanding,

What I have tried:

i tried simple data input in fields with voice but i cant give it command to focus on field with voice
Posted
Updated 14-Oct-20 7:57am

1 solution

There are several ways in which you can do that, the simplest would be to reuse a third-party system, such as Google's Dialogflow or Microsoft LUIS.

Direct comparison of the user input and then mapping it to commands is a very difficult and challenging task. If you can handle the operations as intents (which is what most of the NLP systems do) is much simpler and easier.

Most of the NLP systems are free or very cheap in terms of development cost and maintenance.

Dialogflow  |  Google Cloud[^]
What is Language Understanding (LUIS)? - Azure Cognitive Services | Microsoft Docs[^]
 
Share this answer
 
Comments
Armeen Moon 14-Oct-20 14:23pm    
thankyou so much for your answer, but i think it can be done with webkitspeech because i have seen people giving commands with it, i have what i want its with webkitspeech but its in reactjs and i cant link it with mysql db so i want to webkitspeech command in html js
Afzaal Ahmad Zeeshan 14-Oct-20 14:59pm    
It is possible, and yes, you can write a simple if...else statement to run the commands on your DOM too (a very basic jQuery code $("#firstname").focus(); should be enough for this). But again, what if user says something else? Or what if the microphone doesn't catch the correct statement?

There are more errors and edge cases to catch here.
Armeen Moon 15-Oct-20 8:25am    
thankyou i am trying this, but can i have sample code like for how do i start on this.. how will it start recording and when i say it will focus on that input? because i have been trying to do this since last night when you answered again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900