|
ailia_voice
1.3.0.0
|
Classes | |
| struct | AILIAVoiceApiCallback |
Public Member Functions | |
| delegate int | ailiaCallbackAudioResample (IntPtr a, IntPtr b, int c, int d, int e, int f) |
| delegate int | ailiaCallbackAudioGetResampleLen (IntPtr a, int b, int c, int d) |
| delegate int | ailiaCallbackCreate (IntPtr a, int b, int c) |
| delegate int | ailiaCallbackOpenWeightFileA (IntPtr a, IntPtr b) |
| delegate int | ailiaCallbackOpenWeightFileW (IntPtr a, IntPtr b) |
| delegate int | ailiaCallbackOpenWeightMem (IntPtr a, IntPtr b, UInt32 c) |
| delegate int | ailiaCallbackSetMemoryMode (IntPtr a, UInt32 b) |
| delegate void | ailiaCallbackDestroy (IntPtr a) |
| delegate int | ailiaCallbackUpdate (IntPtr a) |
| delegate int | ailiaCallbackGetBlobIndexByInputIndex (IntPtr a, IntPtr b, uint c) |
| delegate int | ailiaCallbackGetBlobIndexByOutputIndex (IntPtr a, IntPtr b, uint c) |
| delegate int | ailiaCallbackGetBlobData (IntPtr a, IntPtr b, uint c, uint d) |
| delegate int | ailiaCallbackSetInputBlobData (IntPtr a, IntPtr b, uint c, uint d) |
| delegate int | ailiaCallbackSetInputBlobShape (IntPtr a, Ailia.AILIAShape b, uint c, uint d) |
| delegate int | ailiaCallbackGetBlobShape (IntPtr a, IntPtr b, uint c, uint d) |
| delegate int | ailiaCallbackGetInputBlobCount (IntPtr a, IntPtr b) |
| delegate int | ailiaCallbackGetOutputBlobCount (IntPtr a, IntPtr b) |
| delegate IntPtr | ailiaCallbackGetErrorDetail (IntPtr a) |
| delegate int | ailiaCallbackCopyBlobData (IntPtr a, uint b, IntPtr c, uint d) |
| static int | ailiaCreate (IntPtr net, int env_id, int num_thread) |
| static int | ailiaOpenWeightFileW (IntPtr net, IntPtr path) |
| static int | ailiaOpenWeightFileA (IntPtr net, IntPtr path) |
| static int | ailiaOpenWeightMem (IntPtr net, IntPtr buf, uint buf_size) |
| static int | ailiaGetBlobIndexByInputIndex (IntPtr net, IntPtr blob_idx, UInt32 input_blob_idx) |
| static int | ailiaGetBlobIndexByOutputIndex (IntPtr net, IntPtr blob_idx, UInt32 output_blob_idx) |
| static int | ailiaGetBlobShape (IntPtr net, IntPtr shape, UInt32 blob_idx, UInt32 version) |
| static int | ailiaGetInputBlobCount (IntPtr net, IntPtr shape) |
| static int | ailiaGetOutputBlobCount (IntPtr net, IntPtr shape) |
| static int | ailiaAudioResample (IntPtr a, IntPtr b, int c, int d, int e, int f) |
| static int | ailiaAudioGetResampleLen (IntPtr a, int b, int c, int d) |
| static int | ailiaVoiceCreate (ref IntPtr net, int env_id, int num_thread, int memory_mode, int flags, AILIAVoiceApiCallback callback, int version) |
| Creates a Voice instance. More... | |
| static int | ailiaVoiceSetUserDictionaryFile (IntPtr net, string dictionary_path, int dictionary_type) |
| Set user dictionary into a network instance. More... | |
| static int | ailiaVoiceOpenDictionaryFile (IntPtr net, string dictionary_path, int dictionary_type) |
| Set dictionary into a network instance. More... | |
| static int | ailiaVoiceOpenModelFile (IntPtr net, string encoder, string decoder1, string decoder2, string wave, string ssl, int model_type, int cleaner_type) |
| Set models into a network instance. More... | |
| static int | ailiaVoiceGraphemeToPhoneme (IntPtr net, IntPtr utf8, int g2p_type) |
| Perform g2p. More... | |
| static int | ailiaVoiceExtractFullContext (IntPtr net, IntPtr utf8) |
| Perform ExtractFullContext. More... | |
| static int | ailiaVoiceGetFeatureLength (IntPtr net, ref uint len) |
| Gets the size of features. (Include null) More... | |
| static int | ailiaVoiceGetFeatures (IntPtr net, IntPtr features, uint len) |
| Gets the decoded features. More... | |
| static int | ailiaVoiceSetReference (IntPtr net, IntPtr buf, uint buf_size, uint channels, uint sampling_rate, IntPtr features) |
| Set the waveform and text as references for zero-shot voice synthesis. More... | |
| static int | ailiaVoiceInference (IntPtr net, IntPtr utf8) |
| Perform inference. More... | |
| static int | ailiaVoiceGetWaveInfo (IntPtr net, ref uint samples, ref uint channels, ref uint sampling_rate) |
| Gets the information of wave. More... | |
| static int | ailiaVoiceGetWave (IntPtr net, IntPtr buf, uint buf_size) |
| Gets the decoded features. More... | |
| static void | ailiaVoiceDestroy (IntPtr net) |
| It destroys the Voice instance. More... | |
| static IntPtr | ailiaVoiceGetErrorDetail (IntPtr net) |
| Returns the details of errors. More... | |
Static Public Member Functions | |
| static int | ailiaCallbackAudioResampleBridge (IntPtr a, IntPtr b, int c, int d, int e, int f) |
| static int | ailiaCallbackAudioGetResampleLenBridge (IntPtr a, int b, int c, int d) |
| static int | ailiaCallbackCreateBridge (IntPtr a, int b, int c) |
| static int | ailiaCallbackOpenWeightFileABridge (IntPtr a, IntPtr b) |
| static int | ailiaCallbackOpenWeightFileWBridge (IntPtr a, IntPtr b) |
| static int | ailiaCallbackOpenWeightMemBridge (IntPtr a, IntPtr b, uint c) |
| static int | ailiaCallbackSetMemoryModeBridge (IntPtr a, uint b) |
| static void | ailiaCallbackDestroyBridge (IntPtr a) |
| static int | ailiaCallbackUpdateBridge (IntPtr a) |
| static int | ailiaCallbackGetBlobIndexByInputIndexBridge (IntPtr a, IntPtr b, uint c) |
| static int | ailiaCallbackGetBlobIndexByOutputIndexBridge (IntPtr a, IntPtr b, uint c) |
| static int | ailiaCallbackGetBlobDataBridge (IntPtr a, IntPtr b, uint c, uint d) |
| static int | ailiaCallbackSetInputBlobDataBridge (IntPtr a, IntPtr b, uint c, uint d) |
| static int | ailiaCallbackSetInputBlobShapeBridge (IntPtr a, Ailia.AILIAShape b, uint c, uint d) |
| static int | ailiaCallbackGetBlobShapeBridge (IntPtr a, IntPtr b, uint c, uint d) |
| static int | ailiaCallbackGetInputBlobCountBridge (IntPtr a, IntPtr b) |
| static int | ailiaCallbackGetOutputBlobCountBridge (IntPtr a, IntPtr b) |
| static IntPtr | ailiaCallbackGetErrorDetailBridge (IntPtr a) |
| static int | ailiaCallbackCopyBlobDataBridge (IntPtr a, uint b, IntPtr c, uint d) |
| static AiliaVoice.AILIAVoiceApiCallback | GetCallback () |
Static Public Attributes | |
| const String | LIBRARY_NAME ="ailia_voice" |
| const Int32 | AILIA_VOICE_DICTIONARY_TYPE_OPEN_JTALK = (0) |
| const Int32 | AILIA_VOICE_DICTIONARY_TYPE_G2P_EN = (1) |
| const Int32 | AILIA_VOICE_MODEL_TYPE_TACOTRON2 = (0) |
| const Int32 | AILIA_VOICE_MODEL_TYPE_GPT_SOVITS = (1) |
| const Int32 | AILIA_VOICE_CLEANER_TYPE_BASIC = (0) |
| const Int32 | AILIA_VOICE_CLEANER_TYPE_ENGLISH = (1) |
| const Int32 | AILIA_VOICE_FLAG_NONE = (0) |
| const Int32 | AILIA_VOICE_G2P_TYPE_GPT_SOVITS_EN = (1) |
| const Int32 | AILIA_VOICE_G2P_TYPE_GPT_SOVITS_JA = (2) |
| const Int32 | AILIA_VOICE_TEXT_POST_PROCESS_APPEND_PUNCTUATION = (2) |
| const int | AILIA_VOICE_API_CALLBACK_VERSION = (2) |
| static int ailiaVoice.AiliaVoice.ailiaAudioGetResampleLen | ( | IntPtr | a, |
| int | b, | ||
| int | c, | ||
| int | d | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaAudioResample | ( | IntPtr | a, |
| IntPtr | b, | ||
| int | c, | ||
| int | d, | ||
| int | e, | ||
| int | f | ||
| ) |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackAudioGetResampleLen | ( | IntPtr | a, |
| int | b, | ||
| int | c, | ||
| int | d | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackAudioResample | ( | IntPtr | a, |
| IntPtr | b, | ||
| int | c, | ||
| int | d, | ||
| int | e, | ||
| int | f | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackCopyBlobData | ( | IntPtr | a, |
| uint | b, | ||
| IntPtr | c, | ||
| uint | d | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackCreate | ( | IntPtr | a, |
| int | b, | ||
| int | c | ||
| ) |
|
inlinestatic |
| delegate void ailiaVoice.AiliaVoice.ailiaCallbackDestroy | ( | IntPtr | a | ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackGetBlobData | ( | IntPtr | a, |
| IntPtr | b, | ||
| uint | c, | ||
| uint | d | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackGetBlobIndexByInputIndex | ( | IntPtr | a, |
| IntPtr | b, | ||
| uint | c | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackGetBlobIndexByOutputIndex | ( | IntPtr | a, |
| IntPtr | b, | ||
| uint | c | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackGetBlobShape | ( | IntPtr | a, |
| IntPtr | b, | ||
| uint | c, | ||
| uint | d | ||
| ) |
|
inlinestatic |
| delegate IntPtr ailiaVoice.AiliaVoice.ailiaCallbackGetErrorDetail | ( | IntPtr | a | ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackGetInputBlobCount | ( | IntPtr | a, |
| IntPtr | b | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackGetOutputBlobCount | ( | IntPtr | a, |
| IntPtr | b | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackOpenWeightFileA | ( | IntPtr | a, |
| IntPtr | b | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackOpenWeightFileW | ( | IntPtr | a, |
| IntPtr | b | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackOpenWeightMem | ( | IntPtr | a, |
| IntPtr | b, | ||
| UInt32 | c | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackSetInputBlobData | ( | IntPtr | a, |
| IntPtr | b, | ||
| uint | c, | ||
| uint | d | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackSetInputBlobShape | ( | IntPtr | a, |
| Ailia.AILIAShape | b, | ||
| uint | c, | ||
| uint | d | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackSetMemoryMode | ( | IntPtr | a, |
| UInt32 | b | ||
| ) |
|
inlinestatic |
| delegate int ailiaVoice.AiliaVoice.ailiaCallbackUpdate | ( | IntPtr | a | ) |
|
inlinestatic |
| static int ailiaVoice.AiliaVoice.ailiaCreate | ( | IntPtr | net, |
| int | env_id, | ||
| int | num_thread | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaGetBlobIndexByInputIndex | ( | IntPtr | net, |
| IntPtr | blob_idx, | ||
| UInt32 | input_blob_idx | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaGetBlobIndexByOutputIndex | ( | IntPtr | net, |
| IntPtr | blob_idx, | ||
| UInt32 | output_blob_idx | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaGetBlobShape | ( | IntPtr | net, |
| IntPtr | shape, | ||
| UInt32 | blob_idx, | ||
| UInt32 | version | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaGetInputBlobCount | ( | IntPtr | net, |
| IntPtr | shape | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaGetOutputBlobCount | ( | IntPtr | net, |
| IntPtr | shape | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaOpenWeightFileA | ( | IntPtr | net, |
| IntPtr | path | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaOpenWeightFileW | ( | IntPtr | net, |
| IntPtr | path | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaOpenWeightMem | ( | IntPtr | net, |
| IntPtr | buf, | ||
| uint | buf_size | ||
| ) |
| static int ailiaVoice.AiliaVoice.ailiaVoiceCreate | ( | ref IntPtr | 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.
| static void ailiaVoice.AiliaVoice.ailiaVoiceDestroy | ( | IntPtr | net | ) |
It destroys the Voice instance.
| net | A Voice instance pointer |
| static int ailiaVoice.AiliaVoice.ailiaVoiceExtractFullContext | ( | IntPtr | net, |
| IntPtr | utf8 | ||
| ) |
Perform ExtractFullContext.
| net | A Voice instance pointer |
| text | Text (UTF8) |
Get the result with ailiaVoiceGetFeatures API.
| static IntPtr ailiaVoice.AiliaVoice.ailiaVoiceGetErrorDetail | ( | IntPtr | 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. Convert from the point obtained to a string as follows
| static int ailiaVoice.AiliaVoice.ailiaVoiceGetFeatureLength | ( | IntPtr | net, |
| ref uint | len | ||
| ) |
Gets the size of features. (Include null)
| net | A Voice instance pointer |
| len | The length of features |
| static int ailiaVoice.AiliaVoice.ailiaVoiceGetFeatures | ( | IntPtr | net, |
| IntPtr | features, | ||
| uint | len | ||
| ) |
Gets the decoded features.
| net | A Voice instance pointer |
| features | Features(UTF8) |
| len | Buffer size |
If ailiaVoiceGraphemeToPhoneme() or ailiaVoiceExtractFullContext() is not run at all, the function returns AILIA_STATUS_INVALID_STATE .
| static int ailiaVoice.AiliaVoice.ailiaVoiceGetWave | ( | IntPtr | net, |
| IntPtr | buf, | ||
| uint | buf_size | ||
| ) |
Gets the decoded features.
| net | A Voice instance pointer |
| buf | PCM Wave |
| buf_size | Buffer size (Byte unit) |
If ailiaVoiceInference() is not run at all, the function returns AILIA_STATUS_INVALID_STATE .
| static int ailiaVoice.AiliaVoice.ailiaVoiceGetWaveInfo | ( | IntPtr | net, |
| ref uint | samples, | ||
| ref uint | channels, | ||
| ref uint | 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 |
| static int ailiaVoice.AiliaVoice.ailiaVoiceGraphemeToPhoneme | ( | IntPtr | net, |
| IntPtr | 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.
| static int ailiaVoice.AiliaVoice.ailiaVoiceInference | ( | IntPtr | net, |
| IntPtr | utf8 | ||
| ) |
Perform inference.
| net | A Voice instance pointer |
| text | Text(UTF8) |
Get the result with ailiaVoiceGetWave API.
| static int ailiaVoice.AiliaVoice.ailiaVoiceOpenDictionaryFile | ( | IntPtr | net, |
| string | 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 |
| dictionary_type | AILIA_VOICE_DICTIONARY_TYPE_* |
| static int ailiaVoice.AiliaVoice.ailiaVoiceOpenModelFile | ( | IntPtr | net, |
| string | encoder, | ||
| string | decoder1, | ||
| string | decoder2, | ||
| string | wave, | ||
| string | 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 |
| decoder1 | The path name to the onnx file |
| decoder2 | The path name to the onnx file |
| wave | The path name to the onnx file |
| ssl | The path name to the onnx file |
| model_type | AILIA_VOICE_MODEL_TYPE_* |
| cleaner_type | AILIA_VOICE_CLEANER_TYPE_* |
| static int ailiaVoice.AiliaVoice.ailiaVoiceSetReference | ( | IntPtr | net, |
| IntPtr | buf, | ||
| uint | buf_size, | ||
| uint | channels, | ||
| uint | sampling_rate, | ||
| IntPtr | 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) |
| static int ailiaVoice.AiliaVoice.ailiaVoiceSetUserDictionaryFile | ( | IntPtr | net, |
| string | 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.
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.17