Voice Blogging with Twilio & WordPress
Time to read: 3 minutes
The source code is open sourced, so you can download it or visit the github repository. All you’ll need to run it is a server with php, and a free Twilio account to use our Programmable Voice API.
As the author of “Blogs Are Wrong” says:
I thought it would be cool to make a system that lets me blog from my
cell phone. And so I started stitching it together. Seven hours
later, the sun was up, and I had worked out a system where I call a
special phone number and I get a prompt. I speak into the phone, just
like I’m leaving a message, and the system records my speech as a sound
file and then processes it to turn the speech into text. It then puts
together a post to my blog with a link to the sound file and the
transcription below. It’s not a substitute for carefully written
essays, but if you want to record and share a quick (I limit it to 2
1/2 minutes) thought with the world, it’s a pretty easy way to go about
it.
Getting Started with Twilio for WordPress
Not into scouring README files to understand what it will take to get code up and running? That’s okay. Here’s a rundown of how to get started:
- * make sure you have a server that runs PHP
- * create a Twilio account – the free trial gives you a $30 credit
- * upload the code to your server, and put it in a directory that’s accessible online (so Twilio can reach it)
- * edit remotePost.class.php – Change the $wpURL variable to the URL of your wordpress blog, but keep the ‘xmlrpc.php’ ending.
-
* edit remotePost.class.php – Change the $uname variable to the name of a user for your blog, and the $pass variable to that user’s password.
- * this is optional, but you can change the the image displayed on your blog for voice posts by opening up voicepost.php and replacing the image URL in the following line
$body .= “”>
Configuring Your Twilio Account
That’s it! There’s just one last thing you need to do:Log in to twilio.com and, on the account dashboard page, scroll abouthalfway down. There’s a box labeled ‘Your Trial Sandbox,’ and in thatbox, there’s a phone number, a PIN, and a field labeled ‘USES URL’In that field, put the web address of the directory you placed thesefiles in, with ‘makerecording.php’ tacked on to the end (i.e.http://www.myserver.com/mydirectory/makerecording.php)sweet! Now just call the phone numbe on your account page (it’sprobably 866.853.6913) and enter the PIN code from your account page.The software will prompt you to talk. Hang up whenever you’re done,and the blog post will appear in a minute or two on your site.Hooray!
Get Your App on the Twilio Blog
Building something with Twilio that you’d like us to share with the world? Drop us a line at help@twilio.com so we can get your creation on our blog.
Photo credit:
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.