i have followed the google cloud speech api quickstart of requesting api by using
curl -s -H \"Content-Type: application/json\" \\
-H \"Authorization: B
Samir's solution worked for me.
Just a reminder that if using other software interacting with GCP, you may have to restart software before the auth takes effect.
In my case, when using RStudio, I ran gcloud auth application-default login
to authenticate, then command + shift + f10 to restart the R session, and then everything was good to go