«

»

Apr
19

PhoneBlogger

PhoneBlogger was mentioned in another blog a few days ago, so while I had some free time today, I thought I’d look into it. PhoneBlogger has all the components one needs to set up a self-hosted (and free) version of an Audblog-like service. Basically, it allows one to call a telephone number, enter some basic information, and then record a message which is then posted via XML-RPC to a blog.

The first step to installing this software is to get a developer account at TellMe, a VoiceXML provider. The account is free, and takes mere minutes to set up.

After that, if not already installed on your server/system, you must install SoX – “the swiss army knife of sound processing programs” – and LAME, an MP3 encoder.

After installing SoX and the LAME encoder, I set about trying to get the Python scripts working. As is typical of my luck with Python, some things didn’t work initially, but I finally managed to hack in some (very minor) changes which allowed them to work in my setup. (One day I’ll spend the time to learn Python… it seems pretty straightforward after looking at the code today).

The only thing I haven’t yet figured out – and this is a recurrent problem due to the way my site is laid out – is how to get it to post the category. I can handle that from Perl so my E-mail to blog script works, but I have no idea as to where to begin in this Python script. It would be nice if the category were part of the standard API, rather than having to make use of the extended API. Ah well…

Anyway, many thanks to Robert over at Wombat Nation for the great software.

Post Scriptum:

If you are having problems with SoX returning invalid option errors in your error_log, or with LAME spewing too much information, you might try the following patch. There may be a better solution, but this works for me: AudioUp.py Patch.

Oh, and while I was working on it, I also decided that I wanted my audio files to be in a folder directly under the DocumentRoot. If you leave the blogRoot parameter blank in the Blogs.xml file, it generates several errors. Using a single ‘/’ also creates problems, as the HTML link to the audio file was then prefaced by three (3) ‘/’s, leading to a File Not Found error. If you want your files under the doc root, i.e. http://www.domain.com/mp3, etc, you can try this patch: PhoneBloggerPostAudioToBlog.py Patch.

Both patches are designed for PhoneBlogger version 0.2.

UPDATE 2004-04-20 18:26 EDT

As several of my blogs use Categories in the layout and for archive reasons, I have added code to that published by Robert which enables the use of a (currently one) default category for audio postings. This works for my situation, but beyond that I can make no guarantees.

To use this, simply patch the relevant files and add a default category entry to your Blogs.xml file:

    <defaultCategory>_category_id_</defaultCategory>

Show Phone Blogger Category Patch File – [ Download ]