Recently the "Ok Google" feature no longer works on my LG G3, unless I factory reset my settings. But after a few hours it stops working again even if I don't change any of my settings back. I even upgraded my phone to Lollipop, but that didn't help either. Also, I tried reprogramming my voice back into my phone via "Google settings", but it won't pick up my voice either. So long story short the only way I can get it to pick up my voice is by clicking the microphone.
Make sure "ok Google" detection is on for every screen. Do this by opening the Google app, navigate to settings > voice > "ok Google detection" and make sure the "from any sceen" option is enabled. Hopefully this solves your problem.