MethodChannelFlutterDavoice class
MethodChannel implementation of FlutterDavoicePlatform.
- Inheritance
-
- Object
- PlatformInterface
- FlutterDavoicePlatform
- MethodChannelFlutterDavoice
Constructors
Properties
- eventChannel → EventChannel
-
Event channel used to receive native speech events.
final
-
events
→ Stream<
DavoiceSpeechEvent> -
Raw speech events from native.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
Method channel used to interact with native platforms.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → Future< void> -
Cancels speech recognition.
override
-
destroyAll(
) → Future< void> -
Destroys unified STT and TTS.
override
-
destroyWithoutModel(
) → Future< void> -
Destroys STT without destroying the model.
override
-
getPlatformVersion(
) → Future< String?> -
Returns the platform version.
override
-
hasIOSMicPermissions(
) → Future< bool> -
Returns whether iOS microphone permission is granted.
override
-
hasIOSSpeechRecognitionPermissions(
) → Future< bool> -
Returns whether iOS speech recognition permission is granted.
override
-
initAll(
DavoiceInitAllOptions options) → Future< void> -
Initializes unified STT and TTS.
override
-
initAllRemoteSTT(
{required String model, String? onboardingJsonPath}) → Future< void> -
Android-only remote STT initialization.
override
-
initAllRemoteSTTAndTTS(
{String? model, String? onboardingJsonPath}) → Future< void> -
Android-only remote STT with TTS playback-only initialization.
override
-
initTTS(
String model) → Future< void> -
Initializes text-to-speech.
override
-
initWithoutModel(
) → Future< void> -
Initializes STT without reloading the model.
override
-
isAvailable(
) → Future< int> -
Returns whether speech recognition is available.
override
-
isLicenseValid(
String licenseKey) → Future< bool> -
Validates the Davoice native license.
override
-
isRecognizing(
) → Future< int> -
Returns whether speech recognition is active.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseMicrophone(
) → Future< void> -
Pauses the microphone.
override
-
pauseSpeechRecognition(
) → Future< void> -
Pauses speech recognition while keeping native state alive.
override
-
playBuffer(
DavoiceExternalPcm pcm) → Future< void> -
Plays a raw PCM buffer.
override
-
playWav(
String pathOrUrl, {bool markAsLast = true}) → Future< void> -
Plays a WAV file by path or URL.
override
-
requestIOSMicPermissions(
int waitTimeoutMs) → Future< bool> -
Requests iOS microphone permission.
override
-
requestIOSSpeechRecognitionPermissions(
int waitTimeoutMs) → Future< bool> -
Requests iOS speech recognition permission.
override
-
setAECEnabled(
bool enabled) → Future< void> -
Enables or disables acoustic echo cancellation.
override
-
setLicense(
String licenseKey) → Future< bool> -
Sets the Davoice native license.
override
-
speak(
String text, {int speakerId = 0, double speed = 1.0}) → Future< void> -
Invokes native TTS playback.
override
-
start(
String locale, {DavoiceStartOptions? options}) → Future< void> -
Starts speech recognition.
override
-
startWithSVOnboardingJson(
String locale, String onboardingJsonPath) → Future< void> -
Starts speech recognition with speaker-verification onboarding JSON.
override
-
stop(
) → Future< void> -
Stops speech recognition.
override
-
stopSpeaking(
) → Future< void> -
Stops native TTS playback.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unPauseMicrophone(
) → Future< void> -
Resumes the microphone.
override
-
unPauseSpeechRecognition(
int times, {int preFetchMs = 0, int timeoutMs = 2500}) → Future< void> -
Resumes speech recognition.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- eventChannelName → const String
- Native event channel name.
- methodChannelName → const String
- Native method channel name.