Table of Contents Index NMS Glossary Previous Page Next Page Version


Chapter 5

Demonstration Programs and Utilities


5.1 About the Demonstration Programs and Utilities
5.2 Voice File Copy/Convert Program: vcecopy
5.3 Voice File Information: vceinfo
5.4 Voice File Play: vceplay
5.5 Voice File Record: vcerec
5.6 Make Prompt: mkprompt
5.7 Test Prompt: testpmpt
5.8 VOX File Information: voxinfo

5.1 About the Demonstration Programs and UtilitiesTop of Page

Each demonstration program is shipped as an executable program and with its source and makefiles.

The Voice Message service provides the following demonstration programs and utilities:
Program

Description

vcecopy

Copies messages from one voice file to another and copies, deletes, and reads message text from a file.

vceinfo

Displays voice file information and displays message text.

vceplay

Demonstrates using the Voice Message service to play messages in voice files.

vcerec

Records one or more messages to a voice file and displays message text.

mkprompt

Creates a prompt rules table.

testpmpt

Tests a prompt rules table.

voxinfo

Displays information about a VOX file.

5.2 Voice File Copy/Convert Program: vcecopyTop of Page

Name

vcecopy

Purpose

vcecopy is a universal voice file copy and conversion demonstration program. It includes the following features:

Files are assumed to have an extension of .vox if no extension is specified. Input files can be anywhere in the CTA_DPATH path. The current directory is always searched first.

Usage

vcecopy source file destination file [options]

options can either precede or follow the two file names. Valid options are

Encoding Options
Option

Use this option to...

-e encoding

Specify the encoding of the source file. This is needed only if the source is a flat (.vce) file. Entering -e? displays the following valid values:

1 NMS-16
2 NMS-24
3 NMS-32
4 NMS-64
10 MULAW
11 ALAW
13 PCM8M16
14 OKI-24
15 OKI-32
16 PCM11M8
17 PCM11M16
20 G726
22 IMA-24
23 IMA-32
24 GSM

File Creation Options
Option

Use this option to...

-x

Delete the destination file if it exists. This is the default behavior when the destination is not a VOX file. The default for VOX files is to write to an existing file, if any.

-n indices

Specify number of indices to allocate in a newly created VOX file. Default is the larger of 250 or 2x the number of messages.

Conversion Options
Option

Use this option to...

-g gain

Specify gain in dB. The default is 0 (no gain). The valid range is -24 to +24.

-s energy

Delete silence from the beginning and end of a message containing an NMS encoding. energy is a relative threshold. Default = 25.

-c encoding

Specify the encoding of the destination file when it is to be converted from the source.

Note: You can alternately specify a WAVE PCM encoding as
rate M|S bits. For example, 22M16 for a coding of 22000 (nominal) samples/sec, Mono, 16 bits per sample. rate can be 8, 11, 22, or 44.

Message Number Options
Option

Use this option to...

-m [src msg] [,dest msg]

Specify source message numbers and destination message numbers. The default is to copy all messages in the source file. If only a source message is specified, the destination message number is the same as the source message number. Source message numbers and destination message numbers are ignored if the respective file type is non-VOX.

Message Text Options
Option

Use this option to...

-t N

Not copy message text.

-t O

Copy only message text.

-t F

Specify that the source file is a text file containing lines of the form
<message number>:<text>

File Options
Option

Use this option to...

-i input file type (VOX | WAV | VCE)
-o output file type (VOX | WAV | VCE)

Specify the file type. By default, the file type is inferred from the file name. Any file type other than .vox or .wav is considered VCE (flat).

Examples

