SpeechToTextPlatform class abstract

The interface that implementations of url_launcher must implement.

Platform implementations should extend this class rather than implement it as speech_to_text does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation, while platform implementations that implements this interface will be broken by newly added SpeechToTextPlatform methods.

Inheritance
  • Object
  • PlatformInterface
  • SpeechToTextPlatform
Implementers

Constructors

SpeechToTextPlatform()
Constructs a SpeechToTextPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
onError ↔ (void Function(String error)?)
getter/setter pair
onSoundLevel ↔ (void Function(double level)?)
getter/setter pair
onStatus ↔ (void Function(String status)?)
getter/setter pair
onTextRecognition ↔ (void Function(String results)?)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() Future<void>
Cancels the current listen for speech if active, does nothing if not.
hasPermission() Future<bool>
Returns true if the user has already granted permission to access the microphone, does not prompt the user.
initialize({dynamic debugLogging = false, List<SpeechConfigOption>? options}) Future<bool>
Initialize speech recognition services, returns true if successful, false if failed.
listen({String? localeId, dynamic partialResults = true, dynamic onDevice = false, int listenMode = 0, dynamic sampleRate = 0, SpeechListenOptions? options}) Future<bool>
Starts a listening session for speech and converts it to text.
locales() Future<List>
returns the list of speech locales available on the device.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stop() Future<void>
Stops the current listen for speech if active, does nothing if not.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance SpeechToTextPlatform
The default instance of SpeechToTextPlatform to use.
getter/setter pair