Dhvani generates the speech in wav format with the following specification:
- Format: Signed 16 Bit Little Endian S16_lE
- Channels: 1
- Sample rate: 16 KHz
When dhvani is used in without saving the output speech to a file, the audio player of dhvani will play this sound. Internally it uses ALSA sound APIs.
When the -o switch is used, dhvani will write the generated speech to a file specified. Here the output format is ogg vorbis by default.
For eg:
dhvani -o ouput.ogg textfile.txt
will generate output.ogg in oggvorbis format. We can even specify the format using -f switch. Like this: dhvani -o ouput.ogg -f ogg textfile.txt
or
dhvani -o ouput.ogg -f OGG textfile.txt
We can use --format switch in place of -f too.
For getting the output file in wav format itself, we can use -f wav switch.
For eg:
dhvani -o ouput.wav -f wav textfile.txt
will generate output.ogg in WAV format. Alternate forms: dhvani -o ouput.wav --format wav textfile.txt
or
dhvani -o ouput.wav -f WAV textfile.txt
.
Playing the generated speech files: