Use Moto Voice (link) or simply open the Google app in your phone then open its Settings. Go to Voice > "OK Google" detection > From any screen. You will then have to train your voice there so your phone can detect you.