cxcli has some commands that allows you to interact with Google Cloud Text to Speech service using the
Cloud Text-to-Speech API!
Is this your first time using this feature?
Before you start using this functionality, please, read the authentication page.
You can find the text-to-speech commands usage down the
cxcli tts command. You can read the documentation about this command here.
cxcli tts root command has the
synthesize command. You can find the usage of this command here.
These are the relevant parameters that you can use to interact with Google Cloud tts:
locale: the locale accepts all the locales accepted by the Google
Cloud Text-to-speech API. You can find all the locales available here
output-file: mp3 file where we are going to write the synthesize text
It is important to know that the output will have this format:
- A Sample Rate Hertz of 16000Hz
- The audio encoding will be Linear16. Linear16 is a 16-bit linear pulse-code modulation (PCM) encoding.
This a simple example of the
cxcli tts synthesize command:
cxcli tts synthesize hi --locale en-US --output-file hi.mp3
The command above will give you an audio file like this one:
You can download the audio file here