Read WordPress sites through Amazon Alexa devices
At the beginning of last year we announced an Amazon Polly plugin for WordPress. This plugin allows blog and website creators who are using WordPress to quickly and easily create audio versions of their posts, articles and websites. A few months later, we updated the plugin with the ability to quickly translate the content of websites to other languages using the Amazon Translate service. This functionality, together with the ability to create audio versions, allows you to voice the content of sites in translated languages. We want to allow creators and authors to reach more readers/listeners around the world using the latest AI services offered by AWS. Today we are happy to announce another extension of the plugin, which allows you to extend WordPress websites and blogs through Alexa devices. This opens new possibilities for the creators and authors of websites to reach an even broader audience. It also makes it easier for people to listen to their favorite blogs by just asking Alexa to read them! So let’s dive deep, and I’ll show you how to integrate your WordPress website with Alexa.
In addition, today we’re announcing that the official name for the plugin is changing to Amazon AI Plugin for WordPress to better reflect the broad integration with the AWS AI ecosystem.
The following diagram presents the flow of interactions and components that are required to expose your website through Alexa.
Let’s step through the process that we are going to implement:
- The user invokes a new Alexa skill, for example by saying: Alexa, ask Demo Blog for the latest update.
- The skill itself is created using one of the Alexa Skill Blueprints. This allows you to expose your skill through Alexa devices even if you don’t have deep technical knowledge.
- The Alexa skill analyzes the call and RSS feed that was generated by the Amazon AI plugin for WordPress, and then returns the link to the audio version of the latest article.
- Based on the link provided by the feed, Alexa reads the article by playing the audio file saved on Amazon S3.
The diagram illustrates that AWS services, such as Amazon Polly and Amazon Translate, are used by the WordPress plugin to generate audio versions.
So let’s go into details, and let’s expose our site using Alexa! We won’t be describing the process of installing the plugin on your WordPress website in this blog post. You can read about it in this post, or follow the instructions that are provided on the WordPress plugin website. In general, it should take just around 15 minutes to do this phase. Remember that after enabling the plugin, you should enable the text-to-speech functionality and Amazon Pollycast functionality – which will then generate an RSS feed on your WordPress site which we will be consuming in next phase. Enable Amazon S3 as the default storage for your files. It’s important that your website uses a secure HTTPS connection to expose its feed to Alexa.
After completing these steps, you should note the Amazon Pollycast link that is displayed on the podcast tab of the plugin.
If you open the feed link you should be able to see information about the posts you have published.
The next step is to create an actual skill. As I have already mentioned before, it will be really easy, because we will be using existing Alexa Skill Blueprints. Open the Alexa Skill Blueprints page, and look for the Blog blueprint.
After you find it, choose Make Your Own. After this a three-step wizard opens, which will allow you to create your skill. On the first page provide the link to your RSS feed that you have copied before, and then choose Next: Experience.
Next, you could customize your skill. For this blog post, we’ll leave it as it is, and choose Next: Name.
The next step is choosing the right name for your skill. This is the name that will be used by your readers/listeners to activate the skill and ask Alexa to read a new article. In my example I will use the name Demo Blog. Next, choose Next: Create Skill.
It will take a couple of minutes for the skill to be created, you can grab a quick coffee meanwhile.
Now, when you click the Skills you’ve made link on the top of the page, you should see your own Alexa Skill. Congratulations!
The following short video presents what the solution should look like:
Conclusion
At this stage, your skill is only available from devices that are registered on the Amazon account which you have used to build your skill. The next step would be to publish it as an official skill on the skill store. To do this, open the details page of your skill, where you will find a Publish to Skill Store button. Just follow those instructions.
You can review the process of publishing the skill in this video:
When you are finished, you’ll be able to announce the world that your website is available on Alexa! Congratulations!
About the Author
Tomasz Stachlewski is a Solutions Architect at AWS, where he helps companies of all sizes (from startups to enterprises) in their cloud journey. He is a big believer in innovative technology, such as serverless architecture, which allows companies to accelerate their digital transformation.