EXT_VOICE_ST

This structure describes the format of voice data not stored in Blueworx Voice Response voice elements.

data
A pointer to the voice data buffer.
length
The length of the data (in bytes) in the buffer (for import) or the buffer size (for export).
sampling_rate
The rate, in Hz, at which the voice data was sampled. The range for this field is MIN_SAMPLING_RATE to MAX_SAMPLING_RATE inclusive.
sample_width
The number of bits representing each sample. The number varies depending on the field format. See Table 1 for possible values.
Table 1. Valid combinations of format and sample_width fields

Format

Valid sample_width values

FORMAT_ALAW

8 or 16

FORMAT_ULAW

8 or 16

FORMAT_TWOC

16

FORMAT_SMAG

16

FORMAT_MAG

16

format
Indicates the format of the voice data: A-law (FORMAT_ALAW), μ-law (FORMAT_ULAW), or PCM two’s complement, signed or unsigned formats (FORMAT_TWOC, FORMAT_SMAG, or FORMAT_MAG).

FORMAT_TWOC = two’s complement where 16 bit sample values are in the range -32K to +32K in standard two’s complement notation.

Maximum

+32K

=

X’7FFF’

Center

0

=

X’0000’

Minimum

-32K

=

X’8000’

FORMAT_SMAG = signed magnitude where the 16 bit sample consists of a sign bit plus a 15 bit amplitude value, in the range 0 to +32K.

Maximum

+32K

=

X’7FFF’

Center

0

=

X’0000’

Minimum

-32K

=

X’FFFF’

FORMAT_MAG = unsigned magnitude where the 16 bit sample is an unsigned binary value in the range 0 to 64K.

Maximum

+64K

=

X’FFFF’

Center

+32K

=

X’7FFF’ or X’8000’

Minimum

0

=

X’0000’

order
For 16-bit samples, indicates whether the samples are stored from left to right (ORDER_BIG_ENDIAN) or from right to left (ORDER_LITTLE_ENDIAN). Ignored for 8-bit samples.