openGPTSoVITSV1Model method
Opens a GPT-SoVITS V1 model.
encoder is the path to the t2s_encoder model file.
decoder1 is the path to the t2s_fsdec model file.
decoder2 is the path to the t2s_sdec model file.
wave is the path to the VITS model file.
ssl is the path to the CNHuBERT SSL model file.
envId is the execution environment ID.
Implementation
void openGPTSoVITSV1Model(
String encoder,
String decoder1,
String decoder2,
String wave,
String ssl,
int envId,
) {
_create(envId);
int status;
if (Platform.isWindows){
status = ailiaVoice.ailiaVoiceOpenGPTSoVITSV1ModelFileW(
ppAilia!.value,
encoder.toNativeUtf16().cast<ffi.WChar>(),
decoder1.toNativeUtf16().cast<ffi.WChar>(),
decoder2.toNativeUtf16().cast<ffi.WChar>(),
wave.toNativeUtf16().cast<ffi.WChar>(),
ssl.toNativeUtf16().cast<ffi.WChar>(),
);
}else{
status = ailiaVoice.ailiaVoiceOpenGPTSoVITSV1ModelFileA(
ppAilia!.value,
encoder.toNativeUtf8().cast<ffi.Char>(),
decoder1.toNativeUtf8().cast<ffi.Char>(),
decoder2.toNativeUtf8().cast<ffi.Char>(),
wave.toNativeUtf8().cast<ffi.Char>(),
ssl.toNativeUtf8().cast<ffi.Char>(),
);
}
throwError("ailiaVoiceOpenGPTSoVITSV1ModelFile", status);
_finalizeOpen();
}