Immersitech Logo Developer Resources
immersitech_clearvoice.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "immersitech_general.h"

Go to the source code of this file.

Functions

IMMERSITECH_API imm_cv_config imm_cv_get_default_config ()
 Return a default configuration object for initialization. More...
 
IMMERSITECH_API imm_cv_handle imm_cv_init_from_file (const char *license_file_path, imm_cv_config config, imm_error_code *error_code)
 Initialize an instance of the Immersitech ClearVoice Library. More...
 
IMMERSITECH_API imm_cv_handle imm_cv_init_from_memory (uint8_t *license_file_data, size_t license_file_data_size, imm_cv_config config, imm_error_code *error_code)
 Initialize an instance of the Immersitech ClearVoice Library. More...
 
IMMERSITECH_API imm_error_code imm_cv_destroy (imm_cv_handle handle)
 Destroy an instance of the Immersitech ClearVoice Library. More...
 
IMMERSITECH_API imm_error_code imm_cv_set_config (imm_cv_handle handle, imm_cv_mutable_config config, int val)
 Set a configuration value. More...
 
IMMERSITECH_API imm_error_code imm_cv_get_config (imm_cv_handle handle, imm_cv_mutable_config config, int *val)
 Get a configuration value. More...
 
IMMERSITECH_API imm_error_code imm_cv_process (imm_cv_handle handle, float *input, float *output, imm_cv_output_metadata *output_metadata)
 Process audio through the Immersitech ClearVoice Library. More...
 
IMMERSITECH_API imm_error_code imm_cv_add_stream (imm_cv_handle handle, int *id)
 Add a stream for audio processing. More...
 
IMMERSITECH_API imm_error_code imm_cv_destroy_stream (imm_cv_handle handle, int id)
 Destroy a previously created stream. More...
 
IMMERSITECH_API imm_error_code imm_cv_process_stream (imm_cv_handle handle, int id, float *input, float *output, imm_cv_output_metadata *output_metadata)
 Process audio through the Immersitech ClearVoice Library. More...
 
IMMERSITECH_API imm_error_code imm_cv_set_stream_config (imm_cv_handle handle, int id, imm_cv_mutable_config config, int val)
 Set a configuration value. More...
 
IMMERSITECH_API imm_error_code imm_cv_get_stream_config (imm_cv_handle handle, int id, imm_cv_mutable_config config, int *val)
 Get a configuration value. More...
 

Data Structures

struct  imm_cv_config
 A structure containing all necessary configuration options to initialize ClearVoice. More...
 
struct  imm_cv_output_metadata
 A structure to return all extra data from the process function. More...
 

Enumerations

enum  imm_cv_anc_mode {
  IMM_CV_ANC_START , IMM_CV_ANC_OFF , IMM_CV_ANC_HIGH , IMM_CV_ANC_LOW ,
  IMM_CV_ANC_END
}
 The different operating modes of AI Noise Cancellation. More...
 
enum  imm_cv_vad_mode { IMM_CV_VAD_START , IMM_CV_VAD_FREQ_ANALYSIS , IMM_CV_VAD_FREQ_AND_AMPLITUDE_ANALYSIS , IMM_CV_VAD_END }
 The different operating modes of Voice Activity Detection. More...
 
enum  imm_cv_mutable_config {
  IMM_CV_MUT_CONF_START , IMM_CV_MUT_CONF_ANC_MODE , IMM_CV_MUT_CONF_AEQ_ENABLED , IMM_CV_MUT_CONF_AGC_ENABLED ,
  IMM_CV_MUT_CONF_ANC_MIX , IMM_CV_MUT_CONF_BSD_LOW_VAD_THRESHOLD , IMM_CV_MUT_CONF_BSD_INACTIVE_SPEECH_COOLDOWN , IMM_CV_MUT_CONF_VAD_MODE ,
  IMM_CV_MUT_CONF_END
}
 The configurations of the ClearVoice library that can be changed after initialization. More...
 

Typedefs

typedef void * imm_cv_handle
 

Function Documentation

◆ imm_cv_add_stream()

IMMERSITECH_API imm_error_code imm_cv_add_stream ( imm_cv_handle  handle,
int *  id 
)

Add a stream for audio processing.

This function will only work if multistream_mode was set to true when ClearVoice was initialized.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[out]idAn ID used to identify this stream in the future.
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_destroy()

IMMERSITECH_API imm_error_code imm_cv_destroy ( imm_cv_handle  handle)

Destroy an instance of the Immersitech ClearVoice Library.

◆ imm_cv_destroy_stream()

IMMERSITECH_API imm_error_code imm_cv_destroy_stream ( imm_cv_handle  handle,
int  id 
)

Destroy a previously created stream.

This function will only work if multistream_mode was set to true when ClearVoice was initialized. All new streams will take on the configuration settings used to initialize the library until changed with imm_cv_set_stream_config().

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]idAn ID previously returned from imm_cv_add_stream()
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_get_config()

IMMERSITECH_API imm_error_code imm_cv_get_config ( imm_cv_handle  handle,
imm_cv_mutable_config  config,
int *  val 
)

Get a configuration value.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]configAn imm_cv_mutable_config representing the configuration you'd like to get
[out]valA pointer to the value you'd like to get
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_get_default_config()

IMMERSITECH_API imm_cv_config imm_cv_get_default_config ( )

Return a default configuration object for initialization.

◆ imm_cv_get_stream_config()

IMMERSITECH_API imm_error_code imm_cv_get_stream_config ( imm_cv_handle  handle,
int  id,
imm_cv_mutable_config  config,
int *  val 
)

