Voice Export Utility for OS/2

The DirectTalk/2 Voice Export Utility program allows for the exportation of voice segments from DirectTalk/2 to destinations external to DirectTalk/2. The program reads a control file which contains statements that specify the source of the voice segment and its destination. The program optionally will build an import control file to reimport the segments.

The command takes the form:

dtlkvexp [-m recording_mode] [{-a appl_name -l language | -d database_name}] control_file_name gsi_network_name [output_control_filename]


The flags "-m", "-d", and "-a" and "-l" provide default values for the same flags in the "*export" statement that is described below. These flags, if specified, must immediately follow the command on the command line. The control_file_name gives the name of a file that contains one or more "*export" statements. The "gsi_network_name" is the network name of the General Server that controls the database server to be used by the export process to read the voice database(s). The "output_control_filename" is the destination for the "*import" control statement built by the export process for re-importing the voice files. If this parameter is not given, it defaults to "dtlkvimp.ctl".

The control file contains one or more statements in the following form as well as optional voice segment text records.

*export -v voice_file_name -s {segment_name | *} -m recording_mode [-t {*|text_file_name}] {-a appl_name -l language | -d database_name}

WHERE:

-v voice_file_name The name (fully qualified, if necessary) of the OS/2 file that is to receive the voice segment.

-s segment_name The name of the DirectTalk/2 voice segment that is to be exported or, if specified as an "*" indicates
that all segments in the database are to be exported to individual files named "Vnnnnn.Vrm" where "nnnnn" is generated file number and "rm" is the recording mode specified. When all segments are to be exported, the text for the segment, if any, is
included in the output control file as if "-t*" was specified for each segment.

-m recording_mode One of the following values that represents the recording mode used for the voice file. This value is used as an annotation on the "*import" as to the recording mode of the exported segment. It is checked against the recording mode of the source DirectTalk/2 system for compatibility. If different, a warning message is issued.

24 -- 24 Kbps ADPCM recording
32 -- 32 Kbps ADPCM recording
48 -- 48 Kbps PCM recording
64 -- 64 Kbps PCM recording (Mulaw)

-t {* | text_file_name} The target for the optional text for the voice segment. If this is specified as "*", then the text will be included in the import control file built by the export program, if specified. If this is specified as a file name, the the text will be written to that file. If the parameter is omitted, no text will be exported by the export program.

-a application_name The name of the DirectTalk/2 application from which this segment is to be exported. The "-l" parameter must also be specified to indicate which language this segment is recorded in. The "-d" parameter cannot be specified.

-l language The name of the language in which this segment is recorded. This parameter must be specified in combination with the "-a" parameter. The valid language names are listed in the DirectTalk file, TAMDLANG.NME. Be sure to use the language name and not the character code.

-d database The name of the DirectTalk/2 voice database from which this segment is to be exported. This parameter is mutually exclusive with the "-a" and "-l" combination.

The following is an example of a control file. The numbers are not part of the control statements but a references to the notes that follow.
(1) *export -shello -vhello.v24 -amenu -lUS_English -t*
(2) *export -vnm123456.n24 -dnames.vdb -snm123456
(3) *export -goodbye.v24 -amenu -lUS_English -sgoodbye -tgoodbye.vtx

Example export statement (1) specifies that voice segment HELLO from the US ENGLISH application MENU is to be exported to the file HELLO.V24. The text is to be included in the import control file built by the export program.

Example export statement (2) specifies that the segment NM123456 is to be exported from voice database NAMES.VDB into file NM123456.V24. No text is to be exported.

Example export statement (3) specifies that voice segment GOODBYE from the US ENGLISH application MENU is to be exported to the file GOODBYE.V24. The text is to be written to file GOODBYE.VTX.

Voice Import Utility for OS/2

The DirectTalk/2 Voice Import Utility program allows for the importation of  voice segments from sources external to DirectTalk/2 into the DirectTalk/2 voice databases. The program reads a control file which contains statements that specify the source of the voice segment, the associated text, and the destination voice segment database.

The command takes the form and all parameters are positional.

dtlkvimp [-m recording_mode] [{-a appl_name -l language | -d database_name}] control_file_name gsi_network_name

The flags "-m", "-d", and "-a" and "-l" provide default values for the same flags in the "*import" statement that is described below. These flags, if specified, must immediately follow the command on the command line. The control_file_name gives the name of a file that contains one or more "*import" statements as well as optional voice segment text records. The "gsi_network_name" is the network name of the General Server that controls the database server to be used by the import process to write the voice database(s).

The "*import" control statement takes the following form:

*import -v voice_file_name -m recording_mode -s segment_name {-a appl_name -l language | -d database_name} [-t {*|text_file_name}] [-o offset -c count]

WHERE:

-v voice_file_name The name (fully qualified, if necessary) of the OS/2 file that contains the input recorded voice.

-m recording_mode One of the following values that represents the recording mode used for the voice file. This value is used to check that the DirectTalk/2 system is configured for the recording mode being imported. 

24 -- 24 Kbps ADPCM recording
32 -- 32 Kbps ADPCM recording
48 -- 48 Kbps PCM recording
64 -- 64 Kbps PCM recording (Mulaw)

-s segment_name The name of the DirectTalk/2 voice segment that this voice file is to be imported as.

-a application_name The name of the DirectTalk/2 application for which this segment is to be imported. The "-l" parameter must also be specified to indicate which language this segment is recorded in. The "-d" parameter cannot be specified.

-l language The name of the language in which this segment is recorded. This parameter must be specified in combination with the "-a" parameter. The valid language names are listed in the DirectTalk file, TAMDLANG.NME. Be sure to specify the language name, not the character code.

-d database The name of the DirectTalk/2 voice database into which this segment is to be imported. This parameter
is mutually exclusive with the "-a" and "-l" combination.

-t {* | text_file_name} The source for the optional text for the voice segment. If this is specified as "*", then the text immediately follows the control statement. If this is specified as a file name, the the text will be read from that file. If the parameter is omitted, no text will be associated with the voice segment and the DirectTalk/2 Voice Segment Editor may be unable to process the segment unless the text has been placed in the database through some other means. In either case when text is specified, it can be up to 10 lines of up to 78 bytes each. Any excess lines will be skipped and any long lines will be truncated.

-o offset The starting offset relative to zero in the specified voice file of the data for this voice segment. Offset and count must be specified together. If not specified, the entire file will be imported.

-c count The length of the data starting at the specified offset that is to be imported into this segment. Offset and count must be specified together. If not specified, the entire file will be imported.

The following is an example of a control file. The numbers are not part of the control statements but a references to the notes that follow.

(1) *import -vhello.v24 -m24 -amenu -lUS_English -shello -t*
Hello, this is the ABC Company telephone ordering system
(2) *import -vnm123456.n24 -m24 -dnames.vdb -snm123456
(3) *import -goodbye.v24 -m24 -amenu -lUS_English -sgoodbye -tgoodbye.vtx

Example import statement (1) specifies that voice file HELLO.V24 recorded at 24KPBS is to be stored in the US ENGLISH voice segment file for application MENU as segment HELLO. The text for the segment follows the control statement in the control file.

Example import statement (2) specifies that the voice file NM123456.V24 is to be imported into voice database NAMES.VDB as segment NM123456. It was recorded 24Kbps. There is no text.

Example import statement (3) specifies that voice file GOODBYE.V24 recorded at 24KPBS is to be stored in the US ENGLISH voice segment file for application MENU as segment GOODBYE. The text for the segment is in file GOODBYE.TXT.

Return to main page