This is a Google Now feature, not a G3 feature. It even works on my old Galaxy S3 as well as my G3. It ate up a lot more battery on the Galaxy, though.
To turn it on, open the Google Now screen, scroll to the bottom, tap the menu icon then Settings. Tap Voice, "OK, Google" detection, and choose the options you want.