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
-
addSpeaker(
String speakerId, String jsonOrPath) → Future< List< String> > - Adds or replaces one speaker; returns the enrolled ids.
-
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.
-
createVoiceClone(
String inputAudio, String outputPath, String embedder, {double volume = 1.0}) → Future< Map< String, dynamic> > -
Reference audio -> packed .emd voice clone at
outputPath. -
destroyAll(
) → Future< void> - Destroys unified STT and TTS.
-
destroyWithoutModel(
) → Future< void> - Destroys STT without destroying the model.
-
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.
-
getOnDeviceLanguages(
) → Future< OnDeviceLanguages> - Which speech-recognition languages work on-device on this device.
-
getPlatformVersion(
) → Future< String?> - Returns the platform version.
-
getSpeakerIds(
) → Future< List< String> > - Enrolled speaker ids.
-
getVoiceAbilities(
String name) → Future< List< String> > -
Style variants ("abilities") of a voice, used via "
free text" tags. -
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.
-
removeSpeaker(
String speakerId) → Future< bool> - Removes a speaker; returns false if it wasn't enrolled.
-
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.
-
setExternalVoicesPath(
String? path) → Future< List< String> > -
Also look for
<name>.emdvoices in the folderpath; null removes them. -
setLicense(
String licenseKey) → Future< bool> - Sets the Davoice native license.
-
setSpeakers(
List< DavoiceSpeaker> speakers) → Future<List< String> > - Replaces the whole speaker set; returns the enrolled ids.
-
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, {String? speakerId}) → Future< void> - Starts speech recognition with speaker-verification onboarding JSON.
-
startWithSVSpeakers(
String locale, List< DavoiceSpeaker> speakers) → Future<void> - Starts speech recognition with an array of speakers.
-
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