Configure the Amazon Polly Text to Speech Converter

Amazon Polly is a cloud service that converts text into spoken audio.

To configure the Amazon Polly as the text-to-speech converter used by the Real Voice plugin, proceed as follows:

  1. Visit the Real Voice -> Options menu
  2.  Proceed to the Text-to-Speech tab
  3.  In the Text-to-speech Converter option, select Amazon Polly. This option is available in the General section.
  4.  Click Save Settings

To use this text-to-speech converter, you must also configure the credentials used to identify your API requests. You can configure the credentials with the following procedure:

  1. Visit the Real Voice -> Options menu
  2.  Proceed to the Text-to-Speech tab
  3.  Enter the Access Key ID of the AWS user in the Access Key ID option available in the Amazon Polly section
  4.  Enter the Secret Access Key of the AWS user in the Secret Access Key option available in the Amazon Polly section
  5.  Click Save Settings

The plugin provides you additional options to configure your use of the Amazon Polly cloud service. These options are available in the Amazon Polly section of the Text-to-Speech tab:

  • Region – The AWS region used to create the audio files.
  •  Voice ID – The Amazon Polly voice Name/ID used to speak the utterance.
  •  Engine – Whether to use the standard or neural engine of Amazon Polly.
  •  Language – Enter a language code supported by Amazon Polly.
  •  Lexicon Names – List one or more pronunciation lexicon names you want the service to apply during synthesis.
  •  Output Format – The format in which the returned output will be encoded. The available options are mp3 or ogg_vorbis.
  •  Sample Rate – The audio frequency specified in Hz.
  •  Text Type – Specifies whether the input text is plain text or SSML.

Character limits

Amazon Polly has a 3000 billed characters (6000 total characters) limit for the text or SSML content used as the input. Consequently, we recommend using the alternative text-to-speech converters included in the plugin for long articles.

You should note that if you submit a document that exceeds the limits, Amazon Polly responds with this message:

Maximum text length has been exceeded

For more information, please see this document:

https://docs.aws.amazon.com/polly/latest/dg/limits.html

Requirements

Using the Amazon Polly cloud service requires at least PHP 8.1 due to the requirements of the used AWS SDK for PHP.