Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

148 lines (123 sloc) 6.56 KB
Mr. Voice
by H. Wade Minter
This program was written with a very specific purpose in mind - to be the
GUI frontend for an MP3 database I designed for the Great American
Comedy Company in Raleigh, NC. As such, it may not be much use for anyone
else, but I figured I'd put it out there in case anyone wanted it.
* Unix-like operating system (Linux/*BSD/etc.). May possibly work
under Windows or Mac, but I haven't tested it.
* Perl 5
REQUIRED PERL MODULES (tested versions in parentheses)
Get them from
+ DBI (DBI-1.14)
+ DBD driver for your database (Msql-Mysql-modules-1.2215)
+ Data-Dumper (Data-Dumper-2.101)
+ TK (Tk800.022)
+ MPEG-MP3Info (MPEG-MP3Info-0.71)
* Relational database, with available perl DBI module (Tested with MySQL)
If you use something other than MySQL, you'll need to do some
* xmms, or other MP3 player that plays songs from the command line.
* class.id3.php ( if you're using the PHP
1) Compile and install any required software from above (perl modules, etc.)
2) Set up a database for the program to use. It needs two tables in a
database, so you can either use an existing database or create one
expressly for mrvoice.
3) Run the following MySQL command, where DATABASE_USER is the name of
a user with administrative access over the database named DATABASE_NAME:
mysql -u DATABASE_USER -p DATABASE < dbinit.sql
For other databases (Postgres, etc.), adjust to taste.
This creates two tables in DATABASE_NAME: mrvoice and categories.
4) If you will be using the PHP frontends, install class.id3.php3
(available from the URL above) into your PHP include path.
5) If you will be using the PHP frontends, copy the .php files into
their own directory in your web tree. The index.php file uses
relative URLs, so if they're all together in the same directory,
they'll work fine.
The following configuration settings can/should be adjusted in the
file itself:
First, make sure that the first line of the file points to your perl binary.
It is set up by default to look for /usr/bin/perl.
The following variables need to be altered to reflect your setup:
$db_name - This should be set to the name of the database containing the
mrvoice and categories tables. If the database is local to the
machine that you are running mrvoice on, you simply need to supply
the database name. If it is on a remote server, the variable
$db_username - Set to a username that has SELECT access on the tables.
$db_pass - The password for user $db_username
$mp3player - The path to your MP3 player. Set to /usr/bin/xmms by default.
$category - The default category to search. Set to "Any" by default, a
meta-category that means, shockingly enough, any category. Must
match a category code set up in the categories database, or "Any".
$filepath - The path information that will be prepended to the filename
retrieved from the database. Used to find the actual MP3 files
on the local system. If a directory, it MUST contain a trailing
"/". (ie. "/usr/local/mp3/" is valid, but "/usr/local/mp3"
is not).
To configure the PHP frontends, edit the file config.php. It sets
configuration variables for the frontend scripts.
If you get an error when you access one of the frontend scripts about
config.php not being in the include path, you either need to edit
your php.ini file so that directory "." in in the include path, or copy
config.php to a directory in the include path.
Before you can use mrvoice, you must populate two tables in the database.
The first is the categories table, the second is the mrvoice table itself.
The categories table has two fields: the "code" field and the "description"
field. To populate it, use the mysql tool to log into the database
that contains the categories table, and run:
"INSERT INTO categories VALUES ('CODE','The description of the code');"
where CODE is an 8-letter-or-less code, and the description is the more
verbose description. For example, if I had a category for general games
stuff, I may use:
"INSERT INTO categories VALUES ('GAMES','General Games');"
Note that the description is what you will actually see in all of the
frontends, so don't make it too long.
If you are using the PHP frontend, all of this is done for you in the
For the mrvoice table, there are the following fields:
id - An auto-increment field that will contain a unique number for the entry.
title - The title of the entry
artist - Performing artist of the entry
category - A category that matches a CODE entry in the categories table.
info - Extra info for the entry.
filename - The filename of the MP3. Must match what you have on disk.
modtime - Records the last time the database information for this entry
was modified.
If you're using the PHP frontend to add songs, all of this will be done
for you in the background. If you're doing this the manual way, you'll
need to make sure that the information is correct. A typical manual entry
will look like this:
"INSERT INTO mrvoice VALUES (0,'Fly South','Eddie From Ohio','GAMES','',
The 0 in the first field tells the database to assign the next free number
for ID, and the NULL at the end says to update the timestamp with the
current time.
After you've done all of the above, it's time to run the program! Make
sure that the program has execute permissions, and run it.
If all has gone well, you should see the mrvoice window, along with
XMMS (or your MP3 player of choice). Congratulations!
If you like this program, and know of a way to make it better, feel free
to modify it. This software is released under the GNU General Public
License, so read the COPYING file or visit for
information on license conditions.
If you make a cool modification to this program, feel free to send a diff
to me, and I'll incorporate it into the main body of the program.
Feel free to report any bugs, feature requests, etc. to me at As this is a specific-purpose project, there's no
guarantee that I'll do it, but I'm glad to listen to any suggestions. Check
the TODO file to see stuff I'm currently working on.
CVS ID: $Id: README,v 1.6 2001/02/25 23:07:28 minter Exp $
Jump to Line
Something went wrong with that request. Please try again.