# Voice file copy and convert: vcecopy

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

- Copies one or more messages from one voice file to another.

- Supports source and destination files of different types (any combination of VOX, WAVE, or flat).

- Supports source and destination files with different encodings. Conversion is supported for NMS ADPCM, IMA ADPCM, OKI ADPCM, G.726-compliant ADPCM, PCM (including all common WAVE file PCM), as well as mu-law and A-law.

- Makes the destination file louder or softer than the source.

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. Use this option 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 26 G723-5.3 27 G723-6.4 28 G729A

File creation options

Option | Use this option to...
--- | ---
-x | Delete the destination file if it exists. This option is the default 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 the number of indices to allocate in a newly created VOX file. The default is the larger of 250 or 2 times the number of messages.

Conversion options

Option | Use this option to...
--- | ---
-g gain | Specify the 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. The default is 25.
-c encoding | Specify the encoding of the destination file when converting it 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. The 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 you specify only a source message, 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 not 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 two wave files to a single VOX file with NMS32 encoding, and reduces the volume by 6 dB.

vcecopy -x -e10 test.vce message1

Copies a message in a flat file named test.vce that 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 22 kHz, 16 bit encoding.

vcecopy prompts.txt prompts.vox -t file

Copies message descriptions from a text file to a VOX file.