So guys today we are going to learn about Kodular components. Today we will be discussing how to use Voice search in Kodular. Now, here we start our tutorial.
How to add Google Voice Search in Kodular Creator?
What is Google Voice Search?
Google voice search is a function in which we can search in our device by speaking our query rather than typing it to search. You may have used it manny time but today We are going to learn how to implement this our android app.
Why should we use it?
We can use voice to text option for many tasks such as,
1. In browser for Search option.
2. For getting voice message.
3. For use of translation etc.
So,these were the some of uses of voice to text option. You guys can use this anywhere you feel need of voice input from user.
How to implement this in our app?
Step 1: Firstly you need to check for speech recognizer component under the option of media in sidebar.
Properties:
We don't have any properties options for speech recognizer currently in Kodular Creator. Maybe we could have some in future.
Blocks:
We have the following main blocks of Speech Recognizer in Kodular Creator:
1. Get Text:
This block is used to get text from user.
2. After getting text:
This block provide the speech in form of text by the variable result.
How to use the text for searching?
For using this you need to add a web Viewer to get the results....
Step 1: For searching you need to use the block 'Get Text' when you want to get text for searching from user.
Step 2: Then get the result by using after getting text.
Step 3: Now call web viewer to go to URL of the results. For getting URL for results you need to join the text of query you got from User with this text:
https://www.google.com/search?q= + Speech From User
Also set the block as....
In similar way you can use this for Searching in Youtube just change the "https://www.google.com/search?q=" to "https://www.youtube.com/results?search_query=" and you will get the results in the web viewer.
Here our tutorial ends we will be back with a new and fresh tutorial. Till then......
Happy Koding.....
Comments
Post a Comment