Archive

Archive for the ‘Code’ Category

Exclusive podcast to Xoke.org (or something)

May 12th, 2010 Xoke No comments

Well when I post this it IS exclusive to xoke.org, but that word is overused in radio.  As it is under a CC license (see bottom of page for the license) you can put it elsewhere if you wanted to!

I was trying out my new script (see the new scripts section for it) and recorded this in about 5 minutes.  It’s an ogg format, and I ad-libbed it on the fly so I say ‘um’ a lot.  But I explain the new script and my thoughts on it.

I was going to upload the speex format, but wordpress complained about security.  Anyway here is the Ogg file.

Categories: Code Tags:

I need to get back into podcasting [Updated]

May 11th, 2010 Xoke 2 comments

However I need to find a different way of doing it.  I spent way to much time on those.  I was spending several hours writing out what I would say, then recording it, then editing (about 3 times the length of the episode) and any bits I needed to re-record because I stumbled over a word or whatever, then encoding them and listening again to make sure it all worked well.

Basically I was spending around 7/8 hours for each 30 minute podcast.  And the python series was taking even longer as I was learning the python first and writing the code then writing the script etc.

So when I got my job, I suddenly had no free time and I dropped off the podcasting scene.  Even more when I was working Sunday mornings at 5 am which meant I couldn’t do cranks on Saturday night.

I really need to get back into podcasting and am attempting to streamline the process.  First up I think I will ad-lib the episodes a lot more, as that was a lot of the time gone writing the episodes.  To this end, I am writing a little bash script which, whilst being rather sucky so far, has potential:

** Updated ** Permalink to the script:

Categories: Code Tags:

Too Many Podcasts, Too Little Time…

September 28th, 2009 Xoke 3 comments

No I don’t want to stop listening to some of my podcasts, but seriously TLLTs takes forever to catch up on!

So I’ve been reading up on / talking to people about speeding up the playback of podcasts.  You can play them through mplayer (CLI version) and press ] to increase the speed, but the people end up sounding like chipmunks.  Whilst this may be an improvement for Dann, other people sound terrible this way.

SoX is a cool command that will sort this out for you.  You can increase the ‘tempo’ without adjusting the pitch.  I want to have a script to amend this that can be called after bashpodder so it’s a one-stop-shop to fix everything.

To install SoX (and let it handle MP3 files):

sudo apt-get install sox libsox-fmt-mp3

So far I have:

#!/bin/bash
##################################################
#
#                       LICENSE
#
##################################################
#
# Xoke's Speed Increase script for Podcasts
# Copyright (C) 2009 Xoke
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details <http://www.gnu.org/licenses/>.

# I added a bit of a version control section here to mark any changes to the code
##################################################
#
#                       Versions
#
##################################################
#
# Ver    Date            Author        Description
# ------------------------------------------------------------------------------------
# 0.1        Sep 2009    Xoke        Initial Version

# Increase tempo of podcasts for today
#    Issues:
#        Assumes bashpodder is running
#        Probably has issues being run twice in one day
#        Doesn't tidy up after itself
#        mp3s become *.mp3.ogg

# Make script crontab friendly:
cd $(dirname $0)

# Speed Increase - change this to change
# the speed.
incspeedby=1.5

# datadir is the directory you want podcasts saved to:
datadir=$(date +%Y-%m-%d)

# Move into directory
cd $datadir

# Find all the MP3s
list=`ls *.mp3`
for currfile in $list
do
 echo $currfile
 # Process them
 sox $currfile z$currfile.ogg tempo $incspeedby
done

# Find all the OGGs
list=`ls *.ogg`
for currfile in $list
do
 echo $currfile
 # Process them
 sox $currfile z$currfile tempo $incspeedby
done

This will go into the current date directory, as per bashpodder.  This means if you run it twice in one day it will have problems as it will try to increase the tempo of the files already increased… which will be a problem.  It will convert mp3 files to ogg as the Jaunty version of SoX does not come with MP3 export capabilities.  This means HPR069.mp3 becomes zHPR069.mp3.ogg which is a little annoying, but not a huge problem.  The files all get a ‘z’ appended to the front, as I didn’t want to delete the old files without testing this on a lot of different files!  The next version (after lots of testing) will remove the old files and tidy things up!  Also this takes a while to run to convert files.

If you think 1.5x speed is too fast (or too slow if you’re Kajarii!) then you can change the incspeedby variable to change both mp3 and ogg.

Apart from that, I posted it here and not under ‘tips’ so everyone on the planet can look and let me know if I’m missing something, or if there is a better way of doing it.  I did google however most people are converting the MP3s to WAV files to increase the tempo and then recompress them!

Categories: Code, Creative Commons, Podcasts Tags:

Switch to our mobile site