I can't use search by voice on Google and I can't use Google translate's translate by voice

On Google when I use search by voice it's is no Internet connection and when I use translate by voice on Google translate it says speak English and then goes away and doesn't work. My flash is working fine so i don't know what the problem is?