SpeechToText.viaThirdPartyAuthenticator constructor
SpeechToText.viaThirdPartyAuthenticator(
- ThirdPartyAuthenticator thirdPartyAuthenticator, {
- String? cloudSpeechEndpoint,
Creates a SpeechToText interface using a third party authenticator. Don't worry about updating the access token, the package does it automatically. Example: final speechToText = SpeechToText.viaThirdPartyAuthenticator( ThirdPartyAuthenticator( obtainCredentialsFromThirdParty: () async { // request api to get token final json = await requestCredentialFromMyApi(); return AccessCredentials.fromJson(json); }, ), );
Implementation
factory SpeechToText.viaThirdPartyAuthenticator(
ThirdPartyAuthenticator thirdPartyAuthenticator,
{String? cloudSpeechEndpoint}) =>
SpeechToText._(thirdPartyAuthenticator.toCallOptions,
cloudSpeechEndpoint: cloudSpeechEndpoint);