The Festival Speech Synthesis System with MPlayer output

This post is about setting up the Festival Speech Synthesis System to output speech through MPlayer playback. This is necessary if the built-in output modules, like ALSA or linux16audio, do not work for you. This can also help to increase the quality and performance of the synthesized audio. (For Slackware Linux, for instance, MPlayer is the best already-installed option.) Once you have built Speech Tools and Festival following the instructions in the INSTALL files, you can specify MPlayer for output in your ~/.festivalrc file by adding the following lines:

(Parameter.set 'Audio_Command "mplayer -really-quiet -noconsolecontrols -nojoystick -nolirc -nomouseinput -demuxer rawaudio -rawaudio channels=1:rate=$SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)

Leave a Comment

Filed under #!, Slackware

University of Toronto email on the Android email client

This post will provide you with quick and dirty instructions for setting up the Android email client (simply called “Email” in your App Launcher) with your University of Toronto email account. Ready?

1. Fire up the Android Email client app.
2. Press the Menu button on your Android device.
3. Choose “Add Account”.
4. Fill in your full email address (john.doe@utoronto.ca) and current password.
5. Choose the “Manual Setup” button (it will become available after you have filled in your email and password).
6. Pick an IMAP account.
7. For your username, do not use your email address. Use the username for portal login instead, without specifying a domain (so just “doejhon” and *not* “jhon.doe@utoronto.ca” !)
8. To fill in the “server” field, get the address of the mailserver hosting your account from your UTor ID Information Page ( https://www.utorid.utoronto.ca/cgi-bin/utorid/info.pl ). It will appear as “mailbox###.utcc.utoronto.ca” and different mailboxes reside on different servers. We need to know yours.
9. Choose SSL for encryption.
10. Choose port 993 (if it was not chosen automatically).
11. Click “Next”.
12. Use same username/password as for incoming mail in step #7.
13. Enter the SMTP server as “smtp.utoronto.ca”.
14. Choose TLS encryption.
15. Choose port 587.

You are done. Faculty spam (along with the odd useful message) will now begin flowing to and from your Android device!

5 Comments

Filed under #!

Making an Ethernet Loopback Adapder

This post will be short (and sweet). Ethernet Loopback Adapters are little handy pieces of equipment that route the transmitting pins in an Ethernet jack back to the receiving pins in the same jack. This is good for testing link connectivity on an Ethernet card – if the adapter can establish a link with itself the hardware on the adapter is probably OK. In real life, this can save you hassle quickly testing ADSL modems, routers, switches, desktops and laptops without plugging the device into another jack to get the link light to come on.

This how-to will use an existing Ethernet cable which will be converted to a Loopback cable.  There are lots of guides and video online about creating such an adapter using an Ethernet jack and wires, but this requires having an uncrimped  Ethernet jack, some wires, and a crimper. In my case, a trip to the store to buy the components I already have at home on ready Ethernet cables seemed wasteful (most people will have a cable or two, or can buy a short cat 5 cable for under 2 dollars). I strongly recommend using a cable with a broken or missing jack – after all, we only need one Ethernet jack which is properly wired to a cat5 or higher cable.

1. Cut the cat5 cable a few ( 2 or 3 ) inches from the jack.

2. Strip about an inch from the shielding of the cat 5 cable, revealing 8 separately shielded color coded wires inside.

3. Strip about half an inch from the shielding on four wires: green-white, green, orange-white, and orange.

4. Twist the green-white and orange-white stripped ends together, connecting pin 1 to pin 3.

5. Twist the green and orange stripped ends together, connecting pin 2 to pin 6.

If you have some tape, you may want to cover the tips up. Otherwise, make sure the tips don’t touch each other. The end result will look like this:

twisted pairs on an Ethernet loopback adapter

twisted pairs on an Ethernet loopback adapter

You can test your new loopback adapter in any working Ethernet jack by plugging it in!

You can see the Port line is on for a wireless router with the loopback adapter plugged in:

Link light on with loopback adaper plugged in

Link light on with loopback adaper plugged in

Leave a Comment

Filed under #!

Virtual Appliance with Debian Squeeze and OpenWRT-XBurst Development Tools for Qi Hardware’s Ben Nanonote

This post is about a Virtual Appliance with Debian Squeeze and OpenWRT-XBurst Development Tools installed, which would allow immediately compiling OpenWRT packages for the Nanonote without going through the painful process of setting up the development environment yourself.

As a non-developer, I found a working development environment to be the single most confusing part of porting to the Nanonote, even more confusing than OpenWRT’s Makefiles. Granted, this could be my personal lack of talent or skill, but it left me thinking removing this “steppingstone” for some of the less experienced users might open more doors, faster, for beginning Nanonote enthusiasts. The instructions at http://en.qi-hardware.com/wiki/Building_OpenWRT_on_Debian_6 are great, but might slightly intimidate less experienced Linux users. They are also slightly daunting to follow if the need arises frequently (if reinstalling OS, royally screwed something up, or other scenarios I’m sure you ran into).

The easiest way to get around this I could come up with was creating a Virtual Appliance which contains the basics for compiling for the Nanonote, using the wiki instructions for Debian Squeeze. Such an appliance can be run in VirtualBox (free and open source) or VMWare Player (free as in beer), even on Windows hosts. The result is a single 2.4 GB file with a ready toolchain which is ready to “accept” package Makefiles and compile them. Debian was installed, the toolchain was compiled, the locales and paths were set. I gave it a quick test compiling Pem (and a load of Perl dependencies) and it seemed to work.

The Virtual Appliance is currently unimaginatively called “Debian Squeeze with OpenWRT-XBurst Development Tools 2011-08-27″ and comes as a single .OVA file. See details below:

Instructions
1. Install VirtualBox.
2. Download Virtual Appliance .OVA file (links below)
3. In VirtualBox click on “Machine” > “Import” and select the .OVA file.

I’ve added a brief section under the Building on … Debian Squeeze wiki page.

Hope someone finds this helpful.

2011-08-27 Release:

Virtual Appliance Download Page on 1fichier.com:  http://4pp1qh.1fichier.com/en/
.OVA file MD5 sum:  3ad6e2aa9379336c10746a3062538d32
user:  build
password:  gongshow
root password:  gongshow
QR Image:

2011-02-23 Release:

Virtual Appliance Download Page on 1fichier.com:  http://0tqstz.1fichier.com/en/
.OVA file MD5 sum:  f9ebe1b0cfe63ae1aa584ddff7b222ed
user:  build
password:  gongshow
root password:  gongshow
QR Image:

http://www.1fichier.com/qr/0/0tqstz.png

– Ernest Kugel

1 Comment

Filed under Ben Nanonote

Monitoring Amazon EC2 instances and other Cloud Resources with Hyperic HQ (and other monitoring platforms)

I’ve had to tackle this task recently and could not find a write-up. Nice folks from Hyperic, and others on Twitter, suggested OpenVPN or an SSH tunnel. I opted for the second option, and after setting up two tunnels and properly configuring the agent, I now have an Amazon EC2 Windows instance show up as a platform in my Dashboard. Note that those instructions will work for other software (Zabbix comes to mind). Here’s how you can have yours too:

1. Install an SSH server on the to-be-monitored cloud instance. For Linux, OpenSSH is easy to install and setup, and usually already comes with most distributions. All you have to do is create a user and a password, or keys. On Windows, CopSSH will do the trick – you just have to add a new user and configure it through the CopSSH control panel. Make sure the SSH server runs, and the login credentials work.

2. Install an SSH client on your Hyperic HQ server. For Linux, again, OpenSSH will do the trick and is most likely already there. For Windows, try CygWIN or PUTTY.

3. Designate a unique name for localhost in the hosts file of both the Hyperic server and the cloud instance. In Linux, it would be under /etc/hosts. In windows, it moves between versions but is usually under C:\Windows\system32\drivers\etc\hosts . Call it cloudagent1. The line should look like this:

127.0.0.1     localhost cloudagent1

4. From the Hyperic server, initiate an SSH tunnel which forwards two ports. First from the cloud instance to the Hyperic server (usually on port 7443). Second from the Hyperic server to the cloud instance, to the port on which the Hyperic agent runs. If you already have a Hyperic agent on your Hyperic server, you MUST use a different port. As the local agent usually runs on port 2144, you may want to pick something like port 22144. With OpenSSH on CygWin and Linux you can create the tunnels like this (assuming your username is “user” and your cloud instance is “cloud-instance.com”):

$ ssh user@cloud-instance.com -R 7443:cloudagent1:7443 -L 22144:cloudagent1:22144 -N -f

5. Configure the Hyperic agent on your cloud instance to use port 22144. The rest of the settings can be copied from your locally monitored agents. You can use “cloudagent1″ (or whichever name you have assigned to the localhost) in the configuration.

Hope this helped!

1 Comment

Filed under #!

Make your PC link the Ben to the Internet, Automagically!

A familiar pain for Ben Nanonote users is connecting the Ben online every-time they plug it in. udev can remove this pain with a simple rule to run all the commands on the host the Ben is connected to when its connected. To get this done, you will need 2 pieces: a udev rule, and a script.

Your udev rule can be a file under  /etc/udev/rules.d/ . I called mine “72-BenNanoNnote-net.rules”

It’s content should look like this:

SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0525", ATTR{idProduct}=="a4a1", RUN+="/usr/local/bin/ben-net.sh"
# where RUN+= points to your script

The script should look like this, and can feel comfortable under /usr/local/bin :

#!/bin/bash
GATEWAY_IF=ppp0
if (/usr/bin/lsusb -t -d "0525:a4a1"); then
        echo .
        echo "Ben NanoNote found, setting up USB network ... "
        if !( /sbin/lsmod | grep 'ip_tables' ) && ( /sbin/modprobe -l ip_tables ); then
                /sbin/modprobe ip_tables
                echo "ip_tables is now loaded"
        else
                echo "ip_tables already loaded"
        fi
        if ( grep '0' /proc/sys/net/ipv4/ip_forward ); then
                echo "1" > /proc/sys/net/ipv4/ip_forward
                echo "IP forwarding is now enabled"
        else
                echo "IP forwarding already enabled"
        fi
        if !( /usr/sbin/iptables -L | grep $GATEWAY_IF ); then
                /usr/sbin/iptables -t nat -A POSTROUTING -o $GATEWAY_IF -j MASQUERADE
                echo "Routing is now enabled"
        else
                echo "Routing already setup on "$GATEWAY_IF
        fi
        /sbin/ifconfig usb0 192.168.254.100 netmask 255.255.255.0
fi
# where GATEWAY_IF is the interface that is connected to your LAN or the Internet.

Leave a Comment

Filed under Ben Nanonote

GNU Pem on the Ben NanoNote

image

image

image

Pem, the personal expenses manager, was ported to the NanoNote and feels at home!

Leave a Comment

Filed under Ben Nanonote