Friday, October 29, 2010
Wednesday, October 27, 2010
The American weekend
A weekend under the motto: "You can get a lot farther with a kind word and a gun than a kind word alone" (Al Capone)
My colleague from CMU Mike decided to show us what is the feeling of being American. So he introduced his close friend Lee (x-US Marine) to us and we ended up equipped with some dangerous stuff in the shooting range. After the initial fear, we saw that it is not so easy to shoot yourself in the leg by mistake and then the fun began. :)
And of course, just for the sake of completeness, we finished with a biiig niceeee American lunch.
The guys (Mike, Manuel, Johannes and Peter), actually continued the American experience by watching football (not soccer), but I had some work, so I went home, took my books'n'papers and completed the day in the laundry :) Actually, that was also kinda American.
My colleague from CMU Mike decided to show us what is the feeling of being American. So he introduced his close friend Lee (x-US Marine) to us and we ended up equipped with some dangerous stuff in the shooting range. After the initial fear, we saw that it is not so easy to shoot yourself in the leg by mistake and then the fun began. :)
And of course, just for the sake of completeness, we finished with a biiig niceeee American lunch.
The guys (Mike, Manuel, Johannes and Peter), actually continued the American experience by watching football (not soccer), but I had some work, so I went home, took my books'n'papers and completed the day in the laundry :) Actually, that was also kinda American.
Wednesday, October 6, 2010
NIST SNR tool
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.
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.
Subscribe to:
Posts (Atom)