First download and install the Google App, which is required. Also download and install Gboard (this is only required for voice typing).
From the Google app , tap the three bars at the upper left > settings > voice. Set your default language, set speech output to on and download an offline speech set. Then tap 'ok Google' detection and switch ON 'from the Google app'. You can try to turn on 'from any screen', but you won't be able to...yet. Now open the Gboard app and tap voice typing. Select your languages and decide if you don't like bad words. Then go to settings > keyboard and languages > show/hide keyboards > make sure Google voice typing is set to automatic. Now swipe everything closed.
1) Now you need to download and install Activity Launcher. Open it and tap the three bars at the top left and select 'all activities.'
2) Scroll down until you see settings. Tap it and scroll until you see 'voice input'. Then tap it.
3) After tapping 'voice input' a screen will pop up with two settings; 'Basic Google recognition' and 'Enhanced Google services.' You need to select 'Enhanced Google services.'
4) When you completed that, stay on that screen and tap the gear to the right of Enhanced Services. Now it brings you back into the voice settings screen.
5) Tap the 'ok Google' detection. Now tap 'from any screen.' Another screen will come up which will allow you to train the Google App with your own voice. Tap next at the bottom right.
6) Now all you need to do is follow the onscreen instructions. You''ll be asked to say 'ok Google' three times. It's best to be in a quiet area so your microphone doesn't record and weird sounds, aside from your voice.
If you use Nova Launcher, go into Nova Settings > gestures and input > and turn on 'ok Google' hot word. Now you should be able to do a voice Google search from ANY screen on your tablet...except the lock screen The app will detect your voice, but the screen has to be unlocked unfortunately. You should also download Google text-to-speech as well. Though you will have to access it using Activity Launcher which will allow you to create a shortcut to it. First you need to bind 'appwidget' to your custom launcher using the steps here. Once you've done that, go into Activity Launcher > all activities > scroll to Google text-to-speech and tap it. Then tap on 'Google TTS voice data' to select your languages. When done, long press on that same item and create shortcut. Yay you're done