SpeechToTextPlugin class

Web implementation of the SpeechToText platform interface. This supports the speech to text functionality running in web browsers that have SpeechRecognition support.

Inheritance
  • Object
  • PlatformInterface
  • SpeechToTextPlatform
  • SpeechToTextPlugin

Constructors

SpeechToTextPlugin()

Properties

hashCode int
The hash code for this object.
no setterinherited
onError ↔ void Function(String error)?
getter/setter pairinherited
onSoundLevel ↔ void Function(double level)?
getter/setter pairinherited
onStatus ↔ void Function(String status)?
getter/setter pairinherited
onTextRecognition ↔ void Function(String results)?
getter/setter pairinherited
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.
override
hasPermission() Future<bool>
Returns true if the user has already granted permission to access the microphone, does not prompt the user.
override
initialize({dynamic debugLogging = false, List<SpeechConfigOption>? options}) Future<bool>
Initialize speech recognition services, returns true if successful, false if failed.
override
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.
override
locales() Future<List>
returns the list of speech locales available on the device.
override
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.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

supported bool
Checks if this SpeechRecognition is supported on the current platform.
no setter

Static Methods

registerWith(Registrar registrar) → void
Registers this class as the default instance of SpeechToTextPlatform.