After I lost a lot of time, trying to compile the NIST signal to noise ratio (SNR) tool,
I've decided to write about the solution and probably that will save some time to those, who have the problem with compiling it. Not that a lot of people use it, but anyway...
The NIST Speech Quality Assurance (SPQA) package is special for calculating the SNR for speech and the biggest advantage of this piece of sw is that it is something like standard and it can also calculate the SNR of an audio file without a reference audio file (noise or noise free).
It can be downloaded from here:
NIST spqa
It's compiled on a 64bit machine running SuSe. But after the compilation I copied the executables on another 32bit machine, running Ubuntu and they were usable. Here the solution that worked for me:
Unpack spqa_2.3+sphere_2.5.tar.Z with the command:
> zcat spqa_2.3+sphere_2.5.tar.Z | tar xvf -
That will create a nist directory. Go to the dir
> cd nist
Before you start, you have to know your system architecture. To find that out, type in the bash.
> uname -a
Example architecture is i686, i585, SUN, Darwin etc..
Before you run the install, open the exit.c file (located in dir nist/src/lib/sp) in a text editor. Make the following changes:
1. Replace the line:
extern int errno;
with the following line:
#include <errno.h>
2. Comment out the line:
extern char *sys_errlist[];
and also the line:
strcat(exitmessage, sys_errlist[errno]);
3. Save the file
Now, start with the install. Run:
> sh src/scripts/install.sh
If you use gcc as a compiler, choose the "Custom" option when asked. Then write gcc, when you're asked about the compiler. Then you can accept the proposed options by pressing enter. They should be fine, except for the last one, when you should enter your system architecture (i686, i585, SUN, Darwin etc).
The installation begins then. When finished, checked if errors occurred. If you find executables in the nist/bin directory (for example the stnr, segsnr, atismd, etc.), then the compilation was successful, otherwise, go to nist/lib directory and rename the libutil.a library with the following command:
> mv libutil.a libsputil.a
Then change directory to nist/src/bin and open the Makefile. In the Makefile, find the following line:
LLIBS = -lsnr -lsp -lutil -lm
and change it to
LLIBS = -lsnr -lsp -lsputil -lm
so that it reflect the change you've just made.
Now, from the nist/ directory run:
> make clean
and then repeat the make with the command:
> make
If after that you still get errors, see where the error comes from and change some code if necessary. The problematic library is usually the sphere (nist/src/lib/sp), because it is pretty old (1992) and some functions are deprecated (that's why the high amount of warnings you'll get while compiling). Good luck.
Btw, I also tried another tool, which is much easier to compile and seems to be reliable. Here it is: CTU snr tool . I suspect, that it will spit the same result as the NIST tool, when the appropriate options chosen, but didn't tried to compare them. More about the algorithms behind the CTU snr tool here: Calculating the SNR for speech - paper.
Wednesday, October 6, 2010
Tuesday, September 28, 2010
Types of computer viruses
Adam and Eve virus: Takes a couple of bytes out of your Apple.
Airline virus: You're in Dallas, but your data is in Singapore.
Arnold Schwarzenegger virus: Terminates and stays resident. It'll be back.
AT&T virus: Every three minutes it tells you what great service you are getting.
The MCI virus: Every three minutes it reminds you that you're paying too much for the AT&T virus.
Bill Clinton virus: This virus mutates from region to region and we're not exactly sure what it does.
Federal bureaucrat virus: Divides your hard disk into hundreds of little units, each of which do practically nothing, but all of which claim to be the most important part of the computer.
Freudian virus: Your computer becomes obsessed with marrying its own motherboard.
Gallup virus: Sixty percent of the PCs infected will lose 38 percent of their data 14 percent of the time (plus or minus a 3.5 percent margin of error).
George Bush virus: Doesn't do anything, but you can't get rid of it until November.
Government economist virus: Nothing works, but all your diagnostic software says everything is fine.
Politically correct virus: Never calls itself a "virus", but instead refers to itself as an "electronic microorganism".
Texas virus: Makes sure that it's bigger than any other file.
UK Parliament virus: Splits the screen into two with a message in each half blaming other side for the state of the system.
Airline virus: You're in Dallas, but your data is in Singapore.
Arnold Schwarzenegger virus: Terminates and stays resident. It'll be back.
AT&T virus: Every three minutes it tells you what great service you are getting.
The MCI virus: Every three minutes it reminds you that you're paying too much for the AT&T virus.
Bill Clinton virus: This virus mutates from region to region and we're not exactly sure what it does.
Federal bureaucrat virus: Divides your hard disk into hundreds of little units, each of which do practically nothing, but all of which claim to be the most important part of the computer.
Freudian virus: Your computer becomes obsessed with marrying its own motherboard.
Gallup virus: Sixty percent of the PCs infected will lose 38 percent of their data 14 percent of the time (plus or minus a 3.5 percent margin of error).
George Bush virus: Doesn't do anything, but you can't get rid of it until November.
Government economist virus: Nothing works, but all your diagnostic software says everything is fine.
Politically correct virus: Never calls itself a "virus", but instead refers to itself as an "electronic microorganism".
Texas virus: Makes sure that it's bigger than any other file.
UK Parliament virus: Splits the screen into two with a message in each half blaming other side for the state of the system.
Friday, September 24, 2010
punk evolves
Looking an year back in my playlists, here they are - some of the tracks I've killed from listening:
Slagsmålsklubben – Malmö Beach Night Party
Toy - Rabbit Pushing Mower
btw, just for the record... Most of them are something similar to punk evolved for synthesizers. And most of them are part of the Scandinavian pop culture.
Slagsmålsklubben – Malmö Beach Night Party
Toy - Rabbit Pushing Mower
btw, just for the record... Most of them are something similar to punk evolved for synthesizers. And most of them are part of the Scandinavian pop culture.
Thursday, September 16, 2010
Subscribe to:
Posts (Atom)