vcecopy prompts temp -s25 -x
copies all messages in prompts.vox to temp.vox and trims silence
vcecopy one.wav numbers.vox -c3 -m1 -g-6
vcecopy two.wav numbers.vox -c3 -m2 -g-6
copies messages from 2 Wave files to a single VOX file with NMS32 encoding and reduces the volume by 6dB
vcecopy -x -e10 test.vce message1
copies a message in a flat file named test.vce which has
mu-law encoding to a VOX file named message1.vox. A new file is created.
vcecopy greeting.vox test.vce -e 14 -i VCE
copies a flat file named greeting.vox containing OKI-24 encoding to a flat file named test.vce.
vcecopy input.wav output.wav -c 22m16
copies a wave file named input.wav to a new file named output.wav with 22kHz, 16 bit encoding
vcecopy prompts.txt prompts.vox -t file
copies message descriptions from a text file to a VOX file.

5.3 Voice File Information: vceinfoTop of Page

Name

vceinfo

Purpose

Displays voice file information.

Usage

vceinfo [options] filename

where options are

:
Option

Use this option to...

-e encoding

Specify the encoding of the file. This option is only needed for flat files. Entering -e? displays the following list of valid values:

1 NMS-16
2 NMS-24
3 NMS-32
4 NMS-64
10 MULAW
11 ALAW
13 PCM8M16
14 OKI-24
15 OKI-32
16 PCM11M8
17 PCM11M16
20 G726
22 IMA-24
23 IMA-32
24 GSM

-f filetype

Specify the file type. File types are .vox, .wav, and .vce. By default, the file type is inferred from the file name. A file having an extension other than .vox or .wav is considered VCE (flat). If no file type is specified and the file name does not have an extension, .vox is assumed.

-n

Not show message information.

-?

Display an on-screen list of options.

Featured Functions

vceClose, vceGetHighMessageNumber, vceGetMessageSize, vceGetOpenInfo, vceOpenFile, vceSetCurrentMessage

Examples

        c:> vceinfo ctademo.vox
CT Access Voice File Info Utility V 1.5 (Dec 11 1997)

File: `ctademo.vox'
Type: NMS Vox
Encoding: NMS 24 Kbps
High Msg: 18
Msg 0 is 820 ms "zero"
Msg 1 is 700 ms "one"
Msg 2 is 600 ms "two"
Msg 3 is 620 ms "three"
Msg 4 is 600 ms "four"
Msg 5 is 640 ms "five"
Msg 6 is 720 ms "six"
Msg 7 is 660 ms "seven"
Msg 8 is 480 ms "eight"
Msg 9 is 740 ms "nine"
Msg 10 is 1600 ms "the digits called were"
Msg 11 is 1440 ms "the calling party's number is"
Msg 12 is 1240 ms "thank you for calling"
Msg 13 is 3700 ms "press 1 to record, 2 to play, 3 to hang up"
Msg 14 is 1360 ms "there is nothing to play"
Msg 15 is 1940 ms "you are being called by the demo"
Msg 16 is 3800 ms "please enter the extension of the party "
Msg 17 is 2700 ms "I'll try that extension now"
Msg 18 is 1540 ms "goodbye"

5.4 Voice File Play: vceplayTop of Page

Name

vceplay

Purpose

Plays voice files. User interface from keyboard or touch-tones allows control of pause/resume, forward/rewind, louder/softer, and faster/slower. Refer to Section 2.3, Playing for more information.

Usage

vceplay [options] filename [additional filenames ...]

where options are
Option

Use this option to...

-b board

Specify the board number. Default = 0

-e encoding

Specify the encoding of the file. This option is only needed for flat files. -e? displays a list of choices.

-m start [:end]

Specify the message or messages to play. If only start is given, then only that message will be played. If end is also specified, then all messages from start to end, inclusive, will be played.

-p protocol

Wait for and connect to an incoming call. -p specifies the call control protocol. Default is LPS0. To use vceplay with a phone directly connected to a DID port on an AG 2000 board, specify the NOCC protocol. For example, "vceplay -pnocc {filename}".

-s [stream:]slot

Specify the port (DSP) address. Default = 0:0.

You need to specify only the slot.

-?

Display an on-screen list of program options.

Keyboard and Touch Tone Control

You can enter the following single-digit commands with either a keystroke or a touch tone:
Command

Description

1

Beginning of message/previous message

2

Next message

3

Next file

4

Rewind 2 seconds

5

Pause/resume (toggle)

6

Forward 2 seconds

7

Slower

8

Softer

9

Faster

0

Louder

*

Redisplay commands

# or <esc>

Exit

Note: 1 goes back to the previous message if you are currently at the beginning of a message.

Featured Functions

vceClose, vceGetContextInfo, vceGetHighMessageNumber, vceGetMessageSize, vceOpenFile, vcePlay, vceSetCurrentMessage, vceSetPlayGain, vceSetPlaySpeed, vceSetPosition, vceStop

Examples

vceplay -m2:4 american.vox
plays messages 2,3, and 4 in american.vox
vceplay c:\test\hello.wav
plays the message in hello.wav
vceplay -e3 test.vce
plays a flat file named test.vce. The encoding of the file is NMS24.
vceplay -e?
displays the encoding values and their names.
vceplay .\*.wav
plays all of the wave files in the current directory.

5.5 Voice File Record: vcerecTop of Page

Name

vcerec

Purpose

Records voice files. Refer to Section 2.4, Recording for more information.

Usage

vcerec [options] filename [additional filenames ...]

where options are
Option

Use this option to...

-b board

Specify the board number. Default = 0

-e encoding

Specify the encoding of the file. This option is only needed for flat files. Entering `-e?' displays the following list of valid values:

