When trying to set up ok google detection for Google Assistant on the screen where you are supposed to say ok google thrice a toast pops up showing 'cannot use mircrophone. please restart your device and try again'. The issues is persistenteven after restarting the device. And yes the Microphone works perfectly on all other applications and functions, And permission to use microphone is given to Google app.
When I googled for a solution I found this issue on moto devices with moto voice turned on and some suggestion that this maybe due to samsung's s-voice also. Even after force stopping s-voice the issue is still present.
Later I thought this maybe due to manually installed beta version of Google Assistant so I switched back to regular version of Google app and tried setting up the same for Google now and still the issue is present.
Thank you for your query. The relevant department may serve you better/speedily, if you can provide logs/video by registering this feedback in Error Section (Samsung Members App -> Feedback -> Questions/Errors -> Create -> Error reports).