How to Add Voice Search Capability to your WordPress Theme
  • June 3

How to Add Voice Search Capability to your WordPress Theme

With the introduction of voice search option by Google (more known now as “Ok, Google”), as well as the personal assistant Siri for iOS, which is the functional markedly stepped forward in the last few years; mobile devices have learned to understand us just perfectly. But all this is very convenient functionality not yet found a great response from users - more than 60% of the adult population still prefers to type your query into the search bar. Let's see what we Google search, what opportunities and benefits it offers.

How does Voice Search by Google work?

In contrast to the classical, voice search is not communicating with the user through the key words and phrases, but by dialogue. You no longer need to use fanciful combinations to get the most relevant response when looking for information, usually by saying a phrase like the one that we use in everyday communication. For example, instead of requesting a "diet, harm and benefit" enough to ask "useful Diet?" And get a reasonable response. Then the system correctly responds to both requests, knowing that we are talking about the same dieting.

Pros of adding Voice Search by Google to WordPress theme:

  • The system recognizes the long phrases even from mobile gadgets;
  • It is very comfortable and fashionable;
  • Easily integrates with any CMS or HTML code;
  • You can use chat, blog, status, etc.
2

How to add Voice Search or speech recognition to WordPress themes?

You just need to add an attribute-only text field.  PHP code must be added to your website:
x-webkit-speech = "x-webkit-speech" Here is an example based on the code of the module mod_search.tpl: PHP coding: <Input type = "text" name = "query" id = "query" size = "40" value = "" class = "text-input" x-webkit-speech = "x-webkit-speech" /> This attribute recognizes the spoken speech, and inserts the text into the search box. And this, recognizes the spoken speech, inserts the text into the search box and automatically launches a site search. PHP code: <Input type = "text" name = "query" id = "query" size = "40" value = "" class = "text-input" x-webkit-speech = "x-webkit-speech" onwebkitspeechchange = "this .form.submit (); "/>
3 Google Voice Search is dependent on the attribute” lang”. If you set the «en-EN» it will be recognized only in English. “Lang” attribute is set as follows: <Meta http-equiv = 'Content-Language' content = 'en-EN' />. Surely, PHP coding should be trusted only to professionals. If you have no experience we advise you to ask our assistance since our team works with these algorithms and codes on a daily basis. Most of our premium WordPress themes have the pre-installed Voice Search system developed by Google.

Did you know ?

One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.