Sunday, July 4, 2010

Automatically Recognizing Environments and Situations based on Sound Analysis

Logo TU Vienna  

Vienna University of Technology
Institute of Software Technology and Interactive Systems
Information & Software Engineering Group
Music Information Retrieval

Automatically Recognizing Environments and Situations Based on Sound Analysis


Each of us hears noise every day in different places, and there are features that tell apart the source and makes it unique.

We can tell the difference between the noise we hear while we are having a shower, when we have a cup of coffee at a cafeteria, but we might have some trouble to recognize the coming underground or the tram.

In the present document we present a study focused on classifying daily noises like those automatically by using a learning machine, that could be applied for other purpose like film genre classification or music genre classification. We carry out several experiments with different features and algorithms to contrast the performance.


Environmental Classification


In order to create the classifier, we first record sounds with a voice recorder in different environments (21 categories) and cut short samples from the streams. Then we extract some audio features which identify the samples (RH, RP, SSD and combinations of them) and create WEKA files with the features to train the classifier using some known algorithms (kNN nearest neighbours, Random Forests, Naive Bayes and Vector-supported machines) and these vector files. We carry out some experiments, comparing and analysing the results, trying to explain them. We also suggest some propositions for future work in order to improve the classifier accuracy.



Obtain training set

How to obtain the training set from the samples


Evaluation


In order to train the classifier, we are going to use WEKA, a suite of machine learning algorithms developed at the University of Waikato, in New Zealand. It contains some tools like data visualization or some algorithms we need for the training process.

We will execute four proofs: the first one with 100 samples belonging to 10 categories within the whole 21, the second one with all the samples (1357) in the 21 categories (both trials in a cross validation setting on the training set), the third one using the vectors from samples in the second trial as training set and the vectors from a new stream as test set, and the last one using the stream in the third experiment filtered to a lower frequency so that it has a mobile phone quality.

The best results in all the experiments can be seen in the following table.

PrecisionRecall
1st experiment84.5%83%
2nd experiment74.5%74.29%
3rd experiment21.1%11.50%
4th experiment9.5%11.91%

The detailed results for every algorithm and vector file are shown in the table below:


First experiment


Vector fileAlgorithmParameterResults
RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RPkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
SSDkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RP+RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RP+SSDkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RP+SSD+RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
SSD+RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result

Second experiment


Vector fileAlgorithmParameterResults
RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RPkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
SSDkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RP+RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RP+SSDkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
RP+SSD+RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result
SSD+RHkNNk=1Result
k=3Result
k=5Result
Random ForestsI=10Result
I=20Result
I=50Result
Naive-BayesDefaultResult
Vector-supported machinesE=1Result
E=2Result

Third experiment



First sub-experiment



Vector fileAlgorithmParameterResults
SSDRandom ForestsI=50Result
SMOE=1Result
E=2Result
SSD+RHE=2Result

Second sub-experiment



Vector fileAlgorithmParameterResults
SSDRandom ForestsI=50Result
SMOE=1Result
E=2Result
SSD+RHE=2Result

Fourth experiment



Vector fileAlgorithmParameterResults
SSDRandom ForestsI=50Result
SMOE=1Result
E=2Result
SSD+RHE=2Result


Programmes


We required eight different tools to complete this study. AMR to MP3 Converter converted the AMR files recorded with a mobile phone to MP3 files,
MP3 Cutter cut the streams in samples, Audacity processed the sound by adding silences, converting from WAV to MP3 and changing the sampling frequency to the samples,
the programming language Perl to execute the scripts, WEKA to train the classifier and run the experiments, Eclipse to develop the Java programmes, the programming
language Java to write some programmes and LaTeX for the typesetting of the paper.

Corpus


Downloads


created in July 2010 by Juan Valentín Cortés Fábregas