|
ailia_voice
1.5.0.0
|
#include "ailia.h"#include "ailia_audio.h"
Go to the source code of this file.
Classes | |
| struct | _AILIAVoiceApiCallback |
Typedefs | |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_AUDIO_RESAMPLE) (void *, const void *, int, int, int, int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_AUDIO_GET_RESAMPLE_LEN) (int *, int, int, int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_AUDIO_GET_FRAME_LEN) (int *, int, int, int, int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_AUDIO_GET_SPECTROGRAM) (void *, const void *, int, int, int, int, int, int, int, float, int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_AUDIO_GET_MEL_SPECTROGRAM) (void *, const void *, int, int, int, int, int, int, int, int, float, int, float, float, int, int, int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_CREATE) (struct AILIANetwork **, int, int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_OPEN_WEIGHT_FILE_A) (struct AILIANetwork *, const char *) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_OPEN_WEIGHT_FILE_W) (struct AILIANetwork *, const wchar_t *) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_OPEN_WEIGHT_MEM) (struct AILIANetwork *, const void *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_SET_MEMORY_MODE) (struct AILIANetwork *, unsigned int) |
| typedef void(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_DESTROY) (struct AILIANetwork *) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_UPDATE) (struct AILIANetwork *) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_BLOB_INDEX_BY_INPUT_INDEX) (struct AILIANetwork *, unsigned int *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_BLOB_INDEX_BY_OUTPUT_INDEX) (struct AILIANetwork *, unsigned int *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_BLOB_DATA) (struct AILIANetwork *, void *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_SET_INPUT_BLOB_DATA) (struct AILIANetwork *, const void *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_SET_INPUT_BLOB_SHAPE) (struct AILIANetwork *, const AILIAShape *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_BLOB_SHAPE) (struct AILIANetwork *, AILIAShape *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_INPUT_BLOB_COUNT) (struct AILIANetwork *, unsigned int *) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_OUTPUT_BLOB_COUNT) (struct AILIANetwork *, unsigned int *) |
| typedef const char *(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_GET_ERROR_DETAIL) (struct AILIANetwork *) |
| typedef int(AILIA_VOICE_USER_API * | AILIA_VOICE_USER_API_AILIA_COPY_BLOB_DATA) (struct AILIANetwork *dst_net, unsigned int dst_blob_idx, struct AILIANetwork *src_net, unsigned int src_blob_idx) |
| typedef struct _AILIAVoiceApiCallback | AILIAVoiceApiCallback |
Functions | |
| int AILIA_API | ailiaVoiceCreate (struct AILIAVoice **net, int env_id, int num_thread, int memory_mode, int flags, AILIAVoiceApiCallback callback, int version) |
| Creates a Voice instance. More... | |
| int AILIA_API | ailiaVoiceSetUserDictionaryFileA (struct AILIAVoice *net, const char *dictionary_path, int dictionary_type) |
| Set user dictionary into a network instance. More... | |
| int AILIA_API | ailiaVoiceSetUserDictionaryFileW (struct AILIAVoice *net, const wchar_t *dictionary_path, int dictionary_type) |
| Set user dictionary into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenDictionaryFileA (struct AILIAVoice *net, const char *dictionary_path, int dictionary_type) |
| Set dictionary into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenDictionaryFileW (struct AILIAVoice *net, const wchar_t *dictionary_path, int dictionary_type) |
| Set dictionary into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenModelFileA (struct AILIAVoice *net, const char *encoder, const char *decoder1, const char *decoder2, const char *wave, const char *ssl, int model_type, int cleaner_type) |
| Set models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenModelFileW (struct AILIAVoice *net, const wchar_t *encoder, const wchar_t *decoder1, const wchar_t *decoder2, const wchar_t *wave, const wchar_t *ssl, int model_type, int cleaner_type) |
| Set models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenTacotron2ModelFileA (struct AILIAVoice *net, const char *encoder, const char *decoder1, const char *decoder2, const char *wave, int cleaner_type) |
| Set Tacotron2 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenTacotron2ModelFileW (struct AILIAVoice *net, const wchar_t *encoder, const wchar_t *decoder1, const wchar_t *decoder2, const wchar_t *wave, int cleaner_type) |
| Set Tacotron2 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV1ModelFileA (struct AILIAVoice *net, const char *encoder, const char *decoder1, const char *decoder2, const char *wave, const char *ssl) |
| Set GPT-SoVITS V1 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV1ModelFileW (struct AILIAVoice *net, const wchar_t *encoder, const wchar_t *decoder1, const wchar_t *decoder2, const wchar_t *wave, const wchar_t *ssl) |
| Set GPT-SoVITS V1 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV2ModelFileA (struct AILIAVoice *net, const char *encoder, const char *decoder1, const char *decoder2, const char *wave, const char *ssl, const char *chinese_bert, const char *vocab) |
| Set GPT-SoVITS V2 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV2ModelFileW (struct AILIAVoice *net, const wchar_t *encoder, const wchar_t *decoder1, const wchar_t *decoder2, const wchar_t *wave, const wchar_t *ssl, const wchar_t *chinese_bert, const wchar_t *vocab) |
| Set GPT-SoVITS V2 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV3ModelFileA (struct AILIAVoice *net, const char *encoder, const char *decoder1, const char *decoder2, const char *ssl, const char *vq, const char *cfm, const char *bigvgan, const char *chinese_bert, const char *vocab) |
| Set GPT-SoVITS V3 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV3ModelFileW (struct AILIAVoice *net, const wchar_t *encoder, const wchar_t *decoder1, const wchar_t *decoder2, const wchar_t *ssl, const wchar_t *vq, const wchar_t *cfm, const wchar_t *bigvgan, const wchar_t *chinese_bert, const wchar_t *vocab) |
| Set GPT-SoVITS V3 models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV2ProModelFileA (struct AILIAVoice *net, const char *encoder, const char *decoder1, const char *decoder2, const char *ssl, const char *vits, const char *sv, const char *chinese_bert, const char *vocab) |
| Set GPT-SoVITS V2-Pro models into a network instance. More... | |
| int AILIA_API | ailiaVoiceOpenGPTSoVITSV2ProModelFileW (struct AILIAVoice *net, const wchar_t *encoder, const wchar_t *decoder1, const wchar_t *decoder2, const wchar_t *ssl, const wchar_t *vits, const wchar_t *sv, const wchar_t *chinese_bert, const wchar_t *vocab) |
| Set GPT-SoVITS V2-Pro models into a network instance. More... | |
| int AILIA_API | ailiaVoiceGraphemeToPhoneme (struct AILIAVoice *net, const char *utf8, int g2p_type) |
| Perform g2p. More... | |
| int AILIA_API | ailiaVoiceExtractFullContext (struct AILIAVoice *net, const char *utf8) |
| Perform ExtractFullContext. More... | |
| int AILIA_API | ailiaVoiceGetFeatureLength (struct AILIAVoice *net, unsigned int *len) |
| Gets the size of features. (Include null) More... | |
| int AILIA_API | ailiaVoiceGetFeatures (struct AILIAVoice *net, char *features, unsigned int len) |
| Gets the decoded features. More... | |
| int AILIA_API | ailiaVoiceSetReference (struct AILIAVoice *net, float *buf, unsigned int buf_size, unsigned int channels, unsigned int sampling_rate, const char *features) |
| Set the waveform and text as references for zero-shot voice synthesis. More... | |
| int AILIA_API | ailiaVoiceSetSampleSteps (struct AILIAVoice *net, int steps) |
| Set the number of CFM sampling steps for GPT-SoVITS v3. More... | |
| int AILIA_API | ailiaVoiceSetSpeed (struct AILIAVoice *net, float speed) |
| Set the speech speed for synthesis. More... | |
| int AILIA_API | ailiaVoiceSetModelType (struct AILIAVoice *net, int model_type) |
| Set the model type used for G2P processing. More... | |
| int AILIA_API | ailiaVoiceInference (struct AILIAVoice *net, const char *utf8) |
| Perform inference. More... | |
| int AILIA_API | ailiaVoiceGetWaveInfo (struct AILIAVoice *net, unsigned int *samples, unsigned int *channels, unsigned int *sampling_rate) |
| Gets the information of wave. More... | |
| int AILIA_API | ailiaVoiceGetWave (struct AILIAVoice *net, float *buf, unsigned int buf_size) |
| Gets the decoded features. More... | |
| void AILIA_API | ailiaVoiceDestroy (struct AILIAVoice *net) |
| It destroys the Voice instance. More... | |
| const char *AILIA_API | ailiaVoiceGetErrorDetail (struct AILIAVoice *net) |
| Returns the details of errors. More... | |
| #define AILIA_API __stdcall |
| #define AILIA_VOICE_API_CALLBACK_VERSION (3) |
Struct version.
| #define AILIA_VOICE_CLEANER_TYPE_BASIC (0) |
BasicCleaner.
| #define AILIA_VOICE_CLEANER_TYPE_ENGLISH (1) |
EnglishCleaner.
| #define AILIA_VOICE_DICTIONARY_TYPE_G2P_CN (2) |
Format for G2P_CN.
| #define AILIA_VOICE_DICTIONARY_TYPE_G2P_EN (1) |
Format for G2P_EN.
| #define AILIA_VOICE_DICTIONARY_TYPE_G2PW (3) |
Format for G2PW (Chinese polyphone disambiguation)
| #define AILIA_VOICE_DICTIONARY_TYPE_OPEN_JTALK (0) |
Format for OpenJTalk.
| #define AILIA_VOICE_FLAG_NONE (0) |
Default flag.
| #define AILIA_VOICE_G2P_TYPE_GPT_SOVITS_EN (1) |
GPT SOVITS English.
| #define AILIA_VOICE_G2P_TYPE_GPT_SOVITS_JA (2) |
GPT SOVITS Japanese.
| #define AILIA_VOICE_G2P_TYPE_GPT_SOVITS_ZH (3) |
GPT SOVITS Chinese.
| #define AILIA_VOICE_MODEL_TYPE_GPT_SOVITS (1) |
Format for GPT-SoVITS.
| #define AILIA_VOICE_MODEL_TYPE_GPT_SOVITS_V2 (2) |
Format for GPT-SoVITS V2.
| #define AILIA_VOICE_MODEL_TYPE_GPT_SOVITS_V2_PRO (4) |
Format for GPT-SoVITS v2-pro.
| #define AILIA_VOICE_MODEL_TYPE_GPT_SOVITS_V3 (3) |
Format for GPT-SoVITS v3.
| #define AILIA_VOICE_MODEL_TYPE_TACOTRON2 (0) |
Format for Tacotron2.
| #define AILIA_VOICE_TEXT_POST_PROCESS_APPEND_PUNCTUATION (2) |
| #define AILIA_VOICE_USER_API |
| #define ailiaVoiceOpenDictionaryFile ailiaVoiceOpenDictionaryFileA |
| #define ailiaVoiceOpenGPTSoVITSV1ModelFile ailiaVoiceOpenGPTSoVITSV1ModelFileA |
| #define ailiaVoiceOpenGPTSoVITSV2ModelFile ailiaVoiceOpenGPTSoVITSV2ModelFileA |
| #define ailiaVoiceOpenGPTSoVITSV2ProModelFile ailiaVoiceOpenGPTSoVITSV2ProModelFileA |
| #define ailiaVoiceOpenGPTSoVITSV3ModelFile ailiaVoiceOpenGPTSoVITSV3ModelFileA |
| #define ailiaVoiceOpenModelFile ailiaVoiceOpenModelFileA |
| #define ailiaVoiceOpenTacotron2ModelFile ailiaVoiceOpenTacotron2ModelFileA |
| #define ailiaVoiceSetUserDictionaryFile ailiaVoiceSetUserDictionaryFileA |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_AUDIO_GET_FRAME_LEN) (int *, int, int, int, int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_AUDIO_GET_MEL_SPECTROGRAM) (void *, const void *, int, int, int, int, int, int, int, int, float, int, float, float, int, int, int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_AUDIO_GET_RESAMPLE_LEN) (int *, int, int, int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_AUDIO_GET_SPECTROGRAM) (void *, const void *, int, int, int, int, int, int, int, float, int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_AUDIO_RESAMPLE) (void *, const void *, int, int, int, int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_COPY_BLOB_DATA) (struct AILIANetwork *dst_net, unsigned int dst_blob_idx, struct AILIANetwork *src_net, unsigned int src_blob_idx) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_CREATE) (struct AILIANetwork **, int, int) |
| typedef void(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_DESTROY) (struct AILIANetwork *) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_BLOB_DATA) (struct AILIANetwork *, void *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_BLOB_INDEX_BY_INPUT_INDEX) (struct AILIANetwork *, unsigned int *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_BLOB_INDEX_BY_OUTPUT_INDEX) (struct AILIANetwork *, unsigned int *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_BLOB_SHAPE) (struct AILIANetwork *, AILIAShape *, unsigned int, unsigned int) |
| typedef const char*(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_ERROR_DETAIL) (struct AILIANetwork *) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_INPUT_BLOB_COUNT) (struct AILIANetwork *, unsigned int *) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_GET_OUTPUT_BLOB_COUNT) (struct AILIANetwork *, unsigned int *) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_OPEN_WEIGHT_FILE_A) (struct AILIANetwork *, const char *) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_OPEN_WEIGHT_FILE_W) (struct AILIANetwork *, const wchar_t *) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_OPEN_WEIGHT_MEM) (struct AILIANetwork *, const void *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_SET_INPUT_BLOB_DATA) (struct AILIANetwork *, const void *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_SET_INPUT_BLOB_SHAPE) (struct AILIANetwork *, const AILIAShape *, unsigned int, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_SET_MEMORY_MODE) (struct AILIANetwork *, unsigned int) |
| typedef int(AILIA_VOICE_USER_API* AILIA_VOICE_USER_API_AILIA_UPDATE) (struct AILIANetwork *) |
| typedef struct _AILIAVoiceApiCallback AILIAVoiceApiCallback |
| int AILIA_API ailiaVoiceCreate | ( | struct AILIAVoice ** | net, |
| int | env_id, | ||
| int | num_thread, | ||
| int | memory_mode, | ||
| int | flags, | ||
| AILIAVoiceApiCallback | callback, | ||
| int | version | ||
| ) |
Creates a Voice instance.
| net | A pointer to the Voice instance pointer |
| env_id | The ID of the inference backend used for computation (obtained by ailiaGetEnvironment() ). It is selected automatically if AILIA_ENVIRONMENT_ID_AUTO is specified. |
| num_thread | The upper limit on the number of threads (It is set automatically if AILIA_MULTITHREAD_AUTO |
| memory_mode | The memory mode (AILIA_MEMORY_MODE_*) |
| flag | OR of AILIA_VOICE_FLAG_* |
| api_callback | The callback for ailia API |
| version | AILIA_VOICE_API_CALLBACK_VERSION is specified.) |
Creates a Voice instance.
| void AILIA_API ailiaVoiceDestroy | ( | struct AILIAVoice * | net | ) |
It destroys the Voice instance.
| net | A Voice instance pointer |
| int AILIA_API ailiaVoiceExtractFullContext | ( | struct AILIAVoice * | net, |
| const char * | utf8 | ||
| ) |
Perform ExtractFullContext.
| net | A Voice instance pointer |
| text | Text (UTF8) |
Get the result with ailiaVoiceGetFeatures API.
| const char* AILIA_API ailiaVoiceGetErrorDetail | ( | struct AILIAVoice * | net | ) |
Returns the details of errors.
| net | The network instance pointer |
The return value does not have to be released. The string is valid until the next ailiaVoice API function is called.
| int AILIA_API ailiaVoiceGetFeatureLength | ( | struct AILIAVoice * | net, |
| unsigned int * | len | ||
| ) |
Gets the size of features. (Include null)
| net | A Voice instance pointer |
| len | The length of features |
| int AILIA_API ailiaVoiceGetFeatures | ( | struct AILIAVoice * | net, |
| char * | features, | ||
| unsigned int | len | ||
| ) |
Gets the decoded features.
| net | A Voice instance pointer |
| features | Features(UTF8) |
| len | The length of features |
If ailiaVoiceGraphemeToPhoneme() or ailiaVoiceExtractFullContext() is not run at all, the function returns AILIA_STATUS_INVALID_STATE .
| int AILIA_API ailiaVoiceGetWave | ( | struct AILIAVoice * | net, |
| float * | buf, | ||
| unsigned int | buf_size | ||
| ) |
Gets the decoded features.
| net | A Voice instance pointer |
| buf | PCM Wave (Normalized by 0 - 1) |
| buf_size | Buffer size (Byte unit) |
If ailiaVoiceInference() is not run at all, the function returns AILIA_STATUS_INVALID_STATE .
| int AILIA_API ailiaVoiceGetWaveInfo | ( | struct AILIAVoice * | net, |
| unsigned int * | samples, | ||
| unsigned int * | channels, | ||
| unsigned int * | sampling_rate | ||
| ) |
Gets the information of wave.
| net | A Voice instance pointer |
| samples | Number of samples (per channel) |
| channels | Number of channels |
| sampling_rate | Sampling rate |
| int AILIA_API ailiaVoiceGraphemeToPhoneme | ( | struct AILIAVoice * | net, |
| const char * | utf8, | ||
| int | g2p_type | ||
| ) |
Perform g2p.
| net | A Voice instance pointer |
| text | Text(UTF8) |
| g2p_type | AILIA_VOICE_G2P_TYPE_* |
Get the result with ailiaVoiceGetFeatures API.
| int AILIA_API ailiaVoiceInference | ( | struct AILIAVoice * | net, |
| const char * | utf8 | ||
| ) |
Perform inference.
| net | A Voice instance pointer |
| text | Text(UTF8) |
Get the result with ailiaVoiceGetWave API.
| int AILIA_API ailiaVoiceOpenDictionaryFileA | ( | struct AILIAVoice * | net, |
| const char * | dictionary_path, | ||
| int | dictionary_type | ||
| ) |
Set dictionary into a network instance.
| net | A network instance pointer |
| dictionary_path | The path name to the dictionary folder (MBSC) |
| dictionary_type | AILIA_VOICE_DICTIONARY_TYPE_* |
For Chinese, GPT-SoVITS V1 requires only AILIA_VOICE_DICTIONARY_TYPE_G2P_CN . GPT-SoVITS V2 and V3 require both AILIA_VOICE_DICTIONARY_TYPE_G2P_CN and AILIA_VOICE_DICTIONARY_TYPE_G2PW . When using G2PW, load G2P_CN first.
| int AILIA_API ailiaVoiceOpenDictionaryFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | dictionary_path, | ||
| int | dictionary_type | ||
| ) |
Set dictionary into a network instance.
| net | A network instance pointer |
| dictionary_path | The path name to the dictionary folder (UTF16) |
| dictionary_type | AILIA_VOICE_DICTIONARY_TYPE_* |
For Chinese, GPT-SoVITS V1 requires only AILIA_VOICE_DICTIONARY_TYPE_G2P_CN . GPT-SoVITS V2 and V3 require both AILIA_VOICE_DICTIONARY_TYPE_G2P_CN and AILIA_VOICE_DICTIONARY_TYPE_G2PW . When using G2PW, load G2P_CN first.
| int AILIA_API ailiaVoiceOpenGPTSoVITSV1ModelFileA | ( | struct AILIAVoice * | net, |
| const char * | encoder, | ||
| const char * | decoder1, | ||
| const char * | decoder2, | ||
| const char * | wave, | ||
| const char * | ssl | ||
| ) |
Set GPT-SoVITS V1 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (MBSC) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (MBSC) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (MBSC) |
| wave | The path name to the onnx file (vits.onnx) (MBSC) |
| ssl | The path name to the onnx file (cnhubert.onnx) (MBSC) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV1ModelFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | encoder, | ||
| const wchar_t * | decoder1, | ||
| const wchar_t * | decoder2, | ||
| const wchar_t * | wave, | ||
| const wchar_t * | ssl | ||
| ) |
Set GPT-SoVITS V1 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (UTF16) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (UTF16) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (UTF16) |
| wave | The path name to the onnx file (vits.onnx) (UTF16) |
| ssl | The path name to the onnx file (cnhubert.onnx) (UTF16) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV2ModelFileA | ( | struct AILIAVoice * | net, |
| const char * | encoder, | ||
| const char * | decoder1, | ||
| const char * | decoder2, | ||
| const char * | wave, | ||
| const char * | ssl, | ||
| const char * | chinese_bert, | ||
| const char * | vocab | ||
| ) |
Set GPT-SoVITS V2 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (MBSC) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (MBSC) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (MBSC) |
| wave | The path name to the onnx file (vits.onnx) (MBSC) |
| ssl | The path name to the onnx file (cnhubert.onnx) (MBSC) |
| chinese_bert | The path name to the onnx file (chinese-roberta.onnx) (MBSC) (NULL to disable BERT) |
| vocab | The path name to the vocab file (vocab.txt) (MBSC) (NULL to disable BERT) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV2ModelFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | encoder, | ||
| const wchar_t * | decoder1, | ||
| const wchar_t * | decoder2, | ||
| const wchar_t * | wave, | ||
| const wchar_t * | ssl, | ||
| const wchar_t * | chinese_bert, | ||
| const wchar_t * | vocab | ||
| ) |
Set GPT-SoVITS V2 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (UTF16) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (UTF16) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (UTF16) |
| wave | The path name to the onnx file (vits.onnx) (UTF16) |
| ssl | The path name to the onnx file (cnhubert.onnx) (UTF16) |
| chinese_bert | The path name to the onnx file (chinese-roberta.onnx) (UTF16) (NULL to disable BERT) |
| vocab | The path name to the vocab file (vocab.txt) (UTF16) (NULL to disable BERT) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV2ProModelFileA | ( | struct AILIAVoice * | net, |
| const char * | encoder, | ||
| const char * | decoder1, | ||
| const char * | decoder2, | ||
| const char * | ssl, | ||
| const char * | vits, | ||
| const char * | sv, | ||
| const char * | chinese_bert, | ||
| const char * | vocab | ||
| ) |
Set GPT-SoVITS V2-Pro models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (MBSC) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (MBSC) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (MBSC) |
| ssl | The path name to the onnx file (cnhubert.onnx) (MBSC) |
| vits | The path name to the onnx file (vits.onnx) (MBSC) |
| sv | The path name to the onnx file (sv.onnx) (MBSC) |
| chinese_bert | The path name to the onnx file (chinese-roberta.onnx) (MBSC) (NULL to disable BERT) |
| vocab | The path name to the vocab file (vocab.txt) (MBSC) (NULL to disable BERT) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV2ProModelFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | encoder, | ||
| const wchar_t * | decoder1, | ||
| const wchar_t * | decoder2, | ||
| const wchar_t * | ssl, | ||
| const wchar_t * | vits, | ||
| const wchar_t * | sv, | ||
| const wchar_t * | chinese_bert, | ||
| const wchar_t * | vocab | ||
| ) |
Set GPT-SoVITS V2-Pro models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (UTF16) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (UTF16) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (UTF16) |
| ssl | The path name to the onnx file (cnhubert.onnx) (UTF16) |
| vits | The path name to the onnx file (vits.onnx) (UTF16) |
| sv | The path name to the onnx file (sv.onnx) (UTF16) |
| chinese_bert | The path name to the onnx file (chinese-roberta.onnx) (UTF16) (NULL to disable BERT) |
| vocab | The path name to the vocab file (vocab.txt) (UTF16) (NULL to disable BERT) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV3ModelFileA | ( | struct AILIAVoice * | net, |
| const char * | encoder, | ||
| const char * | decoder1, | ||
| const char * | decoder2, | ||
| const char * | ssl, | ||
| const char * | vq, | ||
| const char * | cfm, | ||
| const char * | bigvgan, | ||
| const char * | chinese_bert, | ||
| const char * | vocab | ||
| ) |
Set GPT-SoVITS V3 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (MBSC) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (MBSC) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (MBSC) |
| ssl | The path name to the onnx file (cnhubert.onnx) (MBSC) |
| vq | The path name to the onnx file (vq_model.onnx) (MBSC) |
| cfm | The path name to the onnx file (vq_cfm.onnx) (MBSC) |
| bigvgan | The path name to the onnx file (bigvgan_model.onnx) (MBSC) |
| chinese_bert | The path name to the onnx file (chinese-roberta.onnx) (MBSC) (NULL to disable BERT) |
| vocab | The path name to the vocab file (vocab.txt) (MBSC) (NULL to disable BERT) |
| int AILIA_API ailiaVoiceOpenGPTSoVITSV3ModelFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | encoder, | ||
| const wchar_t * | decoder1, | ||
| const wchar_t * | decoder2, | ||
| const wchar_t * | ssl, | ||
| const wchar_t * | vq, | ||
| const wchar_t * | cfm, | ||
| const wchar_t * | bigvgan, | ||
| const wchar_t * | chinese_bert, | ||
| const wchar_t * | vocab | ||
| ) |
Set GPT-SoVITS V3 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (t2s_encoder.onnx) (UTF16) |
| decoder1 | The path name to the onnx file (t2s_fsdec.onnx) (UTF16) |
| decoder2 | The path name to the onnx file (t2s_sdec.onnx) (UTF16) |
| ssl | The path name to the onnx file (cnhubert.onnx) (UTF16) |
| vq | The path name to the onnx file (vq_model.onnx) (UTF16) |
| cfm | The path name to the onnx file (vq_cfm.onnx) (UTF16) |
| bigvgan | The path name to the onnx file (bigvgan_model.onnx) (UTF16) |
| chinese_bert | The path name to the onnx file (chinese-roberta.onnx) (UTF16) (NULL to disable BERT) |
| vocab | The path name to the vocab file (vocab.txt) (UTF16) (NULL to disable BERT) |
| int AILIA_API ailiaVoiceOpenModelFileA | ( | struct AILIAVoice * | net, |
| const char * | encoder, | ||
| const char * | decoder1, | ||
| const char * | decoder2, | ||
| const char * | wave, | ||
| const char * | ssl, | ||
| int | model_type, | ||
| int | cleaner_type | ||
| ) |
Set models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (MBSC) |
| decoder1 | The path name to the onnx file (MBSC) |
| decoder2 | The path name to the onnx file (MBSC) |
| wave | The path name to the onnx file (MBSC) |
| ssl | The path name to the onnx file (MBSC) |
| model_type | AILIA_VOICE_MODEL_TYPE_* |
| cleaner_type | AILIA_VOICE_CLEANER_TYPE_* |
This function is deprecated. Use ailiaVoiceOpenTacotron2ModelFileA, ailiaVoiceOpenGPTSoVITSV1ModelFileA, ailiaVoiceOpenGPTSoVITSV2ModelFileA instead.
| int AILIA_API ailiaVoiceOpenModelFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | encoder, | ||
| const wchar_t * | decoder1, | ||
| const wchar_t * | decoder2, | ||
| const wchar_t * | wave, | ||
| const wchar_t * | ssl, | ||
| int | model_type, | ||
| int | cleaner_type | ||
| ) |
Set models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (UTF16) |
| decoder1 | The path name to the onnx file (UTF16) |
| decoder2 | The path name to the onnx file (UTF16) |
| wave | The path name to the onnx file (UTF16) |
| ssl | The path name to the onnx file (UTF16) |
| model_type | AILIA_VOICE_MODEL_TYPE_* |
| cleaner_type | AILIA_VOICE_CLEANER_TYPE_* |
This function is deprecated. Use ailiaVoiceOpenTacotron2ModelFileW, ailiaVoiceOpenGPTSoVITSV1ModelFileW, ailiaVoiceOpenGPTSoVITSV2ModelFileW instead.
| int AILIA_API ailiaVoiceOpenTacotron2ModelFileA | ( | struct AILIAVoice * | net, |
| const char * | encoder, | ||
| const char * | decoder1, | ||
| const char * | decoder2, | ||
| const char * | wave, | ||
| int | cleaner_type | ||
| ) |
Set Tacotron2 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (encoder.onnx) (MBSC) |
| decoder1 | The path name to the onnx file (decoder_iter.onnx) (MBSC) |
| decoder2 | The path name to the onnx file (postnet.onnx) (MBSC) |
| wave | The path name to the onnx file (waveglow.onnx) (MBSC) |
| cleaner_type | AILIA_VOICE_CLEANER_TYPE_* |
| int AILIA_API ailiaVoiceOpenTacotron2ModelFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | encoder, | ||
| const wchar_t * | decoder1, | ||
| const wchar_t * | decoder2, | ||
| const wchar_t * | wave, | ||
| int | cleaner_type | ||
| ) |
Set Tacotron2 models into a network instance.
| net | A network instance pointer |
| encoder | The path name to the onnx file (encoder.onnx) (UTF16) |
| decoder1 | The path name to the onnx file (decoder_iter.onnx) (UTF16) |
| decoder2 | The path name to the onnx file (postnet.onnx) (UTF16) |
| wave | The path name to the onnx file (waveglow.onnx) (UTF16) |
| cleaner_type | AILIA_VOICE_CLEANER_TYPE_* |
| int AILIA_API ailiaVoiceSetModelType | ( | struct AILIAVoice * | net, |
| int | model_type | ||
| ) |
Set the model type used for G2P processing.
| net | A Voice instance pointer |
| model_type | Model type (AILIA_VOICE_MODEL_TYPE_GPT_SOVITS, AILIA_VOICE_MODEL_TYPE_GPT_SOVITS_V2, AILIA_VOICE_MODEL_TYPE_GPT_SOVITS_V3, AILIA_VOICE_MODEL_TYPE_GPT_SOVITS_V2_PRO) |
Used to set the model type when using G2P standalone without opening model files. If ailiaVoiceOpenModelFileA or ailiaVoiceOpenGPTSoVITSV3ModelFileA is called, the model type is set automatically, so calling this API is not required.
| int AILIA_API ailiaVoiceSetReference | ( | struct AILIAVoice * | net, |
| float * | buf, | ||
| unsigned int | buf_size, | ||
| unsigned int | channels, | ||
| unsigned int | sampling_rate, | ||
| const char * | features | ||
| ) |
Set the waveform and text as references for zero-shot voice synthesis.
| net | A Voice instance pointer |
| buf | PCM Wave (Normalized by 0 - 1) |
| buf_size | buffer size (byte unit) |
| channels | num channels |
| sampling_rate | sampling rate |
| features | Feature (UTF8) |
| int AILIA_API ailiaVoiceSetSampleSteps | ( | struct AILIAVoice * | net, |
| int | steps | ||
| ) |
Set the number of CFM sampling steps for GPT-SoVITS v3.
| net | A Voice instance pointer |
| steps | Number of Euler ODE steps for CFM (default 4) |
| int AILIA_API ailiaVoiceSetSpeed | ( | struct AILIAVoice * | net, |
| float | speed | ||
| ) |
Set the speech speed for synthesis.
| net | A Voice instance pointer |
| speed | Speed value (default 1.0, must be greater than 0) |
Supported by GPT-SoVITS V2 and V3. Not effective for V1.
| int AILIA_API ailiaVoiceSetUserDictionaryFileA | ( | struct AILIAVoice * | net, |
| const char * | dictionary_path, | ||
| int | dictionary_type | ||
| ) |
Set user dictionary into a network instance.
| net | A network instance pointer |
| dictionary_path | The path name to the user dictionary file (MBSC) |
| dictionary_type | AILIA_VOICE_DICTIONARY_TYPE_* |
You need to call before ailiaVoiceOpenDictionaryFileA.
| int AILIA_API ailiaVoiceSetUserDictionaryFileW | ( | struct AILIAVoice * | net, |
| const wchar_t * | dictionary_path, | ||
| int | dictionary_type | ||
| ) |
Set user dictionary into a network instance.
| net | A network instance pointer |
| dictionary_path | The path name to the user dictionary file (UTF16) |
| dictionary_type | AILIA_VOICE_DICTIONARY_TYPE_* |
You need to call before ailiaVoiceOpenDictionaryFileW.