15.4 azspeech synthesize
THIS SECTION IS UNDER DEVELOPMENT. PLEASE COME BACK LATER
The synthesize command will generate spoken word audio, spoken by
a human sounding voice, from supplied text, and will play the audio on
the system’s default audio output. With
--output a wav
file can be specified as the output rather than having the audio
played through the speakers.
$ ml synthesize azspeech [sentence] -f <file> --file=<file> Text to be spoken. -l <lang> --lang=<lang> Target language. -o <file.wav> --output=<file.wav> Save synthesized audio to file. -v <voice> --voice=<voice>
The simplest usage is to synthesise the sentence provided on the command line:
$ ml synthesize azspeech Welcome my son, welcome to the machine.
The spoken language can be chosen, though this will attempt to pronounce the words as if they are French:
$ ml synthesize azspeech --lang=fr-FR It's alright, we know where you've been.
$ ml synthesize azspeech --voice=en-AU-NatashaNeural You brought a guitar to punish your ma. $ echo "It's alright, we told you what to dream" | ml synthesize azspeech $ ml synthesize azspeech --file=short.txt $ ml synthesize azspeech --lang=de-DE --file=short.txt $ ml synthesize azspeech --voice=fr-FR-DeniseNeural --file=short.txt
The supported languages and their locale codes (BCP-47) are listed at Azure Docs.
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.