Get a configuration value.

This function will only work if multistream_mode was set to true when ClearVoice was initialized.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]idAn ID representing which stream this configuration refers to
[in]configAn imm_cv_mutable_config representing the configuration you'd like to get
[out]valA pointer to the value you'd like to get
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_init_from_file()

IMMERSITECH_API imm_cv_handle imm_cv_init_from_file ( const char *  license_file_path,
imm_cv_config  config,
imm_error_code error_code 
)

Initialize an instance of the Immersitech ClearVoice Library.

Parameters
[in]license_file_pathThe path to your Immersitech license file
[in]configAn imm_cv_config struct
[out]error_codeAn imm_error_code representing if the call was a success or not
Returns
An imm_cv_handle representing the initilized Immersitech Library.

◆ imm_cv_init_from_memory()

IMMERSITECH_API imm_cv_handle imm_cv_init_from_memory ( uint8_t *  license_file_data,
size_t  license_file_data_size,
imm_cv_config  config,
imm_error_code error_code 
)

Initialize an instance of the Immersitech ClearVoice Library.

Parameters
[in]license_file_dataImmersitech license file data
[in]license_file_data_sizeThe size of the Immersitech license file data
[in]configAn imm_cv_config struct
[out]error_codeAn imm_error_code representing if the call was a success or not
Returns
An imm_cv_handle representing the initilized Immersitech Library.

◆ imm_cv_process()

IMMERSITECH_API imm_error_code imm_cv_process ( imm_cv_handle  handle,
float *  input,
float *  output,
imm_cv_output_metadata output_metadata 
)

Process audio through the Immersitech ClearVoice Library.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]inputA pointer to your input audio data
[out]outputA pointer to your output audio data
[out]output_metadataA pointer to an imm_cv_output_metadata struct, which will hold metadata about the output audio data
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_process_stream()

IMMERSITECH_API imm_error_code imm_cv_process_stream ( imm_cv_handle  handle,
int  id,
float *  input,
float *  output,
imm_cv_output_metadata output_metadata 
)

Process audio through the Immersitech ClearVoice Library.

This function will only work if multistream_mode was set to true when ClearVoice was initialized.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]idAn ID representing which stream this audio data belongs to
[in]inputA pointer to your input audio data
[out]outputA pointer to your output audio data
[out]output_metadataA pointer to an imm_cv_output_metadata struct, which will hold metadata about the output audio data
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_set_config()

IMMERSITECH_API imm_error_code imm_cv_set_config ( imm_cv_handle  handle,
imm_cv_mutable_config  config,
int  val 
)

Set a configuration value.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]configAn imm_cv_mutable_config representing the configuration you'd like to change
[in]valThe value you'd like to set the configuration to
Returns
An imm_error_code representing if the call was a success or not

◆ imm_cv_set_stream_config()

IMMERSITECH_API imm_error_code imm_cv_set_stream_config ( imm_cv_handle  handle,
int  id,
imm_cv_mutable_config  config,
int  val 
)

Set a configuration value.

This function will only work if multistream_mode was set to true when ClearVoice was initialized.

Parameters
[in]handleAn imm_cv_handle to a ClearVoice instance
[in]idAn ID representing which stream this configuration refers to
[in]configAn imm_cv_mutable_config representing the configuration you'd like to change
[in]valThe value you'd like to set the configuration to
Returns
An imm_error_code representing if the call was a success or not

Typedef Documentation

◆ imm_cv_handle

typedef void* imm_cv_handle

Enumeration Type Documentation

◆ imm_cv_anc_mode

The different operating modes of AI Noise Cancellation.

Enumerator
IMM_CV_ANC_START 

Start value.

IMM_CV_ANC_OFF 

AI Noise Cancellation disabled.

IMM_CV_ANC_HIGH 

AI Noise Cancellation at full power mode.

IMM_CV_ANC_LOW 

AI Noise Cancellation at low power mode.

IMM_CV_ANC_END 

End value.

◆ imm_cv_mutable_config

The configurations of the ClearVoice library that can be changed after initialization.

Enumerator
IMM_CV_MUT_CONF_START 

Start value.

IMM_CV_MUT_CONF_ANC_MODE 

The operating mode of AI Noise Cancellation.

IMM_CV_MUT_CONF_AEQ_ENABLED 

Whether Automatic Equalization is On or Off.

IMM_CV_MUT_CONF_AGC_ENABLED 

Whether Automatic Gain Control is On or Off.

IMM_CV_MUT_CONF_ANC_MIX 

The wet/dry mix [0-100] of the AI Noise Cancellation. 0 is only noisy audio, 100 is only noise cancelled audio.

IMM_CV_MUT_CONF_BSD_LOW_VAD_THRESHOLD 

The VAD Score threshold considered speech when calculating Binary Speech Detection (BSD)

IMM_CV_MUT_CONF_BSD_INACTIVE_SPEECH_COOLDOWN 

The time (ms) the VAD Score must be under bsd_low_vad_threshold in order to BSD to return False.

IMM_CV_MUT_CONF_VAD_MODE 

The operating mode of the Voice Activity Detector.

IMM_CV_MUT_CONF_END 

End value.

◆ imm_cv_vad_mode

The different operating modes of Voice Activity Detection.

Enumerator
IMM_CV_VAD_START 

Start value.

IMM_CV_VAD_FREQ_ANALYSIS 

VAD analyzing only frequency content for detection.

IMM_CV_VAD_FREQ_AND_AMPLITUDE_ANALYSIS 

VAD analyzing frequency content and amplitude for detection.

IMM_CV_VAD_END 

End value.