beautypg.com

Dialogic 6.2 User Manual

Page 51

background image

The Bfv API Functions

November 2009

51

Infopkt Structure

Every infopkt consists of a header and data. The 4-byte header

consists of a type code and a length. The type code defines the

infopkt type, and the length field indicates the total length of the

infopkt, including the header. Data consists of raw data, formatting

parameters or, in the case of indirect infopkts, pointers to other files.

The maximum length of an individual infopkt is 30,000 bytes, but

Dialogic recommends limiting the size to approximately 1K. This

limit affects the size of infopkts only and has no effect on the size of a

fax document, since large fax documents are simply converted to

multiple infopkts within an infopkt stream.

When indirect infopkts point to other infopkt stream files, the

maximum nesting depth is three. All file names that occur in

indirect infopkts must be 0-terminated.

The infopkt.h file, located in the inc subdirectory, contains the

definitions of the infopkt structures.

See Appendix E in Volume 6 of the Bfv API Reference Manual for the

parameter values and defaults of each tag type infopkt.

Speech Infopkt Parameters

The INFOPKT_SPEECH_PARAMETERS infopkt defines the speech

parameters for infopkt-formatted speech files. These parameters

include the coding format, the compressed sample rate, the number

of bits per sample, the analog front end (afe) rate, and the data

format. In infopkt streams made up of simple speech files, this

infopkt begins the infopkt stream. In infopkt streams made up of

indexed prompt files, it begins each new speech file embedded in the

stream.

Applications use the BfvSpeechRecord function to record speech

in infopkt format (see the Bfv API Reference Manual, Volume 3 for a

complete description). Valid settings for the data coding format,

compressed sample rate for playback, and number of bits per sample

are found with the BfvSpeechRecord function.