Recently Google updated the Search app with support for “OK Google” Hotword detection to any screen, but unfortunately it is only available to certain Google accounts and if you set your voice detection language to English (US). Now Android fans come up with a simple solution to get “OK Google” hotword detection to any screen for all users.
First, check whether you have ‘OK Google’ hotword detection on any screen option or not by going to Google Now Settings -> Voice -> Ok Google Detection -> “From any screen” and “From lock screen”. If the option isn’t available, just follow the simple guide given below.
1. Open Google Now and search for “OK Google everywhere”
2. Click any link (even if it is unnecessary for you)
3. Go back to Google Now
4. Go to Settings ->Voice -> and enable Audio History.
5. From any screen option should now be available as settings (it may take some times to appear the option).
Keep in mind that, unlike with the Moto X any screen hotword detection, this update will not wake your phone with your voice, your screen has to be on to use your voice. Moto X has special chip to wake the phone with voice. However, Google is probably taking advantage of the existing chip in Qualcomm processors for this purpose (source)