1 NMS-16
2 NMS-24
3 NMS-32
4 NMS-64
10 MULAW
11 ALAW
13 PCM8M16
14 OKI-24
15 OKI-32
16 PCM11M8
17 PCM11M16
20 G726
22 IMA-24
23 IMA-32
24 GSM

-f filetype

Specify the file type. File types are VOX, WAV, and VCE. By default, the file type is inferred from the file name. A file having an extension other than .vox or .wav is considered vce (flat). If no file type is specified and the file name does not have an extension, .vox is assumed.

-i voxindices

Specify the number of indices in a newly created VOX file (48 to 6400). The default number of index entries in a VOX file is 250.

-m start:end

Specify the message or messages to record. If only start is given, then only that message will be recorded. If end is also specified, then all messages from start to end inclusive will be recorded.

-p protocol

Wait for and connect to an incoming call. -p specifies the call control protocol. Default is LPS0. To use vcerec with a phone directly connected to a DID port on an AG 2000 board, specify the NOCC protocol. For example, vcerec -pnocc {filename}.

-r seconds

Specify the maximum seconds per message. If not specified, there is no limit.

-s [stream:]slot

Specify the port (DSP) address. Default = 0:0.

You need to specify only the slot. For AG-24/30/48/60 boards, specify the MVIP stream and slot.

-x

Overwrite existing destination file. The default is to merge into an existing file, if any.

-?

Display an on-screen list of program options.

Keyboard and Touch Tone Control

You can enter the following single-digit commands with either a keystroke or a touch tone:
Command

Description

1

Restart message

2

Next message

5

Pause/resume (toggle)

# or ESC

Exit

Featured Functions

vceClose, vceCreateFile, vceEraseMessage, vceGetContextInfo, vceGetHighMessageNumber, vceGetMessageSize, vceGetOpenInfo, vceOpenFile, vceRecord, vceRecordMessage vceSetCurrentMessage, vceSetPlayGain, vceSetPlaySpeed, vceSetPosition, vceStop

Examples

vcerec test.wav
re-record one message to test.wav

vcerec -pnocc -m0:9 digits
records 10 messages to digits.vox. Does not wait for an incoming call.

vcerec -14 -fVCE oki24.vox
records to a flat file named oki24.vox using OKI-24 encoding

vcerec -e?
displays the encoding values and their names.

5.6 Make Prompt: mkpromptTop of Page

Name

mkprompt

Purpose

Creates a prompt rules table. Refer to Section 2.10, Converting Text Strings to Message Lists for more information. Refer to Appendix D for information on adding or changing prompt rules.

