I want to implement the Google Cloud speech to text using a service account. What i have try is i have set the environment variable to that json and send the post request to this url 'https://speech.googleapis.com/v1/speech:longrunningrecognize'.
Code: req = requests.post(url, data={ "audio":{ "content":enc }, "config":{ "audioChannelCount":2, "enableSeparateRecognitionPerChannel":True, "enableWordTimeOffsets":True, "diarizationConfig":{ "enableSpeakerDiarization": True, "minSpeakerCount": 1, "maxSpeakerCount": 2 },
}}) Error: 403 { "error": { "code": 403, "message": "The request is missing a valid API key.", "status": "PERMISSION_DENIED" } }