Hello, I'm trying to run a transcription with "chirp" model using dotnet Google.Cloud.Speech.V2 library. I need to use chirp because I need transcription with punctuation in polish and chirp is the only supported model. I created a Recognizer in my project. The thing is that when I configure a request like this:
BatchRecognizeRequest request = new BatchRecognizeRequest
{
RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("graceful-wall-398407", "europe-west4", "mpa1recognizer2"),
Files = { new BatchRecognizeFileMetadata { Uri = audioGcsUri, } },
};
It returns an error:
Grpc.Core.RpcException: Status(StatusCode="InvalidArgument", Detail="Expected resource location to be global, but found europe-west4 in resource name.")
When I set a location to global like this:
BatchRecognizeRequest request = new BatchRecognizeRequest
{
RecognizerAsRecognizerName = RecognizerName.FromProjectLocationRecognizer("graceful-wall-398407", "global", "mpa1recognizer2"),
Files = { new BatchRecognizeFileMetadata { Uri = audioGcsUri, } },
};
it returns and error like this:
Grpc.Core.RpcException: Status(StatusCode="NotFound", Detail="Unable to find Recognizer mpa1recognizer2 from project 879395532585.")
Recognizer seems to be configured well I can send a configuration if needed. Anyone had problem like this?
I also tried to configure recognition config like this:
var recognizerRequest = new CreateRecognizerRequest
{
Parent = $"projects/graceful-wall-398407/locations/europe-west4",
RecognizerId = "mpa1recognizer2",
Recognizer = new Recognizer
{
DefaultRecognitionConfig = new Google.Cloud.Speech.V2.RecognitionConfig
{
LanguageCodes = { "pl-PL" },
Model = "chirp"
}
}
};
The issue is that when I set location to europe-west4 It says it expects it to be global, when I set it to global then is says:
Grpc.Core.RpcException: Status(StatusCode="InvalidArgument", Detail="The model "chirp" does not exist in the location named "global".")
I'm able to create chirp using GCP UI. I used the latest version(4.8.4) GCP dep even though I got the same error
@MarcinK were you able to solve this problem? I'm facing the same issue, but with NodeJs.
I have created the recognizer through GCP UI, but I get the same error messages you had.
Hi @MarcinK,
Welcome and thank you for reaching out to our community.
I understand that you are having issues with your transcription using chirp. I wasn't able to find any document/ article that explicitly says that .NET does not support chirp but there is only python on chirp's guide which tells me that a version for .NET like C# is yet to be made. The guide also mentions that chirp works for us-central1, europe-west4 and asia-southeast1, hence you have an error when using global as your location.
Hope this helps.
Hi, @MarcinK
I could solve my problem (the same as yours) just by adding the apiEndpoint when creating the instance of the SpeechClient class, like this:
apiEndpoint: "asia-southeast1-speech.googleapis.com"