ailia_speech
1.4.0.0
|
Classes | |
struct | AILIASpeechApiCallback |
class | AILIASpeechText |
Public Member Functions | |
delegate int | ailiaCallbackAudioGetFrameLen (ref Int32 a, int b, int c, int d, int e) |
delegate int | ailiaCallbackAudioGetMelSpectrogram (IntPtr a, IntPtr b, int c, int d, int e, int f, int g, int h, int i, int j, float k, int l, float m, float n, int o, int p, int q) |
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 | ailiaCallbackTokenizerCreate (IntPtr a, int b, int c) |
delegate int | ailiaCallbackTokenizerOpenModelFileA (IntPtr a, IntPtr b) |
delegate int | ailiaCallbackTokenizerOpenModelFileW (IntPtr a, IntPtr b) |
delegate int | ailiaCallbackTokenizerEncode (IntPtr a, IntPtr b) |
delegate int | ailiaCallbackTokenizerGetTokenCount (IntPtr a, IntPtr b) |
delegate int | ailiaCallbackTokenizerGetTokens (IntPtr a, IntPtr b, uint c) |
delegate int | ailiaCallbackTokenizerDecode (IntPtr a, IntPtr b, uint c) |
delegate int | ailiaCallbackTokenizerGetTextLength (IntPtr a, IntPtr b) |
delegate int | ailiaCallbackTokenizerGetText (IntPtr a, IntPtr b, uint c) |
delegate void | ailiaCallbackTokenizerDestroy (IntPtr a) |
delegate int | ailiaCallbackTokenizerUtf8ToUtf32 (IntPtr a, IntPtr b, IntPtr c, uint d) |
delegate int | ailiaCallbackTokenizerUtf32ToUtf8 (IntPtr a, IntPtr b, uint c) |
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 IntPtr | ailiaCallbackGetErrorDetail (IntPtr a) |
delegate int | ailiaCallbackCopyBlobData (IntPtr a, uint b, IntPtr c, uint d) |
delegate int | ailiaCallbackGetEnvironment (IntPtr a, uint b, uint d) |
delegate int | ailiaIntermediateCallback (IntPtr handle, IntPtr text) |
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 | ailiaAudioGetMelSpectrogram (IntPtr dst, IntPtr src, int sample_n, int sample_rate, int fft_n, int hop_n, int win_n, int win_type, int max_frame_n, int center, float power, int fft_norm_type, float f_min, float f_max, int mel_n, int mel_norm_type, int mel_formula) |
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 | ailiaGetEnvironment (IntPtr net, UInt32 env_idx, UInt32 version) |
static int | ailiaTokenizerCreate (IntPtr net, int type, int flags) |
static int | ailiaTokenizerOpenModelFileA (IntPtr net, IntPtr utf8) |
static int | ailiaTokenizerOpenModelFileW (IntPtr net, IntPtr utf16) |
static int | ailiaTokenizerEncode (IntPtr net, IntPtr utf8) |
static int | ailiaTokenizerGetTokenCount (IntPtr net, IntPtr count) |
static int | ailiaTokenizerGetTextLength (IntPtr net, IntPtr len) |
static int | ailiaTokenizerUtf8ToUtf32 (IntPtr a, IntPtr b, IntPtr c, uint d) |
static int | ailiaTokenizerUtf32ToUtf8 (IntPtr a, IntPtr b, uint c) |
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 | ailiaSpeechCreate (ref IntPtr net, int env_id, int num_thread, int memory_mode, int task, int flag, AILIASpeechApiCallback callback, int version) |
Creates a network instance. More... | |
static int | ailiaSpeechOpenModelFile (IntPtr net, string encoder_path, string decoder_path, int model_type) |
Set models into a network instance. More... | |
static int | ailiaSpeechOpenVadFile (IntPtr net, string vad_path, int vad_type) |
Set vad model for voice activity detection. More... | |
static int | ailiaSpeechOpenDictionaryFile (IntPtr net, string dictionary_path, int dictionary_type) |
Set dictionary for error correction. More... | |
static int | ailiaSpeechOpenPostProcessFile (IntPtr net, string encoder_path, string decoder_path, string source_path, string target_path, IntPtr prefix, int post_process_type) |
Set AI model for post process. More... | |
static int | ailiaSpeechOpenDiarizationFile (IntPtr net, string segmentation_path, string embedding_path, int type) |
Set AI model for speaker diarization. More... | |
static int | ailiaSpeechPushInputData (IntPtr net, float[] src, uint channels, uint samples, uint sampling_rate) |
Push PCM data to queue. More... | |
static int | ailiaSpeechFinalizeInputData (IntPtr net) |
Finalize input PCM data to queue. More... | |
static int | ailiaSpeechBuffered (IntPtr net, ref uint buffered) |
Is processing data exist. More... | |
static int | ailiaSpeechComplete (IntPtr net, ref uint complete) |
Is processed all data. More... | |
static int | ailiaSpeechSetPrompt (IntPtr net, IntPtr prompt) |
Set prompt. More... | |
static int | ailiaSpeechSetConstraint (IntPtr net, IntPtr constraint, int type) |
Set constraint. More... | |
static int | ailiaSpeechSetLanguage (IntPtr net, string language) |
Performs the inferences and provides the inference result. More... | |
static int | ailiaSpeechSetIntermediateCallback (IntPtr net, ailiaIntermediateCallback callback, IntPtr handle) |
Set a callback to get intermediate results of recognition. More... | |
static int | ailiaSpeechTranscribe (IntPtr net) |
Speech recognition. More... | |
static int | ailiaSpeechPostProcess (IntPtr net) |
Execute post process. More... | |
static int | ailiaSpeechGetTextCount (IntPtr net, ref uint count) |
Get text count. More... | |
static int | ailiaSpeechGetText (IntPtr net, [In, Out] AILIASpeechText text, uint version, uint idx) |
Get text length. More... | |
static int | ailiaSpeechSetText (IntPtr net, [In] AILIASpeechText text, uint version, uint idx) |
Set postprocess text. More... | |
static void | ailiaSpeechDestroy (IntPtr net) |
It destroys the network instance. More... | |
static IntPtr | ailiaSpeechGetErrorDetail (IntPtr net) |
Returns the details of errors. More... | |
static int | ailiaSpeechSetSilentThreshold (IntPtr net, float silent_threshold, float speech_sec, float no_speech_sec) |
Set silent threshold. More... | |
static int | ailiaSpeechResetTranscribeState (IntPtr net) |
It resets the network instance. More... | |
Static Public Member Functions | |
static int | ailiaCallbackAudioGetFrameLenBridge (ref Int32 a, int b, int c, int d, int e) |
static int | ailiaCallbackAudioGetMelSpectrogramBridge (IntPtr a, IntPtr b, int c, int d, int e, int f, int g, int h, int i, int j, float k, int l, float m, float n, int o, int p, int q) |
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 | ailiaCallbackTokenizerCreateBridge (IntPtr a, int b, int c) |
static int | ailiaCallbackTokenizerOpenModelFileABridge (IntPtr a, IntPtr b) |
static int | ailiaCallbackTokenizerOpenModelFileWBridge (IntPtr a, IntPtr b) |
static int | ailiaCallbackTokenizerEncodeBridge (IntPtr a, IntPtr b) |
static int | ailiaCallbackTokenizerGetTokenCountBridge (IntPtr a, IntPtr b) |
static int | ailiaCallbackTokenizerGetTokensBridge (IntPtr a, IntPtr b, uint c) |
static int | ailiaCallbackTokenizerDecodeBridge (IntPtr a, IntPtr b, uint c) |
static int | ailiaCallbackTokenizerGetTextLengthBridge (IntPtr a, IntPtr b) |
static int | ailiaCallbackTokenizerGetTextBridge (IntPtr a, IntPtr b, uint c) |
static void | ailiaCallbackTokenizerDestroyBridge (IntPtr a) |
static int | ailiaCallbackTokenizerUtf8ToUtf32Bridge (IntPtr a, IntPtr b, IntPtr c, uint d) |
static int | ailiaCallbackTokenizerUtf32ToUtf8Bridge (IntPtr a, IntPtr b, uint c) |
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 IntPtr | ailiaCallbackGetErrorDetailBridge (IntPtr a) |
static int | ailiaCallbackCopyBlobDataBridge (IntPtr a, uint b, IntPtr c, uint d) |
static int | ailiaCallbackGetEnvironmentBridge (IntPtr a, uint b, uint c) |
static AiliaSpeech.AILIASpeechApiCallback | GetCallback () |
static int ailiaSpeech.AiliaSpeech.ailiaAudioGetMelSpectrogram | ( | IntPtr | dst, |
IntPtr | src, | ||
int | sample_n, | ||
int | sample_rate, | ||
int | fft_n, | ||
int | hop_n, | ||
int | win_n, | ||
int | win_type, | ||
int | max_frame_n, | ||
int | center, | ||
float | power, | ||
int | fft_norm_type, | ||
float | f_min, | ||
float | f_max, | ||
int | mel_n, | ||
int | mel_norm_type, | ||
int | mel_formula | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaAudioGetResampleLen | ( | IntPtr | a, |
int | b, | ||
int | c, | ||
int | d | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaAudioResample | ( | IntPtr | a, |
IntPtr | b, | ||
int | c, | ||
int | d, | ||
int | e, | ||
int | f | ||
) |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackAudioGetFrameLen | ( | ref Int32 | a, |
int | b, | ||
int | c, | ||
int | d, | ||
int | e | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackAudioGetMelSpectrogram | ( | IntPtr | a, |
IntPtr | b, | ||
int | c, | ||
int | d, | ||
int | e, | ||
int | f, | ||
int | g, | ||
int | h, | ||
int | i, | ||
int | j, | ||
float | k, | ||
int | l, | ||
float | m, | ||
float | n, | ||
int | o, | ||
int | p, | ||
int | q | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackAudioGetResampleLen | ( | IntPtr | a, |
int | b, | ||
int | c, | ||
int | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackAudioResample | ( | IntPtr | a, |
IntPtr | b, | ||
int | c, | ||
int | d, | ||
int | e, | ||
int | f | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackCopyBlobData | ( | IntPtr | a, |
uint | b, | ||
IntPtr | c, | ||
uint | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackCreate | ( | IntPtr | a, |
int | b, | ||
int | c | ||
) |
|
inlinestatic |
delegate void ailiaSpeech.AiliaSpeech.ailiaCallbackDestroy | ( | IntPtr | a | ) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackGetBlobData | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c, | ||
uint | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackGetBlobIndexByInputIndex | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackGetBlobIndexByOutputIndex | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackGetBlobShape | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c, | ||
uint | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackGetEnvironment | ( | IntPtr | a, |
uint | b, | ||
uint | d | ||
) |
|
inlinestatic |
delegate IntPtr ailiaSpeech.AiliaSpeech.ailiaCallbackGetErrorDetail | ( | IntPtr | a | ) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackOpenWeightFileA | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackOpenWeightFileW | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackOpenWeightMem | ( | IntPtr | a, |
IntPtr | b, | ||
UInt32 | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackSetInputBlobData | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c, | ||
uint | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackSetInputBlobShape | ( | IntPtr | a, |
Ailia.AILIAShape | b, | ||
uint | c, | ||
uint | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackSetMemoryMode | ( | IntPtr | a, |
UInt32 | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerCreate | ( | IntPtr | a, |
int | b, | ||
int | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerDecode | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
|
inlinestatic |
delegate void ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerDestroy | ( | IntPtr | a | ) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerEncode | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerGetText | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerGetTextLength | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerGetTokenCount | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerGetTokens | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerOpenModelFileA | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerOpenModelFileW | ( | IntPtr | a, |
IntPtr | b | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerUtf32ToUtf8 | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackTokenizerUtf8ToUtf32 | ( | IntPtr | a, |
IntPtr | b, | ||
IntPtr | c, | ||
uint | d | ||
) |
|
inlinestatic |
delegate int ailiaSpeech.AiliaSpeech.ailiaCallbackUpdate | ( | IntPtr | a | ) |
|
inlinestatic |
static int ailiaSpeech.AiliaSpeech.ailiaCreate | ( | IntPtr | net, |
int | env_id, | ||
int | num_thread | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaGetBlobIndexByInputIndex | ( | IntPtr | net, |
IntPtr | blob_idx, | ||
UInt32 | input_blob_idx | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaGetBlobIndexByOutputIndex | ( | IntPtr | net, |
IntPtr | blob_idx, | ||
UInt32 | output_blob_idx | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaGetBlobShape | ( | IntPtr | net, |
IntPtr | shape, | ||
UInt32 | blob_idx, | ||
UInt32 | version | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaGetEnvironment | ( | IntPtr | net, |
UInt32 | env_idx, | ||
UInt32 | version | ||
) |
delegate int ailiaSpeech.AiliaSpeech.ailiaIntermediateCallback | ( | IntPtr | handle, |
IntPtr | text | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaOpenWeightFileA | ( | IntPtr | net, |
IntPtr | path | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaOpenWeightFileW | ( | IntPtr | net, |
IntPtr | path | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaOpenWeightMem | ( | IntPtr | net, |
IntPtr | buf, | ||
uint | buf_size | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechBuffered | ( | IntPtr | net, |
ref uint | buffered | ||
) |
Is processing data exist.
net | A network instance pointer |
buffered | Is data exist |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechComplete | ( | IntPtr | net, |
ref uint | complete | ||
) |
Is processed all data.
net | A network instance pointer |
complete | Is complete |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechCreate | ( | ref IntPtr | net, |
int | env_id, | ||
int | num_thread, | ||
int | memory_mode, | ||
int | task, | ||
int | flag, | ||
AILIASpeechApiCallback | callback, | ||
int | version | ||
) |
Creates a network instance.
net | A pointer to the network 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_*) |
task | AILIA_SPEECH_TASK_* |
flag | OR of AILIA_SPEECH_FLAG_* |
api_callback | The callback for ailia API |
version | AILIA_SPEECH_API_CALLBACK_VERSION is specified.) |
Creates a network instance.
static void ailiaSpeech.AiliaSpeech.ailiaSpeechDestroy | ( | IntPtr | net | ) |
It destroys the network instance.
net | A network instance pointer |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechFinalizeInputData | ( | IntPtr | net | ) |
Finalize input PCM data to queue.
net | A network instance pointer |
By signaling the end of the audio file, ailiaSpeechBuffered will return 1 even if 30 seconds worth of data does not exist. You must call ailiaSpeechResetTranscribeState after executing ailiaSpeechFinalizeInputData and before executing ailiaSpeechPushInputData.
static IntPtr ailiaSpeech.AiliaSpeech.ailiaSpeechGetErrorDetail | ( | 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 ailiaSpeech API function is called. If model is encrypted, this function returns empty string. Convert from the point obtained to a string as follows
static int ailiaSpeech.AiliaSpeech.ailiaSpeechGetText | ( | IntPtr | net, |
[In, Out] AILIASpeechText | text, | ||
uint | version, | ||
uint | idx | ||
) |
Get text length.
net | A network instance pointer |
text | Text |
version | AILIA_SPEECH_TEXT_VERSION |
idx | Text index |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechGetTextCount | ( | IntPtr | net, |
ref uint | count | ||
) |
Get text count.
net | A network instance pointer |
count | Text count |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechOpenDiarizationFile | ( | IntPtr | net, |
string | segmentation_path, | ||
string | embedding_path, | ||
int | type | ||
) |
Set AI model for speaker diarization.
net | A network instance pointer |
segmentation_path | The path name to the onnx file |
embedding_path | The path name to the onnx file |
type | AILIA_SPEECH_DIARIZATION_TYPE_PYANNOTE_AUDIO |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechOpenDictionaryFile | ( | IntPtr | net, |
string | dictionary_path, | ||
int | dictionary_type | ||
) |
Set dictionary for error correction.
net | A network instance pointer |
dictionary_path | The path name to the dictionary file |
dictionary_type | AILIA_SPEECH_DICTIONARY_TYPE_* |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechOpenModelFile | ( | IntPtr | net, |
string | encoder_path, | ||
string | decoder_path, | ||
int | model_type | ||
) |
Set models into a network instance.
net | A network instance pointer |
encoder_path | The path name to the onnx file |
decoder_path | The path name to the onnx file |
model_type | AILIA_SPEECH_MODEL_TYPE_* |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechOpenPostProcessFile | ( | IntPtr | net, |
string | encoder_path, | ||
string | decoder_path, | ||
string | source_path, | ||
string | target_path, | ||
IntPtr | prefix, | ||
int | post_process_type | ||
) |
Set AI model for post process.
net | A network instance pointer |
encoder_path | The path name to the onnx file |
decoder_path | The path name to the onnx file |
source_path | The path name to the tokenizer model file |
target_path | The path name to the tokenizer model file |
prefix | The prefix of T5 (UTF8), NULL for FuguMT |
post_process_type | AILIA_SPEECH_POST_PROCESS_TYPE_* |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechOpenVadFile | ( | IntPtr | net, |
string | vad_path, | ||
int | vad_type | ||
) |
Set vad model for voice activity detection.
net | A network instance pointer |
vad_path | The path name to the onnx file |
vad_type | AILIA_SPEECH_VAD_TYPE_* |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechPostProcess | ( | IntPtr | net | ) |
Execute post process.
net | A network instance pointer |
Get the recognition result with ailiaSpeechGetText API.
static int ailiaSpeech.AiliaSpeech.ailiaSpeechPushInputData | ( | IntPtr | net, |
float[] | src, | ||
uint | channels, | ||
uint | samples, | ||
uint | sampling_rate | ||
) |
Push PCM data to queue.
net | A network instance pointer |
src | The input pcm data (channel interleave, LRLR, -1.0 to 1.0 range) |
channels | The number of pcm channels |
samples | The number of pcm samples per channel |
sampling_rate | The sampling rate (Hz) |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechResetTranscribeState | ( | IntPtr | net | ) |
It resets the network instance.
net | A network instance pointer |
By calling this API, the internal state such as the previous decoding result is initialized. There is no need to reopen the model after calling this API. The states of ailiaSpeechOpenModelFile, ailiaSpeechSetIntermediateCallback, ailiaSpeechSetLanguage, ailiaSpeechSetSilentThreshold, ailiaSpeechSetPrompt are preserved.
static int ailiaSpeech.AiliaSpeech.ailiaSpeechSetConstraint | ( | IntPtr | net, |
IntPtr | constraint, | ||
int | type | ||
) |
Set constraint.
net | A network instance pointer |
constraint | The text of constraint (UTF8) |
type | The type of constraint (AILIA_SPEECH_CONSTRAINT_*) |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechSetIntermediateCallback | ( | IntPtr | net, |
ailiaIntermediateCallback | callback, | ||
IntPtr | handle | ||
) |
Set a callback to get intermediate results of recognition.
net | A network instance pointer |
callback | callback |
handle | handle for callback |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechSetLanguage | ( | IntPtr | net, |
string | language | ||
) |
Performs the inferences and provides the inference result.
net | A network instance pointer |
language | Language code (en, ja, etc) |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechSetPrompt | ( | IntPtr | net, |
IntPtr | prompt | ||
) |
Set prompt.
net | A network instance pointer |
prompt | The text of prompt (UTF8) |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechSetSilentThreshold | ( | IntPtr | net, |
float | silent_threshold, | ||
float | speech_sec, | ||
float | no_speech_sec | ||
) |
Set silent threshold.
net | A network instance pointer |
silent_threshold | volume threshold |
speech_sec | speech time |
no_speech_sec | no_speech time |
static int ailiaSpeech.AiliaSpeech.ailiaSpeechSetText | ( | IntPtr | net, |
[In] AILIASpeechText | text, | ||
uint | version, | ||
uint | idx | ||
) |
Set postprocess text.
net | A network instance pointer |
text | Text |
version | AILIA_SPEECH_TEXT_VERSION |
idx | Text index |
Used when using only post-processing without using speech recognition. Since the string is copied to the internal buffer, it can be released after the call. If idx is larger than ailiaSpeechGetTextCount, the internal buffer will be automatically expanded.
static int ailiaSpeech.AiliaSpeech.ailiaSpeechTranscribe | ( | IntPtr | net | ) |
Speech recognition.
net | A network instance pointer |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerCreate | ( | IntPtr | net, |
int | type, | ||
int | flags | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerEncode | ( | IntPtr | net, |
IntPtr | utf8 | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerGetTextLength | ( | IntPtr | net, |
IntPtr | len | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerGetTokenCount | ( | IntPtr | net, |
IntPtr | count | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerOpenModelFileA | ( | IntPtr | net, |
IntPtr | utf8 | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerOpenModelFileW | ( | IntPtr | net, |
IntPtr | utf16 | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerUtf32ToUtf8 | ( | IntPtr | a, |
IntPtr | b, | ||
uint | c | ||
) |
static int ailiaSpeech.AiliaSpeech.ailiaTokenizerUtf8ToUtf32 | ( | IntPtr | a, |
IntPtr | b, | ||
IntPtr | c, | ||
uint | d | ||
) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |