Flite is an open-source library that provides to convert text to speech with some configurations as well like slow speed, high speed, and increase volume as well.
Here is Command
#1
flite "Test file Hello jsgrip, how are you?" flite.mp3
## Run this command in terminal After install library
Above command with generate flite.mp3(you can give any name like rubyonrails.mp3) and play this in the music player.
#2
flite -voice flite_voice/cmu_us_axb.flitevox "Welcome to Ruby on Rails framework" flite.mp3
The above command is generate mp3 with the specific audio voice you can download more voices from http://www.festvox.org/flite/packed/flite-2.0/voices/
#3
flite --setf duration_stretch=1.5 "Awesome library for convert text to speech" flite.mp3
It’s making slow voice and save as flite.mp3 you can pass params as 1.5, 1, 3, 4, 2 any number
#4
flite -voice flite_voice/cmu_us_axb.flitevox --setf duration_stretch=1.5 "Jsgrip blogging website" flite.mp3
Example for multiple options passes with flite library