nvscmdline

The nvscmdline utility processes plain text with optional native Vocalizer markup, and produces an 8kHz µ-law audio file. You can also configure it to process SSML input and produce an audio file that is 8 kHz A-law, 8 kHz linear 16-bit PCM, or 22 kHz linear 16-bit PCM. This utility processes one text file or input text string and generates an audio file.

The utility is typically found in:

  • Linux:
    • /usr/local/Nuance/Common/x86/bin/ (32 bit)
    • /usr/local/Nuance/Common/amd64/bin/ (64 bit)
  • Windows:
    • C:\Program Files (x86)\Common Files\Nuance\Common\x86\bin\ (32 bit)
    • C:\Program Files\Common Files\Nuance\Common\amd64\bin\ (64 bit)

You can start the 32 bit version (in Linux) or 64 bit version (in Windows) from any directory. However, you can start a specific version (that is, the 64 bit version in Linux or 32 bit version in Windows) from the directory where it is installed. The syntax is:

nvscmdline options

Options

Use double quotes around option values to avoid errors. For example, -a "audio/L16;rate=8000" or -c "text/plain;charset=iso-8859-1".

These options are required:

-N

The IP address and port of the Vocalizer host (IP:port).

-l

Language, IETF language code or a Vocalizer language name.

-n

Voice name.

-o

Output filename. Can contain directories, both absolute and relative. Bydefault, the file is saved in the same directory as  nvscmdline.exe.

One (and only one) of these options is required:

-s

String to speak.

-f

Text file to speak.

These options are optional:

-m

Voice model:

  • full_encryptf8
  • full_vssq5f22
  • xpremium
  • xpremium-nb
  • xpremium-high
  • xpremium-high-nb

-a

MIME content type describing the output audio format. Default is "audio/basic" for 8 KHz u-law. See Configuring MIME content types for other values.

-c

MIME content type describing the input text format. Default is "text/plain;charset=iso-8859-1".

Use "auto" when reading text from a UTF-8 text file, to force plain/text vs SSML auto-detection. See Configuring MIME content types for other values.

-w

Saves the output file in WAV format.

-v

Volume [0–100].

-r

Rate [1–100].

-ew

Print word marks.

-ep

Print phoneme marks.

-ee

Print event log events.

-A

Binary add-on system dictionary. May be specified multiple times. These dictionaries are only available with Vocalizer for Enterprise.

-t

Ruleset. May be specified multiple times.

-d

User dictionary. May be specified multiple times.

-x

ActivePrompt database. May be specified multiple times.

-S

Secure context, disable logging confidential data.

-X

Session XML configuration file.

-C

Add configuration parameter for TtsProcessWithParams() method, in the form param=value. May be specified multiple times.

-R

Repeat TtsProcess a number of times.

-V

Show product version information and exit.

-p

Local client port for backward B channel.

Both Speech Server and nvscmdline use port 9300 by default to receive information from the Vocalizer host. If you use nvscmdline on a host that also has a Speech Server, and if this Speech Server uses the default server.nvs-client.Port setting, you must use the -p option to specify a different port for nvscmdline to use.

-Z

Full client log path (for example, /tmp/nvsclient.log).

Example commands

This command sends a request to the Vocalizer host on port 9200 of the current host to convert the phrase “Hello there” to speech using the voice “Samantha”, and to save a recording of the spoken output to a test.au file:

nvscmdline -N 127.0.0.1:9200 -l en-US –n Samantha –o test.au -s "Hello there"

This command uses the same Vocalizer host to speak the phrase “This is a test” with the US English voice Samantha, while logging to the /tmp/nvs-client.log file and saving a recording of the spoken output to a test.au audio file:

nvscmdline -N 127.0.0.1:9200 -l en-US -n Samantha -o test.au -s "This is a test" -Z /tmp/nvs-client.log

This command uses the local Vocalizer host to read and convert text from the input.txt file in the US-English voice Tom, logging to the /tmp/nvs-client.log file, and saving a recording of the spoken output to test.L16 as a 22 KHz L16 file:

nvscmdline -N 127.0.0.1:9200 -Z /tmp/nvs-client.log -l en-US -n Tom -o test.L16 -f input.txt -a "audio/L16;rate=22050"

This command shows the engine version and the list of installed voices:

nvscmdline -N 127.0.0.1:9200 –V 

This command specifies a voice, a string to be spoken, an output audio file (containing the TTS string) in WAV format, and an activeprompt database where the audio file is retrieved:

nvncmdline -n Ava-Mls -s "Your credit is good." -o test1.wav -w -x "application/x-vocalizer-activeprompt-db;mode=automatic apdb_tp_ava-mls_full_IRS.dat"

Troubleshooting tips

To display a help screen, run the program without arguments.

The program returns errors if there are problems generating the audio file. For example, the error TTS_E_LIC_NO_LICENSE means Vocalizer could not acquire a license. Check your license configuration.