Speaker Diarization API V2 - Access denied

Hi, im trying to get speaker diarization working with v2, i created a new recognizer:

matherss_0-1707453666302.png

When ever i use this with an api call, it acts as if Diarization is off, if i enable at run time in the api call using the params:

$params['config']['features']['diarizationConfig'] = [
'minSpeakerCount' => $speakerCount,
'maxSpeakerCount' => $speakerCount,
];

It gives me the error of:

{
  "error": {
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED"
  }
}

I know the feature is in preview, I've looked all over the GCP gui to see if there was a spot to enable it. I also tried giving my user admin permissions.

Perhaps its not ready?

Thanks

1 2 500
2 REPLIES 2

This error message indicates that the server understood the request, but refuses to authorize it. The caller, which could be a user, a service account, or an application, does not have the necessary permission to perform the requested action.

This could be due to various reasons such as:

  • The caller may lack the necessary permissions to access or modify the requested resource, or may be using incorrect or expired credentials (e.g., API keys, OAuth tokens, service account credentials) to authenticate itself to the server.
  • There might be a misconfiguration in the permissions settings or policies governing access to the resource. This could involve incorrect roles assigned to the caller or misconfigured IAM (Identity and Access Management) policies.

To resolve this error, the caller needs to be granted the necessary permissions to perform the desired action. This can be achieved by updating the access control settings, granting appropriate roles or permissions to the caller, or ensuring that the caller is using the correct credentials for authentication.

The stated reasons might be the cause why the error occurred. This documentation serves that speaker diarization in Speech-to-Text v2 is feasible.

Hello! You are encountering a permissions issue when trying to enable speaker diarization in your API call. The error message The caller does not have permission suggests that your account does not have the necessary permissions to enable this feature.

Since speaker diarization is in preview, it's possible that it requires specific permissions that are not available to your account by default. You may need to check the documentation or reach out to Google Cloud support to determine the required permissions for enabling speaker diarization.

 

Additionally, ensure that your account has the necessary IAM roles assigned to it to access the Speech-to-Text API and enable preview features. You may need to have the roles roles/speech.admin or roles/editor to enable preview features like speaker diarization.

 

If you have already verified your permissions and are still encountering issues, it's possible that speaker diarization is not yet fully available or supported in your region. In this case, you may need to wait for further updates from Google Cloud or reach out to their support for assistance.