VoiceSDK
5.0.2
|
Go to the source code of this file.
Classes | |
struct | VoiceSdkSpeechEvent |
struct | VoiceSdkSpeechInfo |
struct | VoiceSdkSpeechSummary |
struct | VoiceSdkQualityCheckMetricsThresholds |
struct | VoiceSdkQualityCheckEngineResult |
Functions | |
VOICE_SDK_API VoiceSdkSpeechSummaryEngine * | VoiceSdkSpeechSummaryEngineCreate (const char *init_data_path, char **error_msg) |
Creates new instance of VoiceSdkSpeechSummaryEngine from the provided initialization data path. More... | |
VOICE_SDK_API VoiceSdkSpeechSummary * | VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromBytes (const VoiceSdkSpeechSummaryEngine *engine, const uint8_t *bytes, size_t bytes_num, size_t sample_rate, char **error_msg) |
Calculates speech summary with given PCM16 audio samples represented as bytes. The returned Speech Summary needs to be cleaned up manually. More... | |
VOICE_SDK_API VoiceSdkSpeechSummary * | VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromPcm16Samples (const VoiceSdkSpeechSummaryEngine *engine, const int16_t *pcm16_samples, size_t samples_num, size_t sample_rate, char **error_msg) |
Calculates speech summary with given PCM16 audio samples represented as 2-byte shorts. The returned Speech Summary needs to be cleaned up manually. More... | |
VOICE_SDK_API VoiceSdkSpeechSummary * | VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromFloatSamples (const VoiceSdkSpeechSummaryEngine *engine, const float *float_samples, size_t samples_num, size_t sample_rate, char **error_msg) |
Calculates speech summary with given PCM16 audio samples represented as normalised, i.e., having [-1, 1] range floats. The returned Speech Summary needs to be cleaned up manually. More... | |
VOICE_SDK_API VoiceSdkSpeechSummary * | VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromFile (const VoiceSdkSpeechSummaryEngine *engine, const char *audio_path, char **error_msg) |
Calculates speech summary from given audio file. The returned Speech Summary needs to be cleaned up manually. More... | |
VOICE_SDK_API void | VoiceSdkSpeechSummaryEngineRelease (VoiceSdkSpeechSummaryEngine *engine) |
Releases all memory allocated for this VoiceSdkSpeechSummaryEngine instance. More... | |
VOICE_SDK_API void | VoiceSdkSpeechSummaryRelease (VoiceSdkSpeechSummary *summary) |
Releases all memory allocated for this VoiceSdkSpeechSummary instance. This includes all nested structures as well. More... | |
VOICE_SDK_API VoiceSdkSpeechSummaryStream * | VoiceSdkSpeechSummaryStreamCreate (const VoiceSdkSpeechSummaryEngine *engine, size_t sample_rate, char **error_msg) |
Creates new instance of VoiceSdkSpeechSummaryStream from the VoiceSdkSpeechSummaryEngine. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamAddByteSamples (const VoiceSdkSpeechSummaryStream *stream, const uint8_t *bytes, size_t bytes_num, char **error_msg) |
Adds input samples to the stream and recalculates speech/background lengths and speech events. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamAddPcm16Samples (const VoiceSdkSpeechSummaryStream *stream, const int16_t *pcm16_samples, size_t samples_num, char **error_msg) |
Adds input samples to the stream and recalculates speech/background lengths and speech events. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamAddFloatSamples (const VoiceSdkSpeechSummaryStream *stream, const float *float_samples, size_t samples_num, char **error_msg) |
Adds input samples to the stream and recalculates speech/background lengths and speech events. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamGetCurrentBackgroundLength (const VoiceSdkSpeechSummaryStream *stream, float *result, char **error_msg) |
Returns current background length (length of a continuous non-speech segment starting on the last detected speech frame). More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamHasSpeechEvents (const VoiceSdkSpeechSummaryStream *stream, bool *result, char **error_msg) |
Check whether or not the stream has any pending speech events to be consumed. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamGetSpeechEvent (const VoiceSdkSpeechSummaryStream *stream, VoiceSdkSpeechEvent *result, char **error_msg) |
Retrieves pending speech event from the stream. Only use this if VoiceSdkSpeechSummaryStreamHasSpeechEvents returns true. More... | |
VOICE_SDK_API VoiceSdkSpeechSummary * | VoiceSdkSpeechSummaryStreamGetTotalSpeechSummary (const VoiceSdkSpeechSummaryStream *stream, char **error_msg) |
Retrieves total speech summary, that is, over all added samples, from the stream. The returned Speech Summary needs to be cleaned up manually. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamGetTotalSpeechInfo (const VoiceSdkSpeechSummaryStream *stream, VoiceSdkSpeechInfo *result, char **error_msg) |
Retrieves total accumulated speech info. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamReset (const VoiceSdkSpeechSummaryStream *stream, char **error_msg) |
Resets the stream, cleaning up internal state, any leftover internal buffers and pending events. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamFinalize (const VoiceSdkSpeechSummaryStream *stream, char **error_msg) |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible. More... | |
VOICE_SDK_API void | VoiceSdkSpeechSummaryStreamRelease (VoiceSdkSpeechSummaryStream *stream) |
Releases all memory allocated for this VoiceSdkSpeechSummaryStream instance. More... | |
VOICE_SDK_API VoiceSdkSpeechSummaryStreamOpus * | VoiceSdkSpeechSummaryStreamOpusCreate (const char *init_data_path, size_t sample_rate, char **error_msg) |
Creates new instance of VoiceSdkSpeechSummaryStreamOpus from the initialization data. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusAddPacket (const VoiceSdkSpeechSummaryStreamOpus *stream, const uint8_t *bytes, size_t bytes_num, char **error_msg) |
Adds Opus packet to process. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusGetCurrentBackgroundLength (const VoiceSdkSpeechSummaryStreamOpus *stream, float *result, char **error_msg) |
Returns current background length (length of a continuous non-speech segment starting on the last detected speech frame). More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusHasSpeechEvents (const VoiceSdkSpeechSummaryStreamOpus *stream, bool *result, char **error_msg) |
Check whether or not the stream has any pending speech events to be consumed. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusGetSpeechEvent (const VoiceSdkSpeechSummaryStreamOpus *stream, VoiceSdkSpeechEvent *result, char **error_msg) |
Retrieves pending speech event from the stream. Only use this if VoiceSdkSpeechSummaryStreamOpusHasSpeechEvents returns true. More... | |
VOICE_SDK_API VoiceSdkSpeechSummary * | VoiceSdkSpeechSummaryStreamOpusGetTotalSpeechSummary (const VoiceSdkSpeechSummaryStreamOpus *stream, char **error_msg) |
Retrieves total speech summary, that is, over all added samples, from the stream. The returned Speech Summary needs to be cleaned up manually. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusGetTotalSpeechInfo (const VoiceSdkSpeechSummaryStreamOpus *stream, VoiceSdkSpeechInfo *result, char **error_msg) |
Retrieves total accumulated speech info. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusReset (const VoiceSdkSpeechSummaryStreamOpus *stream, char **error_msg) |
Resets the stream, cleaning up internal state, any leftover internal buffers and pending events. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechSummaryStreamOpusFinalize (const VoiceSdkSpeechSummaryStreamOpus *stream, char **error_msg) |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible. More... | |
VOICE_SDK_API void | VoiceSdkSpeechSummaryStreamOpusRelease (VoiceSdkSpeechSummaryStreamOpus *stream) |
Releases all memory allocated for this VoiceSdkSpeechSummaryStreamOpus instance. More... | |
VOICE_SDK_API VoiceSdkSnrComputer * | VoiceSdkSnrComputerCreate (const char *init_data_path, char **error_msg) |
Creates new SNR Computer instance. More... | |
VOICE_SDK_API bool | VoiceSdkSnrComputerComputeFromBytes (const VoiceSdkSnrComputer *engine, const uint8_t *bytes, size_t bytes_num, size_t sample_rate, float *result, char **error_msg) |
Calculates Signal-To-Noise (SNR) value with given PCM16 audio samples represented as bytes. More... | |
VOICE_SDK_API bool | VoiceSdkSnrComputerComputeFromPcm16Samples (const VoiceSdkSnrComputer *engine, const int16_t *pcm16_samples, size_t samples_num, size_t sample_rate, float *result, char **error_msg) |
Calculates Signal-To-Noise (SNR) value with given PCM16 audio samples represented as shorts. More... | |
VOICE_SDK_API bool | VoiceSdkSnrComputerComputeFromFloatSamples (const VoiceSdkSnrComputer *engine, const float *float_samples, size_t samples_num, size_t sample_rate, float *result, char **error_msg) |
Calculates Signal-To-Noise (SNR) value with given PCM16 audio samples represented as normalised, i.e., having [-1, 1] range floats. More... | |
VOICE_SDK_API bool | VoiceSdkSnrComputerComputeFromFile (const VoiceSdkSnrComputer *engine, const char *audio_path, float *result, char **error_msg) |
Calculates Signal-To-Noise (SNR) value from given audio file. More... | |
VOICE_SDK_API void | VoiceSdkSnrComputerRelease (VoiceSdkSnrComputer *engine) |
Releases all memory allocated for this VoiceSdkSnrComputer instance. More... | |
VOICE_SDK_API VoiceSdkSpeechEndpointDetector * | VoiceSdkSpeechEndpointDetectorCreate (size_t min_speech_length_ms, size_t max_silence_length_ms, size_t sample_rate, char **error_msg) |
Creates new instance of VoiceSdkSpeechEndpointDetector. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorAddByteSamples (const VoiceSdkSpeechEndpointDetector *detector, const uint8_t *bytes, size_t bytes_num, char **error_msg) |
Adds PCM16 audio bytes to process. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorAddPcm16Samples (const VoiceSdkSpeechEndpointDetector *detector, const int16_t *pcm16_samples, size_t samples_num, char **error_msg) |
Adds PCM16 audio samples to process. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorAddFloatSamples (const VoiceSdkSpeechEndpointDetector *detector, const float *float_samples, size_t samples_num, char **error_msg) |
Adds float audio samples to process. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorIsSpeechEnded (const VoiceSdkSpeechEndpointDetector *detector, bool *result, char **error_msg) |
Returns detection state. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorReset (const VoiceSdkSpeechEndpointDetector *detector, char **error_msg) |
Resets detector state. More... | |
VOICE_SDK_API void | VoiceSdkSpeechEndpointDetectorRelease (VoiceSdkSpeechEndpointDetector *detector) |
Releases all memory allocated for this VoiceSdkSpeechEndpointDetector instance. More... | |
VOICE_SDK_API VoiceSdkSpeechEndpointDetectorOpus * | VoiceSdkSpeechEndpointDetectorOpusCreate (size_t min_speech_length_ms, size_t max_silence_length_ms, size_t sample_rate, char **error_msg) |
Creates new instance of VoiceSdkSpeechEndpointDetectorOpus. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorOpusAddPacket (const VoiceSdkSpeechEndpointDetectorOpus *detector, const uint8_t *bytes, size_t bytes_num, char **error_msg) |
Adds Opus packet to process. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorOpusIsSpeechEnded (const VoiceSdkSpeechEndpointDetectorOpus *detector, bool *result, char **error_msg) |
Returns detection state. More... | |
VOICE_SDK_API bool | VoiceSdkSpeechEndpointDetectorOpusReset (const VoiceSdkSpeechEndpointDetectorOpus *detector, char **error_msg) |
Resets detector state. More... | |
VOICE_SDK_API void | VoiceSdkSpeechEndpointDetectorOpusRelease (VoiceSdkSpeechEndpointDetectorOpus *detector) |
Releases all memory allocated for this VoiceSdkSpeechEndpointDetectorOpus instance. More... | |
VOICE_SDK_API VoiceSdkQualityCheckEngine * | VoiceSdkQualityCheckEngineCreate (const char *init_data_path, VoiceSdkErrorCode *error_code, char **error_msg) |
Creates new Quality check engine instance. More... | |
VOICE_SDK_API bool | VoiceSdkQualityCheckEngineGetRecommendedThresholds (const VoiceSdkQualityCheckEngine *engine, VoiceSdkQualityCheckScenario scenario, VoiceSdkQualityCheckMetricsThresholds *thresholds, VoiceSdkErrorCode *error_code, char **error_msg) |
Gets recommended quality checking thresholds for the specified scenario. More... | |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult * | VoiceSdkQualityCheckEngineCheckQualityAudioFile (const VoiceSdkQualityCheckEngine *engine, const char *audio_path, VoiceSdkQualityCheckMetricsThresholds thresholds, VoiceSdkErrorCode *error_code, char **error_msg) |
Checks if audio file is suitable from the quality perspective, from the given audio file. More... | |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult * | VoiceSdkQualityCheckEngineCheckQualityFloatSamples (const VoiceSdkQualityCheckEngine *engine, const float *float_samples, size_t num_samples, size_t sample_rate, VoiceSdkQualityCheckMetricsThresholds thresholds, VoiceSdkErrorCode *error_code, char **error_msg) |
Checks if audio buffer is suitable from the quality perspective, from the given float audio samples. More... | |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult * | VoiceSdkQualityCheckEngineCheckQualityPcm16Samples (const VoiceSdkQualityCheckEngine *engine, const int16_t *samples, size_t num_samples, size_t sample_rate, VoiceSdkQualityCheckMetricsThresholds thresholds, VoiceSdkErrorCode *error_code, char **error_msg) |
Checks if audio buffer is suitable from the quality perspective, from the given PCM16 audio samples. More... | |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult * | VoiceSdkQualityCheckEngineCheckQualityBytes (const VoiceSdkQualityCheckEngine *engine, const uint8_t *bytes, size_t num_bytes, size_t sample_rate, VoiceSdkQualityCheckMetricsThresholds thresholds, VoiceSdkErrorCode *error_code, char **error_msg) |
Checks if audio buffer is suitable from the quality perspective, from the given PCM16 audio bytes. More... | |
VOICE_SDK_API void | VoiceSdkQualityCheckEngineResultRelease (VoiceSdkQualityCheckEngineResult *check_result) |
Releases VoiceSdkQualityCheckEngineResult. More... | |
VOICE_SDK_API void | VoiceSdkQualityCheckEngineRelease (VoiceSdkQualityCheckEngine *engine) |
Releases all memory allocated for this VoiceSdkQualityCheckEngine instance. More... | |
typedef struct VoiceSdkQualityCheckEngine VoiceSdkQualityCheckEngine |
typedef struct VoiceSdkQualityCheckEngineResult VoiceSdkQualityCheckEngineResult |
typedef enum VoiceSdkQualityCheckScenario VoiceSdkQualityCheckScenario |
typedef struct VoiceSdkSnrComputer VoiceSdkSnrComputer |
typedef struct VoiceSdkSpeechEndpointDetector VoiceSdkSpeechEndpointDetector |
typedef struct VoiceSdkSpeechEvent VoiceSdkSpeechEvent |
typedef struct VoiceSdkSpeechInfo VoiceSdkSpeechInfo |
typedef struct VoiceSdkSpeechSummary VoiceSdkSpeechSummary |
typedef struct VoiceSdkSpeechSummaryEngine VoiceSdkSpeechSummaryEngine |
typedef struct VoiceSdkSpeechSummaryStream VoiceSdkSpeechSummaryStream |
typedef struct VoiceSdkSpeechSummaryStreamOpus VoiceSdkSpeechSummaryStreamOpus |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult* VoiceSdkQualityCheckEngineCheckQualityAudioFile | ( | const VoiceSdkQualityCheckEngine * | engine, |
const char * | audio_path, | ||
VoiceSdkQualityCheckMetricsThresholds | thresholds, | ||
VoiceSdkErrorCode * | error_code, | ||
char ** | error_msg | ||
) |
Checks if audio file is suitable from the quality perspective, from the given audio file.
[in] | engine | pointer to VoiceSdkQualityCheckEngine. |
[in] | audio_path | path to an audio file. |
[in] | thresholds | quality checking thresholds that will be applied to the output quality check metrics. |
[out] | error_code | pointer to the error code. |
[out] | error_msg | output error message. |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult* VoiceSdkQualityCheckEngineCheckQualityBytes | ( | const VoiceSdkQualityCheckEngine * | engine, |
const uint8_t * | bytes, | ||
size_t | num_bytes, | ||
size_t | sample_rate, | ||
VoiceSdkQualityCheckMetricsThresholds | thresholds, | ||
VoiceSdkErrorCode * | error_code, | ||
char ** | error_msg | ||
) |
Checks if audio buffer is suitable from the quality perspective, from the given PCM16 audio bytes.
[in] | engine | pointer to VoiceSdkQualityCheckEngine. |
[in] | bytes | buffer containing byte representation of PCM16 audio samples. |
[in] | num_bytes | number of bytes. |
[in] | sample_rate | audio sampling rate in hz. |
[in] | thresholds | quality checking thresholds that will be applied to the output quality check metrics. |
[out] | error_code | pointer to the error code. |
[out] | error_msg | output error message. |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult* VoiceSdkQualityCheckEngineCheckQualityFloatSamples | ( | const VoiceSdkQualityCheckEngine * | engine, |
const float * | float_samples, | ||
size_t | num_samples, | ||
size_t | sample_rate, | ||
VoiceSdkQualityCheckMetricsThresholds | thresholds, | ||
VoiceSdkErrorCode * | error_code, | ||
char ** | error_msg | ||
) |
Checks if audio buffer is suitable from the quality perspective, from the given float audio samples.
[in] | engine | pointer to VoiceSdkQualityCheckEngine. |
[in] | float_samples | buffer containing normalized (from -1 to 1) float audio samples. |
[in] | num_samples | number of audio samples. |
[in] | sample_rate | audio sampling rate in hz. |
[in] | thresholds | quality checking thresholds that will be applied to the output quality check metrics. |
[out] | error_code | pointer to the error code. |
[out] | error_msg | output error message. |
VOICE_SDK_API VoiceSdkQualityCheckEngineResult* VoiceSdkQualityCheckEngineCheckQualityPcm16Samples | ( | const VoiceSdkQualityCheckEngine * | engine, |
const int16_t * | samples, | ||
size_t | num_samples, | ||
size_t | sample_rate, | ||
VoiceSdkQualityCheckMetricsThresholds | thresholds, | ||
VoiceSdkErrorCode * | error_code, | ||
char ** | error_msg | ||
) |
Checks if audio buffer is suitable from the quality perspective, from the given PCM16 audio samples.
[in] | engine | pointer to VoiceSdkQualityCheckEngine. |
[in] | samples | buffer containing PCM16 audio samples. |
[in] | num_samples | number of audio samples. |
[in] | sample_rate | audio sampling rate in hz. |
[in] | thresholds | quality checking thresholds that will be applied to the output quality check metrics. |
[out] | error_code | pointer to the error code. |
[out] | error_msg | output error message. |
VOICE_SDK_API VoiceSdkQualityCheckEngine* VoiceSdkQualityCheckEngineCreate | ( | const char * | init_data_path, |
VoiceSdkErrorCode * | error_code, | ||
char ** | error_msg | ||
) |
Creates new Quality check engine instance.
The returned value is used for any subsequent quality check calls. The engine must be released by calling VoiceSdkQualityCheckEngineRelease after it is no longer needed.
[in] | init_data_path | filesystem path for the initialization data folder. |
[out] | error_code | pointer to the error code. |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkQualityCheckEngineGetRecommendedThresholds | ( | const VoiceSdkQualityCheckEngine * | engine, |
VoiceSdkQualityCheckScenario | scenario, | ||
VoiceSdkQualityCheckMetricsThresholds * | thresholds, | ||
VoiceSdkErrorCode * | error_code, | ||
char ** | error_msg | ||
) |
Gets recommended quality checking thresholds for the specified scenario.
[in] | engine | pointer to VoiceSdkQualityCheckEngine. |
[in] | scenario | scenario for which recommended thresholds will be returned. |
[out] | thresholds | returned quality check thresholds that can be used on quality checking, pointer to preallocated structure instance. Not changed unless this call returns true. |
[out] | error_code | pointer to the error code. |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkQualityCheckEngineRelease | ( | VoiceSdkQualityCheckEngine * | engine | ) |
Releases all memory allocated for this VoiceSdkQualityCheckEngine instance.
engine | instance of VoiceSdkQualityCheckEngine that needs freeing |
VOICE_SDK_API void VoiceSdkQualityCheckEngineResultRelease | ( | VoiceSdkQualityCheckEngineResult * | check_result | ) |
Releases VoiceSdkQualityCheckEngineResult.
[in] | check_result | pointer to VoiceSdkQualityCheckEngineResult |
VOICE_SDK_API bool VoiceSdkSnrComputerComputeFromBytes | ( | const VoiceSdkSnrComputer * | engine, |
const uint8_t * | bytes, | ||
size_t | bytes_num, | ||
size_t | sample_rate, | ||
float * | result, | ||
char ** | error_msg | ||
) |
Calculates Signal-To-Noise (SNR) value with given PCM16 audio samples represented as bytes.
[in] | engine | instance of SNR Computer created with VoiceSdkSnrComputerCreate |
[in] | bytes | pointer to byte array containing PCM16 audio samples. Each two bytes make up one little-endian sample. |
[in] | bytes_num | size of the byte array |
[in] | sample_rate | sample rate of the passed audio |
[out] | result | resulting SNR value for requested data, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSnrComputerComputeFromFile | ( | const VoiceSdkSnrComputer * | engine, |
const char * | audio_path, | ||
float * | result, | ||
char ** | error_msg | ||
) |
Calculates Signal-To-Noise (SNR) value from given audio file.
[in] | engine | instance of SNR Computer created with VoiceSdkSnrComputerCreate |
[in] | audio_path | path to audio file on the filesystem |
[out] | result | resulting SNR value for requested data, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSnrComputerComputeFromFloatSamples | ( | const VoiceSdkSnrComputer * | engine, |
const float * | float_samples, | ||
size_t | samples_num, | ||
size_t | sample_rate, | ||
float * | result, | ||
char ** | error_msg | ||
) |
Calculates Signal-To-Noise (SNR) value with given PCM16 audio samples represented as normalised, i.e., having [-1, 1] range floats.
[in] | engine | instance of SNR Computer created with VoiceSdkSnrComputerCreate |
[in] | float_samples | pointer to floats array containing PCM16 audio samples |
[in] | samples_num | size of the floats array |
[in] | sample_rate | sample rate of the passed audio |
[out] | result | resulting SNR value for requested data, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSnrComputerComputeFromPcm16Samples | ( | const VoiceSdkSnrComputer * | engine, |
const int16_t * | pcm16_samples, | ||
size_t | samples_num, | ||
size_t | sample_rate, | ||
float * | result, | ||
char ** | error_msg | ||
) |
Calculates Signal-To-Noise (SNR) value with given PCM16 audio samples represented as shorts.
[in] | engine | instance of SNR Computer created with VoiceSdkSnrComputerCreate |
[in] | pcm16_samples | pointer to shorts array containing PCM16 audio samples |
[in] | samples_num | size of the shorts array |
[in] | sample_rate | sample rate of the passed audio |
[out] | result | resulting SNR value for requested data, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSnrComputer* VoiceSdkSnrComputerCreate | ( | const char * | init_data_path, |
char ** | error_msg | ||
) |
Creates new SNR Computer instance.
The returned value is used for any subsequent compute calls. The engine must be released by calling VoiceSdkSnrComputerRelease after it is no longer needed.
[in] | init_data_path | filesystem path for the initialization data folder |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkSnrComputerRelease | ( | VoiceSdkSnrComputer * | engine | ) |
Releases all memory allocated for this VoiceSdkSnrComputer instance.
engine | instance of VoiceSdkSnrComputer that needs freeing |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorAddByteSamples | ( | const VoiceSdkSpeechEndpointDetector * | detector, |
const uint8_t * | bytes, | ||
size_t | bytes_num, | ||
char ** | error_msg | ||
) |
Adds PCM16 audio bytes to process.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorCreate |
[in] | bytes | pointer to byte array containing PCM16 audio samples. Each two bytes make up one little-endian sample. |
[in] | bytes_num | size of array with bytes |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorAddFloatSamples | ( | const VoiceSdkSpeechEndpointDetector * | detector, |
const float * | float_samples, | ||
size_t | samples_num, | ||
char ** | error_msg | ||
) |
Adds float audio samples to process.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorCreate |
[in] | float_samples | pointer to array containing normalized (from -1 to 1) float audio samples |
[in] | samples_num | size of array with float samples |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorAddPcm16Samples | ( | const VoiceSdkSpeechEndpointDetector * | detector, |
const int16_t * | pcm16_samples, | ||
size_t | samples_num, | ||
char ** | error_msg | ||
) |
Adds PCM16 audio samples to process.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorCreate |
[in] | pcm16_samples | pointer to shorts array containing PCM16 audio samples |
[in] | samples_num | size of array with PCM16 samples |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechEndpointDetector* VoiceSdkSpeechEndpointDetectorCreate | ( | size_t | min_speech_length_ms, |
size_t | max_silence_length_ms, | ||
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Creates new instance of VoiceSdkSpeechEndpointDetector.
The returned value is used for any subsequent VoiceSdkSpeechEndpointDetector* calls. The detector must be released by calling VoiceSdkSpeechEndpointDetectorRelease after it is no longer needed.
[in] | min_speech_length_ms | minimum speech length required to begin speech end detection (ms) |
[in] | max_silence_length_ms | silence after speech threshold used to determine if speech is already ended (ms) |
[in] | sample_rate | input signal sampling rate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorIsSpeechEnded | ( | const VoiceSdkSpeechEndpointDetector * | detector, |
bool * | result, | ||
char ** | error_msg | ||
) |
Returns detection state.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorCreate |
[out] | result | true if speech end was detected, false otherwise |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorOpusAddPacket | ( | const VoiceSdkSpeechEndpointDetectorOpus * | detector, |
const uint8_t * | bytes, | ||
size_t | bytes_num, | ||
char ** | error_msg | ||
) |
Adds Opus packet to process.
[in] | detector | instance of speech endpoint detector opus created with VoiceSdkSpeechEndpointDetectorOpusCreate |
[in] | bytes | A buffer containing single Opus packet. It is expected that packet contains data for single mono stream |
[in] | bytes_num | size of the buffer |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechEndpointDetectorOpus* VoiceSdkSpeechEndpointDetectorOpusCreate | ( | size_t | min_speech_length_ms, |
size_t | max_silence_length_ms, | ||
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Creates new instance of VoiceSdkSpeechEndpointDetectorOpus.
The returned value is used for any subsequent VoiceSdkSpeechEndpointDetectorOpus* calls. The detector must be released by calling VoiceSdkSpeechEndpointDetectorOpusRelease after it is no longer needed.
[in] | min_speech_length_ms | minimum speech length required to begin speech end detection (ms) |
[in] | max_silence_length_ms | silence after speech threshold used to determine if speech is already ended (ms) |
[in] | sample_rate | input signal sampling rate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorOpusIsSpeechEnded | ( | const VoiceSdkSpeechEndpointDetectorOpus * | detector, |
bool * | result, | ||
char ** | error_msg | ||
) |
Returns detection state.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorOpusCreate |
[out] | result | true if speech end was detected, false otherwise |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkSpeechEndpointDetectorOpusRelease | ( | VoiceSdkSpeechEndpointDetectorOpus * | detector | ) |
Releases all memory allocated for this VoiceSdkSpeechEndpointDetectorOpus instance.
detector | instance of VoiceSdkSpeechEndpointDetectorOpus that needs freeing |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorOpusReset | ( | const VoiceSdkSpeechEndpointDetectorOpus * | detector, |
char ** | error_msg | ||
) |
Resets detector state.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorOpusCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkSpeechEndpointDetectorRelease | ( | VoiceSdkSpeechEndpointDetector * | detector | ) |
Releases all memory allocated for this VoiceSdkSpeechEndpointDetector instance.
detector | instance of VoiceSdkSpeechEndpointDetector that needs freeing |
VOICE_SDK_API bool VoiceSdkSpeechEndpointDetectorReset | ( | const VoiceSdkSpeechEndpointDetector * | detector, |
char ** | error_msg | ||
) |
Resets detector state.
[in] | detector | instance of speech endpoint detector created with VoiceSdkSpeechEndpointDetectorCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummaryEngine* VoiceSdkSpeechSummaryEngineCreate | ( | const char * | init_data_path, |
char ** | error_msg | ||
) |
Creates new instance of VoiceSdkSpeechSummaryEngine from the provided initialization data path.
The returned value is used for any subsequent GetSpeechSummary calls or for creating streams. The engine must be released by calling VoiceSdkSpeechSummaryEngineRelease after it is no longer needed.
Note that VoiceSdkSpeechSummary instances returned by GetSpeechSummary calls remain valid after corresponding VoiceSdkSpeechSummaryEngine is released and can be used separately.
[in] | init_data_path | filesystem path for the initialization data folder |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummary* VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromBytes | ( | const VoiceSdkSpeechSummaryEngine * | engine, |
const uint8_t * | bytes, | ||
size_t | bytes_num, | ||
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Calculates speech summary with given PCM16 audio samples represented as bytes. The returned Speech Summary needs to be cleaned up manually.
[in] | engine | instance of Speech Summary Engine created with VoiceSdkSpeechSummaryEngineCreate |
[in] | bytes | pointer to byte array containing PCM16 audio samples. Each two bytes make up one little-endian sample. |
[in] | bytes_num | size of the byte array |
[in] | sample_rate | sample rate of the passed audio |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummary* VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromFile | ( | const VoiceSdkSpeechSummaryEngine * | engine, |
const char * | audio_path, | ||
char ** | error_msg | ||
) |
Calculates speech summary from given audio file. The returned Speech Summary needs to be cleaned up manually.
[in] | engine | instance of Speech Summary Engine created with VoiceSdkSpeechSummaryEngineCreate |
[in] | audio_path | path to audio file on the filesystem |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummary* VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromFloatSamples | ( | const VoiceSdkSpeechSummaryEngine * | engine, |
const float * | float_samples, | ||
size_t | samples_num, | ||
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Calculates speech summary with given PCM16 audio samples represented as normalised, i.e., having [-1, 1] range floats. The returned Speech Summary needs to be cleaned up manually.
[in] | engine | instance of Speech Summary Engine created with VoiceSdkSpeechSummaryEngineCreate |
[in] | float_samples | pointer to floats array containing PCM16 audio samples |
[in] | samples_num | size of the floats array |
[in] | sample_rate | sample rate of the passed audio |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummary* VoiceSdkSpeechSummaryEngineGetSpeechSummaryFromPcm16Samples | ( | const VoiceSdkSpeechSummaryEngine * | engine, |
const int16_t * | pcm16_samples, | ||
size_t | samples_num, | ||
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Calculates speech summary with given PCM16 audio samples represented as 2-byte shorts. The returned Speech Summary needs to be cleaned up manually.
[in] | engine | instance of Speech Summary Engine created with VoiceSdkSpeechSummaryEngineCreate |
[in] | pcm16_samples | pointer to shorts array containing PCM16 audio samples |
[in] | samples_num | size of the shorts array |
[in] | sample_rate | sample rate of the passed audio |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkSpeechSummaryEngineRelease | ( | VoiceSdkSpeechSummaryEngine * | engine | ) |
Releases all memory allocated for this VoiceSdkSpeechSummaryEngine instance.
engine | instance of VoiceSdkSpeechSummaryEngine that needs freeing |
VOICE_SDK_API void VoiceSdkSpeechSummaryRelease | ( | VoiceSdkSpeechSummary * | summary | ) |
Releases all memory allocated for this VoiceSdkSpeechSummary instance. This includes all nested structures as well.
This is meant to be used after using any GetSpeechSummary calls, after the returned object is no longer needed.
summary | instance of VoiceSdkSpeechSummary that needs freeing |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamAddByteSamples | ( | const VoiceSdkSpeechSummaryStream * | stream, |
const uint8_t * | bytes, | ||
size_t | bytes_num, | ||
char ** | error_msg | ||
) |
Adds input samples to the stream and recalculates speech/background lengths and speech events.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[in] | bytes | pointer to byte array containing PCM16 audio samples. Each two bytes make up one little-endian sample. |
[in] | bytes_num | size of the byte array |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamAddFloatSamples | ( | const VoiceSdkSpeechSummaryStream * | stream, |
const float * | float_samples, | ||
size_t | samples_num, | ||
char ** | error_msg | ||
) |
Adds input samples to the stream and recalculates speech/background lengths and speech events.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[in] | float_samples | pointer to floats array containing PCM16 audio samples |
[in] | samples_num | size of the floats array |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamAddPcm16Samples | ( | const VoiceSdkSpeechSummaryStream * | stream, |
const int16_t * | pcm16_samples, | ||
size_t | samples_num, | ||
char ** | error_msg | ||
) |
Adds input samples to the stream and recalculates speech/background lengths and speech events.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[in] | pcm16_samples | pointer to shorts array containing PCM16 audio samples |
[in] | samples_num | size of the shorts array |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummaryStream* VoiceSdkSpeechSummaryStreamCreate | ( | const VoiceSdkSpeechSummaryEngine * | engine, |
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Creates new instance of VoiceSdkSpeechSummaryStream from the VoiceSdkSpeechSummaryEngine.
The returned value is used for any subsequent VoiceSdkSpeechSummaryStream* calls. The stream must be released by calling VoiceSdkSpeechSummaryStreamRelease after it is no longer needed.
Note that VoiceSdkSpeechSummary instances returned by VoiceSdkSpeechSummaryStreamGetTotalSpeechSummary calls remain valid after corresponding VoiceSdkSpeechSummaryStream is released and can be used separately.
[in] | engine | instance of Speech Summary engine that was created previously. |
[in] | sample_rate | sample rate of audio stream |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamFinalize | ( | const VoiceSdkSpeechSummaryStream * | stream, |
char ** | error_msg | ||
) |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamGetCurrentBackgroundLength | ( | const VoiceSdkSpeechSummaryStream * | stream, |
float * | result, | ||
char ** | error_msg | ||
) |
Returns current background length (length of a continuous non-speech segment starting on the last detected speech frame).
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | result | resulting background length in milliseconds, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamGetSpeechEvent | ( | const VoiceSdkSpeechSummaryStream * | stream, |
VoiceSdkSpeechEvent * | result, | ||
char ** | error_msg | ||
) |
Retrieves pending speech event from the stream. Only use this if VoiceSdkSpeechSummaryStreamHasSpeechEvents returns true.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | result | resulting speech event, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamGetTotalSpeechInfo | ( | const VoiceSdkSpeechSummaryStream * | stream, |
VoiceSdkSpeechInfo * | result, | ||
char ** | error_msg | ||
) |
Retrieves total accumulated speech info.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | result | resulting speech info, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummary* VoiceSdkSpeechSummaryStreamGetTotalSpeechSummary | ( | const VoiceSdkSpeechSummaryStream * | stream, |
char ** | error_msg | ||
) |
Retrieves total speech summary, that is, over all added samples, from the stream. The returned Speech Summary needs to be cleaned up manually.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamHasSpeechEvents | ( | const VoiceSdkSpeechSummaryStream * | stream, |
bool * | result, | ||
char ** | error_msg | ||
) |
Check whether or not the stream has any pending speech events to be consumed.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | result | result of the check, true if the stream has events, false otherwise |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusAddPacket | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
const uint8_t * | bytes, | ||
size_t | bytes_num, | ||
char ** | error_msg | ||
) |
Adds Opus packet to process.
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[in] | bytes | a buffer containing single Opus packet. It is expected that packet contains data for single mono stream |
[in] | bytes_num | size of the byte array |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummaryStreamOpus* VoiceSdkSpeechSummaryStreamOpusCreate | ( | const char * | init_data_path, |
size_t | sample_rate, | ||
char ** | error_msg | ||
) |
Creates new instance of VoiceSdkSpeechSummaryStreamOpus from the initialization data.
The returned value is used for any subsequent VoiceSdkSpeechSummaryStreamOpus* calls. The stream must be released by calling VoiceSdkSpeechSummaryStreamOpusRelease after it is no longer needed.
Note that VoiceSdkSpeechSummary instances returned by VoiceSdkSpeechSummaryStreamOpusGetTotalSpeechSummary calls remain valid after corresponding VoiceSdkSpeechSummaryStreamOpus is released and can be used separately.
[in] | init_data_path | filesystem path for the initialization data folder |
[in] | sample_rate | sample rate of audio stream |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusFinalize | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
char ** | error_msg | ||
) |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible.
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusGetCurrentBackgroundLength | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
float * | result, | ||
char ** | error_msg | ||
) |
Returns current background length (length of a continuous non-speech segment starting on the last detected speech frame).
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[out] | result | resulting background length in milliseconds, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusGetSpeechEvent | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
VoiceSdkSpeechEvent * | result, | ||
char ** | error_msg | ||
) |
Retrieves pending speech event from the stream. Only use this if VoiceSdkSpeechSummaryStreamOpusHasSpeechEvents returns true.
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[out] | result | resulting speech event, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusGetTotalSpeechInfo | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
VoiceSdkSpeechInfo * | result, | ||
char ** | error_msg | ||
) |
Retrieves total accumulated speech info.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | result | resulting speech info, pointer to preallocated structure instance |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API VoiceSdkSpeechSummary* VoiceSdkSpeechSummaryStreamOpusGetTotalSpeechSummary | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
char ** | error_msg | ||
) |
Retrieves total speech summary, that is, over all added samples, from the stream. The returned Speech Summary needs to be cleaned up manually.
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusHasSpeechEvents | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
bool * | result, | ||
char ** | error_msg | ||
) |
Check whether or not the stream has any pending speech events to be consumed.
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[out] | result | result of the check, true if the stream has events, false otherwise |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkSpeechSummaryStreamOpusRelease | ( | VoiceSdkSpeechSummaryStreamOpus * | stream | ) |
Releases all memory allocated for this VoiceSdkSpeechSummaryStreamOpus instance.
stream | instance of VoiceSdkSpeechSummaryStreamOpus that needs freeing |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamOpusReset | ( | const VoiceSdkSpeechSummaryStreamOpus * | stream, |
char ** | error_msg | ||
) |
Resets the stream, cleaning up internal state, any leftover internal buffers and pending events.
[in] | stream | instance of Speech Summary Stream Opus created with VoiceSdkSpeechSummaryStreamOpusCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |
VOICE_SDK_API void VoiceSdkSpeechSummaryStreamRelease | ( | VoiceSdkSpeechSummaryStream * | stream | ) |
Releases all memory allocated for this VoiceSdkSpeechSummaryStream instance.
stream | instance of VoiceSdkSpeechSummaryStream that needs freeing |
VOICE_SDK_API bool VoiceSdkSpeechSummaryStreamReset | ( | const VoiceSdkSpeechSummaryStream * | stream, |
char ** | error_msg | ||
) |
Resets the stream, cleaning up internal state, any leftover internal buffers and pending events.
[in] | stream | instance of Speech Summary Stream created with VoiceSdkSpeechSummaryStreamCreate |
[out] | error_msg | output error message. Points to the null-terminated string containing message in case of failure or to the NULL in case of success. The memory it points to should be freed manually. |