Amazon Polly text to speech
Table of Contents
Amazon Polly is a cloud platform that converts text into speech. We have integrated it into Pugpig Bolt, allowing you to have an audio option for your articles, as a button in the timeline and in the article, which launches our native audio player.
Pricing
Please note that there are costs involved with setting up and using Amazon Polly. These are:
- A small annual cost to cover the setup, maintenance and admin around the Polly integration
- We recharge the exact costs that Amazon charges us for the conversion - note that different voice types have very different costs which can be found on this page here, Amazon Polly Pricing. It is possible to only convert a subset of your articles if required.
Please get in contact with your Customer Success Manager to discuss before getting started.
You can see your Polly spend by month in the Pugpig Distribution Service. Navigate to Account → AWS Polly
Once you've spoken to your Customer Success Manager, our support team will configure text to speech for you and you'll be able to see it on all articles.
Amazon Voices
All you'll need to do is let us know which voice you'd like to use! You can see the full list here:
https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
You can test them out here. We are happy to transcode a few articles of yours for you so that you can see just how good you think it is. If at any time you'd like to change the voice, you can. Old content will keep the voice it was configured with at the time of publishing, and new content will use the new voice.
Neural Text To Speech
Amazon also provides Neural Text-to-Speech (NTTS), which we support. This is about 4 times the cost - let us know if you want this enabled.
Long Form Voices
Amazon also provides Long Form Voices, which are in Beta for us. This is about 25 times the cost!
Lexicons
We support Polly Lexicons. These should be provided as complete Lexicon files to our support team, who can upload them for you.
SSML and Newscaster
Currently we do not support Speech Synthesis Markup Language (SSML) which means we cannot enable domains such as Newscaster. If you are interested in using this, drop a mail to support and we will consider adding it to our roadmap.
Excluding markup element from narration
You are able to exclude certain types of content from the audio version of articles. This is possible according to specific HTML tags, for example you could exclude all blockquotes, or all figures (or both!). This can currently only be done across all content, so if you were to exclude the blockquote content type, that would be excluded for all articles, in all timelines.
Control which articles are narrated
In Distribution create_page_audio can be set to always or never. If always, Distribution will always create the narration audio except when origin has the custom category audio_creation set to ‘never’.
If content is RSS feed driven, we can use the RSS key pugpig_post_audio_creation_never on a per-article level - this should be included as a new element per article in your feed(s). The values to send for this key are 0 (false) or 1(true).
We can also explicitly set this key in the backend mappings on an RSS feed level to exclude e.g any articles from the Sports feed from having audio generated.
This will add the narrated audio to cards. To also enable it in content active the Pugpig - Text to Speech plugin.
Note
In order to use text to speech, you cannot have strong security turned on. This is a feature that blocks sharing any app URLs (which would include the audio mp3 URLs used for text to speech) and won't be turned on unless you've asked us to do so.
Frequently Asked Questions
Can you choose the voice per story?
At the moment we use a single voice for all stories on your Bolt app and it's not possible to choose a voice per story. We have made a note of this idea as a product team and may consider this for development in the future.
How long does the Polly conversion take? And does this delay the story going live in the app?
It takes on average 3 seconds for the average article to finish converting, under load this could be more like 10 seconds.
This small time for conversion will never delay a story going live in the app, the story will always go live straight away, the audio will then be available later once the conversion has been completed. We actually send the article files for conversion at the same time the feed is processing, so you could have it that the audio is ready even before the feed has finished processing!
Can I listen to stories offline?
Yes! Like any other audio file, from the audio player you can download and save any article's audio and then play them offline later.
What happens to the audio when an article is updated?
If article text is updated after publish, the audio file will also update and be reprocessed to reflect the change. Note that this will only happen when the article text has been edited i.e. the audio file would not update if the updated date changes.