MethodChannelFlutterDavoice class

MethodChannel implementation of FlutterDavoicePlatform.

Inheritance

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

addSpeaker(String speakerId, String jsonOrPath) → Future<List<String>>
Adds or replaces one speaker; returns the enrolled ids.
override
cancel() → Future<void>
Cancels speech recognition.
override
changeVoice(String name) → Future<int>
Selects a named ex2 voice; 0 means success and -1 means unavailable/fallback.
override
clearAudioRoutingConfig() → Future<void>
Clears direct speech routing so native code can use its fallback policy.
override
createVoiceClone(String inputAudio, String outputPath, String embedder, {double volume = 1.0}) → Future<Map<String, dynamic>>
Reference audio -> packed .emd voice clone at outputPath.
override
destroyAll() → Future<void>
Destroys unified STT and TTS.
override
destroyWithoutModel() → Future<void>
Destroys STT without destroying the model.
override
getAllVoices() → Future<List<String>>
Voices available in the loaded .dm (the names changeVoice accepts; the first is the default). Empty when no ex2 .dm is loaded or it has none.
override
getOnDeviceLanguages() → Future<OnDeviceLanguages>
Which speech-recognition languages work on-device on this device.
override
getPlatformVersion() → Future<String?>
Returns the platform version.
override
getSpeakerIds() → Future<List<String>>
Enrolled speaker ids.
override
getVoiceAbilities(String name) → Future<List<String>>
Style variants ("abilities") of a voice, used via "free text" tags.
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>
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({int timeoutMs = 500}) → 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
removeSpeaker(String speakerId) → Future<bool>
Removes a speaker; returns false if it wasn't enrolled.
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
setAudioRoutingConfig(Map<String, dynamic> config) → Future<void>
Sets direct iOS speech routing before initialization.
override
setExternalVoicesPath(String? path) → Future<List<String>>
Also look for <name>.emd voices in the folder path; null removes them.
override
setLicense(String licenseKey) → Future<bool>
Sets the Davoice native license.
override
setSpeakers(List<DavoiceSpeaker> speakers) → Future<List<String>>
Replaces the whole speaker set; returns the enrolled ids.
override
setSpeakerVerificationRuntimeOptions({double? threshold, double? hangoverSeconds, double? preRollSeconds, double? tailSeconds}) → Future<void>
Initializes unified STT and TTS.
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, {String? speakerId}) → Future<void>
Starts speech recognition with speaker-verification onboarding JSON.
override
startWithSVSpeakers(String locale, List<DavoiceSpeaker> speakers) → Future<void>
Starts speech recognition with an array of speakers.
override
stop() → Future<void>
Stops speech recognition.
override
stopSpeaking() → Future<void>
Stops native TTS playback.
override
sttHealthSnapshot() → Future<Map<String, dynamic>?>
Returns a read-only iOS STT/audio-session diagnostic snapshot.
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 = 500}) → Future<Map<String, dynamic>?>
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.