This worked for me.
Open your Settings app, then tap the search field at the top of the screen. Type in "Language & input," then select the top result. Here, find and tap on your keyboard of choice, ours is Gboard.
Now in your keyboard settings, select "Voice typing." If you're not using...