Google Assistant how to enable working offine
First enable google voice input
system > languages/input > keyboard&inputs > Virtual keyboard,add Google voice typing and reboot your phone.
Second confirm if your device's Offline speech recognition language pack is downloaded? To check, go to Google app Settings > Voice > Offline Speech recognition > download your preferred language.