Google automatic typing
Usually, when that mic icon appears, you can easily dismiss it by pressing anywhere on the screen other than the mic window. You can also dismiss it by pressing on the back button on your phone.