FlutterDavoicePlatform class abstract

Platform contract for the Davoice Flutter plugin.

Inheritance
  • Object
  • PlatformInterface
  • FlutterDavoicePlatform
Implementers

Constructors

FlutterDavoicePlatform()
Constructs a FlutterDavoicePlatform.

Properties

events → Stream<DavoiceSpeechEvent>
Raw speech events from native.
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

cancel() → Future<void>
Cancels speech recognition.
changeVoice(String name) → Future<int>
Selects a named ex2 voice; 0 means success and -1 means unavailable/fallback.
clearAudioRoutingConfig() → Future<void>
Clears direct speech routing so native code can use its fallback policy.
destroyAll() → Future<void>
Destroys unified STT and TTS.
destroyWithoutModel() → Future<void>
Destroys STT without destroying the model.
getPlatformVersion() → Future<String?>
Returns the platform version.
hasIOSMicPermissions() → Future<bool>
Returns whether iOS microphone permission is granted.
hasIOSSpeechRecognitionPermissions() → Future<bool>
Returns whether iOS speech recognition permission is granted.
initAll(DavoiceInitAllOptions options) → Future<void>
initAllRemoteSTT({required String model, String? onboardingJsonPath}) → Future<void>
Android-only remote STT initialization.
initAllRemoteSTTAndTTS({String? model, String? onboardingJsonPath}) → Future<void>
Android-only remote STT with TTS playback-only initialization.
initTTS(String model) → Future<void>
Initializes text-to-speech.
initWithoutModel() → Future<void>
Initializes STT without reloading the model.
isAvailable() → Future<int>
Returns whether speech recognition is available.
isLicenseValid(String licenseKey) → Future<bool>
Validates the Davoice native license.
isRecognizing() → Future<int>
Returns whether speech recognition is active.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseMicrophone() → Future<void>
Pauses the microphone.
pauseSpeechRecognition({int timeoutMs = 500}) → Future<void>
Pauses speech recognition while keeping native state alive.
playBuffer(DavoiceExternalPcm pcm) → Future<void>
Plays a raw PCM buffer.
playWav(String pathOrUrl, {bool markAsLast = true}) → Future<void>
Plays a WAV file by path or URL.
requestIOSMicPermissions(int waitTimeoutMs) → Future<bool>
Requests iOS microphone permission.
requestIOSSpeechRecognitionPermissions(int waitTimeoutMs) → Future<bool>
Requests iOS speech recognition permission.
setAECEnabled(bool enabled) → Future<void>
Enables or disables acoustic echo cancellation.
setAudioRoutingConfig(Map<String, dynamic> config) → Future<void>
Sets direct iOS speech routing before initialization.
setLicense(String licenseKey) → Future<bool>
Sets the Davoice native license.
setSpeakerVerificationRuntimeOptions({double? threshold, double? hangoverSeconds, double? preRollSeconds, double? tailSeconds}) → Future<void>
Initializes unified STT and TTS.
speak(String text, {int speakerId = 0, double speed = 1.0}) → Future<void>
Invokes native TTS playback.
start(String locale, {DavoiceStartOptions? options}) → Future<void>
Starts speech recognition.
startWithSVOnboardingJson(String locale, String onboardingJsonPath) → Future<void>
Starts speech recognition with speaker-verification onboarding JSON.
stop() → Future<void>
Stops speech recognition.
stopSpeaking() → Future<void>
Stops native TTS playback.
sttHealthSnapshot() → Future<Map<String, dynamic>?>
Returns a read-only iOS STT/audio-session diagnostic snapshot.
toString() → String
A string representation of this object.
inherited
unPauseMicrophone() → Future<void>
Resumes the microphone.
unPauseSpeechRecognition(int times, {int preFetchMs = 0, int timeoutMs = 500}) → Future<Map<String, dynamic>?>
Resumes speech recognition.

Operators

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

Static Properties

instance ↔ FlutterDavoicePlatform
The default instance of FlutterDavoicePlatform.
getter/setter pair