Converts voice data from Blueworx Voice Response format to a standard format.
Blueworx Voice Response library (libvae.a)
Custom Server library (libca.a)
#include "CA_header.h" #include "CA_access_db.h" int CA_Export_Voice ( EXT_VOICE_ST *ext_sp, INT_VOICE_ST *int_sp );
This subroutine converts voice data, for example, the output from CA_Get_Segment(), from the internal format used by Blueworx Voice Response into a standard format, decompressing it if necessary. The INT_VOICE_ST structure defines the format of the input voice elements, and the EXT_VOICE_ST structure defines the required format of the output voice data.
The calling routine must calculate the size of buffer required for the output data from the number of voice elements to be converted. Each exported voice element holds 0.2 seconds of voice, which corresponds to 1600 output bytes for 8-bit samples at 8000 Hz, whether the source is compressed or uncompressed. Exported voice data is uncompressed. If the required sampling rate is greater than 8000 Hz, or the required sample width is greater than 8 bits (for PCM two's complement (FORMAT_TWOC), signed (FORMAT_SMAG), or unsigned (FORMAT_MAG) formats, it must be 16 bits), the calling routine should account for this when calculating the buffer size.
CA_INV_ADDR
CA_INV_COMPRESSION_TYPE
CA_INV_SAMPLE_WIDTH
CA_INV_SAMPLING_RATE
CA_INV_TOTAL_ELEMENTS
CA_INV_VOICE_ELEMENT
CA_INV_VOICE_FORMAT
CA_INV_VOICE_ORDER
CA_MALLOC_FAILED
CA_NOT_INIT
CA_TERMINATING