Module emphasis_stevens
[frames] | no frames]

Module emphasis_stevens

source code

Perceptual loudness measurement. This is an implementation of "Percieved Level of Noise by Mark VII and Decibels (E)" S. S. Stevens, J. Acoustical Soc. Am. v. 51(2, part 2) 1972 pages 575-602.

The algorithm matches the paper for FractOct==ThirdOct or OneOct. The algorithm assumes that the level defined by SIXTY_EIGHT corresponds to 68dB relative to 20 micro-Newtons per square meter sound pressure.

USER INFORMATION:

You'll find, somewhere, a subdirectory named speechresearch/voicing . Within this is a script called emphasis_stevens.py . This can be run as python emphasis_stevens.py -o outputfile -write BITPIX=0 -c channelnumber inputfile (there are a couple of other flags, too).

It will then read the input file (which is an audio recording) and produce a time-series of the loudness. Data input and output is via the gpkio library, in .../speechresearch/gpkio. That library has many virtues, but reading WAV files is not one of them, so you have to convert .wav files to the "GPK ASCII image" format (or one of several other formats), using .../speechresearch/lib/wavio.py .

The output will be in an ASCII version of the format, which should be reasonably intelligible. (The GPK ASCII image format is based on the FITS astronomy format from NASA.)

However, that script uses the gpkio and gpklib libraries (also under ../speechresearch). These need to be compiled, and it uses the gpk_img_python package that needs to be installed via "python setup.py install". Oh, and .../speechresearch/gmisclib needs to be in your PYTHONPATH.

Give it a try, and I'll be happy to help, and will incorporate the troubles you have into some form of documentation. Sorry, I have nothing better yet.

Variables
  __package__ = None

Imports: sys, gpkimgclass, Num, die, emphasis