The Bfv API Functions

The Infopkt Stream

An infopkt stream is a file or memory buffer containing concatenated individual infopkts. The length of an infopkt stream is limited only by the file size conventions specific to an operating system. The BfvInfopktOpen function opens file-based infopkt streams, and the BfvInfopktOpenMem function opens memory-based infopkt streams.

For speech record and play applications, the first infopkt in the infopkt stream depends on the type of speech file.

If the speech file is an indexed prompt file (see mkprompt on page 155 in this manual, and the BfvPromptPlay function in Volume 3 of the Bfv API Reference Manual), an INFOPKT_PROMPT_MAP infopkt begins the infopkt stream. An INFOPKT_SPEECH_PARAMETERS infopkt begins each new speech file embedded within the infopkt stream.

If the speech file is a simple speech file, one recorded with the BfvSpeechRecord function, an INFOPKT_SPEECH_PARAMETERS infopkt begins the infopkt stream.

Creating an Infopkt Stream

The mkinfopk program, included on the distribution media, builds an infopkt stream. It has the following command syntax:

mkinfopk -o output_fname {infopkt_type arg}...

-o output_fname

Is the name of the output file.

infopkt_type

Indicates the type of infopkt which follows.

arg

Is the argument for the infopkt. Depending on

 

the infopkt_type, it is either a filename or a

 

dummy value.

For more detailed information on mkinfopk, see mkinfopk on page 153 in this manual.

The decode program, also included on the distribution media, reads a specified infopkt stream and lists the individual infopkts within the stream. See Sample Applications and Utilities on page 127 in this volume for more detailed information on how to use this utility.

Figure 2 illustrates how to create an infopkt stream to play either an indexed prompt file or a simple speech file. You must create a separate infopkt stream for each type.

November 2009

47

Page 47
Image 47
Dialogic 6.2 manual Creating an Infopkt Stream, Mkinfopk -o outputfname infopkttype arg