Text-to-Speech

aws polly start-speech-synthesis-task --region eu-central-1 --profile ${AWS_PROFILE_NAME} --engine neural --output-format mp3 --voice-id Amy --text file://input.txt --output-s3-bucket-name ${BUCKET_NAME}

or, for 'Long-form' TTS,

aws polly start-speech-synthesis-task --region us-east-1 --profile ${AWS_PROFILE_NAME} --engine long-form --output-format mp3 --voice-id Ruth --text file://input.txt --output-s3-bucket-name ${BUCKET_NAME}

An example mark-up, as per https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html#lang-tag is:

$ aws polly start-speech-synthesis-task --region us-east-1 --profile ${AWS_PROFILE_NAME} --engine long-form  --text-type ssml --output-format mp3 --voice-id Ruth --output-s3-bucket-name ${BUCKET_NAME} --text '<speak>His name forgotten and ignored by modernists, the life and work of Baron <lang xml:lang="de-DE">Karl von Reichenbach</lang> stands as a monument. He is a true scientific legend, a giant, a reminder that the world is more marvelous than we are led to believe by those who misalign our perceptions and misdirect our views. It is for this reason that I have chosen to begin the LOST SCIENCE series with his biography. Our story begins in the Kingdom of <lang xml:lang="de-DE">Wurttemberg</lang>. Born in <lang xml:lang="de-DE">Stuttgart</lang> (1788), <lang xml:lang="de-DE">Karl von Reichenbach</lang> became a laudable personage of great scientific stature. Known for his humility and deep sensitivity, the enormous scientific contributions made by him in European industry and research are legendary.</speak>'

The rendering of the above is:

  • Last modified: 2024-01-18 16:02
  • by Peter