Converts voice data to Blueworx Voice Response format.
Blueworx Voice Response library (libvae.a)
Custom Server library (libca.a)
#include "CA_header.h" #include "CA_access_db.h" int CA_Import_Voice ( INT_VOICE_ST *int_sp, EXT_VOICE_ST *ext_sp );
This subroutine converts voice data from an external source into the internal format used by Blueworx Voice Response, compressing it if required. The output data from this subroutine can be imported into the Blueworx Voice Response database using, for example, CA_Create_Segment().
The EXT_VOICE_ST structure defines the format of the input voice elements, and the INT_VOICE_ST structure defines the required format of the output voice data.
The calling routine must calculate the number of voice elements required to hold the voice data. Each voice element holds 0.2 seconds of voice, or 1600 input bytes consisting of 8-bit samples at 8000 Hz. It should then allocate the output_voice buffer large enough to hold the output voice elements, which is COMPRESSED_ELEMENT_LENGTH for compressed voice elements and is UNCOMPRESSED_ELEMENT_LENGTH for uncompressed voice elements. You can use CA_Get_Element_Count() to calculate the number of voice elements required, as it takes into account the sample width and sampling rate of the input voice data in the calculation.
The input data is checked for acceptable volume levels. Voice data with a maximum volume outside the range 8 dBm to -82 dBm is rejected.
CA_INV_ADDR
CA_INV_COMPRESSION_TYPE
CA_INV_SAMPLE_WIDTH
CA_INV_SAMPLING_RATE
CA_INV_VOICE_FORMAT
CA_INV_VOICE_ORDER
CA_INV_VOLUME
CA_MALLOC_FAILED
CA_NOT_INIT
CA_TERMINATING