EndlessStreamingServiceBeta class

An interface to Google's Speech-to-Text Api via grpc for endless streaming recognize.

Important! You need an own Google project to use this class.

Constructors

EndlessStreamingServiceBeta.viaApiKey(String apiKey, {String? cloudSpeechEndpoint})
Creates a EndlessStreamingService interface using a API keys.
factory
EndlessStreamingServiceBeta.viaServiceAccount(ServiceAccount account, {String? cloudSpeechEndpoint})
Creates a EndlessStreamingService interface using a service account.
factory
EndlessStreamingServiceBeta.viaThirdPartyAuthenticator(ThirdPartyAuthenticator thirdPartyAuthenticator, {String? cloudSpeechEndpoint})
Creates a EndlessStreamingService interface using a third party authenticator. Don't worry about updating the access token, the package does it automatically. Example: final EndlessStreamingService = EndlessStreamingService.viaThirdPartyAuthenticator( ThirdPartyAuthenticator( obtainCredentialsFromThirdParty: () async { // request api to get token final json = await requestCredentialFromMyApi(); return AccessCredentials.fromJson(json); }, ), );
factory
EndlessStreamingServiceBeta.viaToken(String typeToken, String token, {String? cloudSpeechEndpoint})
Creates a EndlessStreamingService interface using a token. You are responsible for updating the token when it expires.
factory

Properties

endlessStream Stream<StreamingRecognizeResponse>
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
endlessStreamingRecognize(StreamingRecognitionConfigBeta config, Stream<List<int>> audioStream, {Duration restartTime = const Duration(minutes: 1), Duration transitionBufferTime = const Duration(seconds: 2)}) → void
Sends a StreamingRecognizeRequest to the Google Speech Api. Requires a StreamingRecognitionConfig and an audioStream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited