This page explains the usage of dhvani commandline tool
Getting Commandline Help
All the command line options of the dhvani is available when we use -h or --help switch.
dhvani -h
or,
dhvani --help
gives a short help message for all command line options
Getting Version Information
The -v or --version option gives the version details of dhvani
dhvani -v
or,
dhvani --version
Getting List of Supported Languages
The -d or --list option lists all supported languages od dhvani
dhvani -d
or,
dhvani --list
Setting the language of the Input
Users can override dhvani's aoutomatic language detection by manually specifying the language at the command line. -l or --lang switch can be used this.
ISO language codes can be used for specifying the language
dhvani -l ml
or,
dhvani --lang hi
Users may also use xx_YY pattern language codes .
dhvani -l ml_IN
or,
dhvani --lang hi_IN
If the language is not one of the supported languages, dhvani will exit with an error message.
Passing a String to speak
Dhvani can take a string from command line and speak. For this we need to use -t or --text command line option.
dhvani -t നമസ്കാരം
or,
dhvani --text "എന്താ പേരു്"
Interactive Mode
Users can interactivey use dhvani using -i or --stdin option.
dhvani -i
or,
dhvani --stding
This will give a prompt like this
dhvani interactive mode.Give the string to speak at the prompt
dhvani>
Type the strings to speak at the prompt and press enter key. Dhvani will speak the text and it will return to prompt.
Passing a File to speak
Dhvani can take a string from command line and speak. For this we need to use -t or --text command line option.
dhvani -t നമസ്കാരം
or,
dhvani --text "എന്താ പേരു്"
Interactive Mode
Users can interactivey use dhvani using -i or --stdin option.
dhvani -i
or,
dhvani --stdin
This will give a prompt like this
dhvani interactive mode.Give the string to speak at the prompt
dhvani>
Type the strings to speak at the prompt and press enter key. Dhvani will speak the text and it will return to prompt.
This option can be used for speaking the output of a command . For eg:
dhvani -i < cat myfile.txt
will read all the contents of myfile.txt. You may redirect the output of any command to this also. Note that output should be unicode and in any of the supported languages.
Passing a File to speak
To speak a file , just give the filename to dhvani
dhvani /path/to/your/filename.txt
For example
dhvani /home/santhosh/hindi.txt
Saving the speech to a file
To save the speech to an output file, use -o or --output option followed by the output file name
dhvani -o outputfile.ogg input-filename.txt
For example
dhvani --output outputfile.ogg input-filename.txt
The default format for the output file is ogg vorbis.
To get the output file in wav file format,
dhvani -f wav -o outputfile.ogg input-filename.txt
For more information about the output file formats , see Output file formats
Setting the pitch of the speech
To set the pitch of the speech, use -p or --pitch option. You may give positive or negative numbers as pitch. See the below examples
dhvani -p 2 input-filename.txt
or,
dhvani --pitch -2 input-filename.txt
The number you are giving after -s switch is semitones of change
Setting the speed of the speech
To set the speed of the speech, use -s or --speed option. You may give positive or negative numbers as speed. See the below examples
dhvani -s 2 input-filename.txt
or,
dhvani --speed -2 input-filename.txt
The number you are giving after -s switch is percentage of change