mkprompt compiles prompt rule source files (.ptx) into prompt rule tables (.tbl).

The .tbl file is created only if there are no errors during the compile. If there are errors, they are reported with the line number where the error occurred.

Usage

mkprompt source[.ptx] [dest[.tbl]]

source[.ptx] - is the source text file to be compiled. If no extension is specified, .ptx is assumed.

[dest[.tbl]] - is an optional output file name. If no output file is specified, the source file name will be used with the .tbl extension. If no extension is specified, .tbl is assumed.

Example

mkprompt american

Creates american.tbl from the source american.ptx file.

5.7 Test Prompt: testpmptTop of Page

Name

testpmpt

Purpose

Tests a prompt rules table. Refer to Section 2.10, Converting Text Strings to Message Lists for more information. Refer to Appendix D for information on adding or changing prompt rules.

testpmpt tests new prompt rules without having to pre-record the actual voice messages. After rules are created or edited in a prompt rule text file (.ptx), they are compiled into a rule table (.tbl) file using mkprompt as described in Section 5.6.

A text description for each message should be created in a text file with the same root name as your .tbl file. The text description has the following format:

nn:description

where nn is the message number being described.

Use the vcecopy utility to copy the message text into the .vox file that contains, or that will contain, the recorded prompts.

When this utility is executed, the rule table and the voice or text file are loaded. You are prompted to enter a text string to be processed by the Prompt Builder.

Usage

testpmpt [options]

where options are
Option

Use this option to...

-p table

Specify the prompt table name (assumes a .tbl extension). The default name is american.

-v voicefile

Specify the name of the voice file containing the message text (assumes a .vox extension). The default is the same name as the table.

-t text

Specify the name of the file containing prompts in text form (assumes a .txt extension). testpmpt does not look for a voice file if you specify a text file.

Example


C> testpmpt -p american
CT Access Test Prompt Utility V 1.2 (Dec 11 1997)
Prompt table = american.tbl
Prompt text from american.vox
Enter text: 1/15/98
January fifteenth nineteen ninety eight
Enter text: 12345
twelve thousand three hundred forty five
Enter text: 12:34:34
twelve thirty four and thirty four seconds P.M.
Enter text: 12:34
twelve thirty four P.M.
Enter text: $416.23
four hundred sixteen dollars and twenty three cents
Enter text:

C>

5.8 VOX File Information: voxinfoTop of Page

Name

voxinfo

Purpose

Displays information about a specified NMS VOX file, including the header fields and details about each message.

The unit of size in VOX files is the frame. A frame represents 20 ms when speech is encoded with one of the NMS voice encodings, and 10 ms for most other encodings.

Refer to Appendix C for more information about the VOX file format.

Usage

voxinfo filename

Example


c:>voxinfo myprompt
NMS Voice File Information Utility CT Access Version 1.2 Dec 11 1997
Copyright (c) 1996 Natural MicroSystems Corp. All Rights Reserved.
File: MYPROMPT Compression rate: 2 (NMS-24)
Maximum number of indices: 48
Number of active indices: 4
Number of freed indices: 0
Number of indices in use: 4
Number of available indices: 44
Highest message number: 3
Total number of frames: 228 (5 seconds)
Total number of bytes: 14648
Number of active messages: 3
--------------------ACTIVE INDICES---------------------
Idx# Msg# Frames Bytes Start byte End byte
0 0 0x3b 0xe4a 0x200 - 0x1049
1 1 0x40 0xf80 0x104a - 0x1fc9
2 2 0x38 0xd90 0x1fca - 0x2d59
3 3 0x31 0xbde 0x2d5a - 0x3937
-------------MESSAGE INFORMATION----------------
Msg# Seconds Index Cnt Frame Cnt Byte Cnt
1 1.2 1 64 3968
2 1.1 1 56 3472
3 0.9 1 49 3038


Table of Contents Index NMS Glossary Previous Page Next Page Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.