Text To Speech (TTS) command-line tool, powered by Azure Cognitive Services.
- Azure subscription.
- Create a Speech resource in the Azure portal.
- Get the Speech resource key and region.
Add the environment variables
export SPEECH_KEY=your-key
export SPEECH_REGION=your-region
Run the command to synthesize speech from your txt
file, and save speech to mp3
.
langdu sample.txt output.mp3
Follow this format in your input txt
file to synthesize a dialog-style speech with different voices with multilingual support.
# sample.txt
[en-US-ElizabethNeural] What do you do?
^^^^^^^^^^^^^^^^^^^^^^^
[en-US-JasonNeural] What do I do? System architecture.
^^^^^^^^^^^^^^^^^^^
|
Any supported voice identifier