AiliaVoiceModel class
A wrapper class for ailia Voice.
Provides text-to-speech functionality using the ailia Voice native library. Supports Tacotron2, GPT-SoVITS V1/V2/V3/V2Pro models.
Constructors
Properties
- ailia ↔ DynamicLibrary?
-
The handle to the ailia library.
getter/setter pair
- ailiaAudio ↔ DynamicLibrary?
-
The handle to the ailia Audio library.
getter/setter pair
- ailiaVoice ↔ dynamic
-
The ailia Voice FFI instance.
getter/setter pair
- available ↔ bool
-
Whether the model is available for inference.
getter/setter pair
- debug ↔ bool
-
Whether to enable debug output.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
ppAilia
↔ Pointer<
Pointer< ?AILIAVoice> > -
The native pointer to the ailia Voice instance.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the model and releases native resources.
-
g2p(
String inputText, int g2pType) → String - Performs grapheme-to-phoneme (G2P) conversion.
-
getCallback(
) → Pointer< AILIAVoiceApiCallback> - Retrieves the native API callback structure.
-
inference(
String inputFeature) → AiliaVoiceResult - Runs speech synthesis inference.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
String encoder, String decoder1, String decoder2, String wave, String? ssl, String dicFolder, int modelType, int cleanerType, int dictionaryType, int envId) → void - Opens a model and dictionary in a single call (for backward compatibility).
-
openDictionary(
String dicFolder, int dictionaryType) → void - Opens a dictionary for G2P processing.
-
openGPTSoVITSV1Model(
String encoder, String decoder1, String decoder2, String wave, String ssl, int envId) → void - Opens a GPT-SoVITS V1 model.
-
openGPTSoVITSV2Model(
String encoder, String decoder1, String decoder2, String wave, String ssl, String? chineseBert, String? vocab, int envId) → void - Opens a GPT-SoVITS V2 model.
-
openGPTSoVITSV2ProModel(
String encoder, String decoder1, String decoder2, String ssl, String vits, String sv, String? chineseBert, String? vocab, int envId) → void - Opens a GPT-SoVITS V2Pro model.
-
openGPTSoVITSV3Model(
String encoder, String decoder1, String decoder2, String ssl, String vq, String cfm, String bigvgan, String? chineseBert, String? vocab, int envId) → void - Opens a GPT-SoVITS V3 model.
-
openModel(
String encoder, String decoder1, String decoder2, String wave, String? ssl, int modelType, int cleanerType, int envId) → void - Opens a Tacotron2 model.
-
setModelType(
int modelType) → void - Sets the G2P model type.
-
setReference(
List< double> pcm, int sampleRate, int nChannels, String referenceFeature) → void - Sets the reference audio for voice cloning (GPT-SoVITS models).
-
setSampleSteps(
int steps) → void - Sets the number of CFM sampling steps for V3 models.
-
setSpeed(
double speed) → void - Sets the speech speed for V2 and V3 models.
-
setUserDictionary(
String dicFile, int dictionaryType) → void - Sets a user dictionary file.
-
throwError(
String funcName, int code) → void - Checks the error code and throws an exception if it indicates failure.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited