

It's there, but it's a C module, not python.

I apologize for the awful lack of documentation; it'll come eventually.
I will ask that you keep a bit of a log and write me something that I can
post on the web site to help other people.    At least a few paragraphs of
notes.

So, that being said, the most current code is available from
http://sourceforge.net/projects/speechresearch, which is
the "speechresearch" project.  If you download it via subversion (svn),
you'll get the current code.      If that's a problem, I'm happy to send you a
tar file.

Assuming you have that version of the code, it forms a directory tree

speechresearch/gmisclib/something.py
                                       /...
                         /voicing/emphasis_stevens.py
                                     /...
                         /gpklib/...
                         /gpkio/...
                         /gpk_img_py/...

You presumably found speechresearch/voicing/emphasis_stevens.py,
which is the python code to compute the "loudness".
(That's really the "specific loudness": in Zwicker (1977) terminology,
it is the sum of all the specific loudnesses in all the frequency bands.
The percieved loudness is really the average of the specific loudness
over approximately a 250ms interval.)

Now, the code for gpk_img is in gpk_img_py,
but *that* code depends on the gpkio library which depends
on the gpklib library.

So, go to gpklib, and look at the README file.
gpkieee754.c and gpkieee754.h describe what kind of floating
point you have and (if necessary) define functions for handling
Not-A-Number and Infinity.

Normally, you can just copy one of the supplied versions into
those positions.

"make.inc" is the part of the makefile that varies from one
computer to another.    Normally, you can just take one of
the available versions, and possibly modify it.

The CRITICAL thing is that you need to make "BASE" in make.inc
point to the place where the library will be installed.
Libraries will go into $BASE/lib and include files into $BASE/include.
Possibly, you may want to fiddle with the compiler flags
or (less likely) other things.

Then, you "make" and "make install".


Linux:    
    cp make.Linux.inc make.inc
    cp gpkieee754_Linux.c gpkieee754.c
    cp gpkieee754_Linux.h gpkieee754.h
    make
    make install


Then, go to gpkio and look at the README file.
You MUST edit the makefile to make GPKLIB_ROOT point to the place
where gpklib is installed.   $(GPKLIB_ROOT)/lib must be the directories
where the libraries are, and $(GPKLIB_ROOT)/include must contain
the include files.

then make and "make install".


Now, you need the "numpy" module.   That's a standard numeric package
that's easy to find.  Install it (with full headers).

Next, go to  gpk_img_python and run
python setup.py install
(and maybe give it a --prefix=somewhere flag to have it install
in the correct place.)   If your python has a complete development
version with all the header files and such, there should be no trouble.
(Most modern linux distributions have a "python-dev" package for this
purpose.)

At this point, you should be able to do this:

python
>>>import gpkimgclass
>>>
and have it succeed.     The rest is easy.


By the way, some documentation on the python is available at
http://kochanski.org/gpk/code/speechresearch
