Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr2039 :: Blather Configuration Part 0: Initial Setup

In this episode I walk you through the process of getting blather running for the first time

<< First, < Previous, , Latest >>

Thumbnail of Jon Kulp
Hosted by Jon Kulp on 2016-05-26 is flagged as Clean and is released under a CC-BY-SA license.
blather, speech recognition, accessibility, scripting, GNU/Linux. (Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr2039

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:19:06

Accessibility.

Shows about tearing down the barriers for our fellow hackers.

In this episode I walk you through the process of getting the Blather GNU/Linux speech recognition program running for the first time.

Arch: On Arch Linux this is really easy. Jezra made a package build for the AUR so you can just install it that way.

Debian: I wrote an installation script for Debian-based systems that installs the dependencies to build pocketsphinx, plus a few extra packages that I use continually when I'm running blather (xvkbd, xdotool, espeak, wmctrl, elinks, xclip, curl). It builds/installs the Sphinx stuff, pulls the blather source code, and puts some configuration files and a startup script in place for you. This should take care of pretty much all of the heavy lifting.

I refer frequently to Jezra's usage notes on the Blather source code page at gitlab, so if you're trying to install this as I talk, you might want to follow along over there.

The trickiest bit in the initial run is the creation and placement of the language files. I normally use a bash script for this, but on this first episode of the series I'm going to use the web-based lmtool to create the language files, just the way Jezra says to do on his usage page. He also includes my automated language updater script in the blather source code, though, so going forward I will be talking about how to use that script instead of the web-based tool.

Blather Launch Script

I use a bash script to launch Blather because I want to set several environmental variables: location of the pocketsphinx gstreamer libraries, default browser, default text-to-speech engine, and so forth. Having these environmental variables set means that I can use easy-to-remember shortcuts in my blather commands config file. Here is my launch script:

#!/bin/bash

# tell it where the Gstreamer libraries are
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-0.10

# set some shortcuts to use in the commands file

#export VOICE="/usr/bin/festival --tts"
export VOICE="/usr/bin/espeak"
export CONFIGDIR="/home/$(whoami)/.config/blather"
export KEYPRESS="xvkbd -xsendevent -secure -text"
export BROWSER="chromium-browser"

# add blather script directory to the user's PATH
export PATH="$HOME/bin:/home/$(whoami)/.config/blather/scripts:$PATH"

# start blather in continuous mode with the GTK GUI
# and a history of 20 recent commands

python2 /home/$(whoami)/code/blather/Blather.py -c -i g -H 20

Links

Credits


Comments

Subscribe to the comments RSS feed.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
Who is the host of this show?
What does HPR mean to you?