Closed simonbrandhof closed 10 months ago
Hey @simonbrandhof,
Thank you for your feedback. I have just released version 5.1.0. It is now possible to use regional endpoints with the optional parameter 'cloudSpeechEndpoint'. I hope this helps you.
SpeechToText.viaServiceAccount(serviceAccount, cloudSpeechEndpoint: 'https://eu-speech.googleapis.com');
EDIT - Thanks for the hint. The correct code example would be:
SpeechToText.viaServiceAccount(serviceAccount, cloudSpeechEndpoint: 'eu-speech.googleapis.com');
Excellent, kudos to you 👍
Note that the parameter cloudSpeechEndpoint
is the host, but not the URL. The correct example is:
SpeechToText.viaServiceAccount(serviceAccount, cloudSpeechEndpoint: 'eu-speech.googleapis.com');
Ahh, you're right. Thanks for the correction.
The Google Speech API provides the capability to select the service region when sending requests (US or Europe). That can be important for the compliance with local regulatory requirements, and probably for better performances for nearby users.
Currently the global endpoint
speech.googleapis.com
is hardcoded in theSpeechToText
class and can't be changed. It would be great to add the support for its configuration, for example by using an enum: