Monday, August 19, 2013

Starting to work again

Summer classes are over and I can finally continue to work on SPREAD now that I have more time to dedicate.

Norm assembled us on Monday, and discussed the next step of our respective RCTA project. To meet the deadline in November, we have to weld what we have now to form a interconnected functional whole. Based on what I understood from Monday's meeting, this is the progress over the week.

Ambient sound plus single sound source.

  • Add ambient sound to whatever sound received
  • Experimented with ambient noise level and determined how big an impact ambient noise has on correct reception of sound (amplitude, distance, frequency)
    • Amplitude and distance (propagating "fire")
      • With no ambient noise, all agent can perceive fire and run to the exit as a response (white sphere to the right of the level)
      • With ambient noise larger than 0.0008 for all bands, agent behind several small obstacle boxes failed to perceive word
      • With ambient noise larger than 0.0015 for all bands, agent behind several the big obstacle box failed to perceive word
      • With ambient noise larger than 0.02 for all bands, agent who has no obstacle between him and speaker failed to perceive word
    • Frequency: to be tested

  • Generate ambient sound map based on occupancy, ambient level will be hard-coded and same for all bands
 Agent is enclosed in ambient noise field, marked by translucent sphere
  • Make the ambient map easily authorable, enabling setting different amplitude for different bands for a single chunck of environment
  •  

bug fixing in the interface between perception and behavior trees
  • invoking another behavior tree while executing current one will stop current behavior tree but not starting the new one.

For the next week:
  • Further expose the interface between perception and behavior, get rid of bugs and author a more complex behavior tree
  • Add more words to dictionary
  • Visualize the word an agent recognize to facilitate debugging
  • Continue to investigate the multi-source problem
  • Understand how SPR packet generation algorithm works

Tuesday, July 16, 2013

7/8 - 7/14 work summary

This week I worked primarily on adding multi-soundsource support for SPREAD framework.

The original SPREAD framework has 3 propagation mode for the TLM method: CPU, plugin and GPU. GPU mode is not implemented and all the work done and demos made are based on plugin mode, where a C++ plugin is used to maintain relavant data structures and provide propagation methods. For CPU mode, similar data structures are maintained at C# side and all methods are written in C# too. This is MUCH slower than the plugin mode, achiving at most a quarter of the FPS in plugin mode. Besides, it uses a simplified version of the Transmission Line Matrix method, where additional merge step is executed after emitting at each time step. This step merges all amplitudes from all frequency bands together, destroying any sound feature of the original sound in favor of the speed. With merge step disabled, the Unity scene runs at less than 1 FPS, which is intolerable.

One advantage of the CPU mode is that it provides support for multiple sound sources. In emit method, every sound source will write its own sound data to the grid cell it occupies, and in scatter and collect step, sound frames from all sources are propagated and collected appropriately. However, the ability to emit from multiple sound sources is not provided for the plugin. Mimicing the data structures and data flows on the C# side, I was able to reproduce the same procedure on the C++ side. Also, several interface methods have to be modified too, because additional parameters are needed to refer to different sound sources.

The multi-source scheme was tested on Monday, 7/15 and unsurprisingly, it causes quite a confusion or failure to understanding for the perceptors. Some agents did not recoginize any sound while some agents recognize the wrong sound (or word). One reasonable observation is that agents tend to recognize sounds emitted from a closer sound source rather than a distant one.

Further work includes cooperating with Max to author a PBT for cocktail party/ market place scene where perception of environment sounds or spoken words are regarded as events that drive the Behavior Tree. Details need to be discussed with Mubbasir and Max. Also, the desired cocktail party effect is difficult to achive since current SPREAD framework simply adds up the amplitudes from the same frequency band if two sound packets meet at the same grid cell. This would make it hard to recover any individual packet. Norm proposed to keep every sound that is being propagated without summation. This would work theoretically, but significant performance drop is expected. Another suggestion was ignoring the low amplitude packets.

Monday, July 8, 2013

Monday's task update, due in 7/19

Scene Description:
In cocktail party, many agents are doing their own stuffs. An agent can hand a drink to player. Player can call out a name in ambient sound, it still will be perceived correctly. Alarm triggers, everyone evacuates.

Tasks:
Authoring a cocktail party scene with all necessary objects and multiple agents interacting using behavior-tree-controlled animation.
  • Scene modeling
  • Agents with different names and behavior animation sequences
  • Control behaviors, especially those involving more than one agent using Parameterized Behavior Tree
Multiple sound propagation
  • Test the ability to place multiple sound sources in the scene and play them all at once, observe what every agent has perceived, explain the reason why
  • Play environment sound and phoneme at the same time, see if the agent still can hear the phoneme. If not, come up with a method to let the agent do so.
  • Environment sounds can also control behaviors, in addition to phonemes
  • Add extra words into dictionary ("drink", more names)
  • Add a bubble to agents' heads indicating the word or sound that triggers current behavior
Squeeze performance as much as possible



Friday, June 28, 2013

Summary of readings this week

This week I primarily researched if a better discretization scheme exits and is suitable for propagating phonemes in SPREAD framework.

To begin with, there is good review on different signal modeling techniques in speech recognition http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.134.2300

In this paper, 6 sound modeling techniques are discussed.
1. Digital Filter Bank
2.The Fourier Transform Filter Bank
3.Cepstral Coefficients
4.Linear Prediction Coefficients
5.LP-Derived Filter Bank Amplitudes
6.LP-Derived Cepstral Coefficients

What we use in SPREAD framework is more similar to the second method, which takes a time sequence (or an excerpt of), take Fourier transform and filter in logarithmic frequency spacing with non-linear increasing band width. What we did differently is using uniform sampling, as opposed to a logarithmic one. Though it less mimic the way human perceive sound, the subsequent SPR packets generation step may have selected the most representative frequency and amplitude pair. The merit of current sampling scheme and the need to improve it still requires furthur understanding of exactly how SPR functions with the Confusion Matrix.

The first method is just the oldest way of extracting STFT parameters, with the help of only analog filters, the result of which is the same with the second method.

The third one uses cepstrum, which is the inverse of word "spectrum". Cepstrum analysis is popular in speech recognition area. It first computes the log of power spectrum of signal, then takes Inverse Fourier Transform of the log spectrum. Ceptrum analysis is mainly useful in capturing the time variance of the signal and based on my understanding of the algorithm, it does not fit well in SPREAD framework where degradation of sound takes into account of frequency and amplitude of each packets and cepstrum provides no straightforward representation of either.

The rest 3 method concerns prediction of signal based on received signal. From what I understood, these 3 method and ceptrum method aim to provide a set of parameters that can best represent the sound signal in the recognition process, which directly follows the sound modeling process. However, in our case, we need to find a proper way to propagate and degrade the parameters before the recognition, which makes these indirect representation less useful.

Other paper I read basically uses one of the 6 models above and they all do not consider the propagation and degradation of the sound.
 As the next step, I will explore the details of how SPR functions with DTW and Confustion Matrix and evaluating the need to use logarithmic sampling in existing framework, from both theory and code perspective.

In addition to that
(1) Using the phoneme confusion matrix, devise a simple algorithm to increase the robustness of the HMM's
  • For each phoneme, find the list of phonemes it can be confused with and the likelihood of confusion. 
  • Use that to generate new training data for each HMM model. You can use the likelihood of confusion to increase the probability of generating more training samples with that particular phoneme. 
(2) Go through ADAPT tutorials over the weekend, we will start integrating it on Monday. 

Action items 6/28

(1) Prepare a blog post which summarizes all the papers you have read. In particular, 

- give title of paper (and link to pdf) 
- what sound representation they use, for what purpose they use it for 
- why is it not suitable for our application 

(2) Understand the SPR computation algorithm to know how exactly it functions. Make sure that it is using the phoneme confusion matrix. 

(3) Using the phoneme confusion matrix, devise a simple algorithm to increase the robustness of the HMM's

- For each phoneme, find the list of phonemes it can be confused with and the likelihood of confusion. 
- Use that to generate new training data for each HMM model. You can use the likelihood of confusion to increase the probability of generating more training samples with that particular phoneme. 

(4) Go through ADAPT tutorials over the weekend, we will start integrating it on Monday. 

Wednesday, June 26, 2013

Action items 6/26

(1) Figure out appropriate sampling scheme for phoneme SPR representation

- what is relevant frequency range 
- what is best method of sampling 
- what are salient features of sound phonemes 
- principal components of sound phonemes 
- sound phoneme hierarchical clustering analysis 
- Phoneme confusion matrix (I've attached a pdf with phoneme confusion matrix)

(2) Get up to speed using ADAPT platform and using Parameterized Behavior Trees (PBTs) 

Friday, June 21, 2013

Researching better sound discretization scheme

Search in sound sampling technique:
Most results talking about why we should choose a sampling rate larger than Nyquist frequency (twice the highest frequency of continuous sound) to not distort sound. However, what we are interested is how to sample in frequency domain to get adequate, yet efficient discretization of the sound in a single time frame.

Literature in Psychoacoustics provided some insights into how to accomplish this goal. Psychoacoustics is generally a branch of psychophysics which studies the perception of sound considering both the mechanical characteristics of sound and the roles ears and brains play in audio signal processing and recognition. Mel scale and Bark scale are two frequently used human hearing perception models. Both indicate human sensitivity to sound frequency is non-linear and approximately logarithmic at the high-frequency end, but nearly linear at the low-frequency end. This could serve as experimental basis to how we discretize sound in different frequency range.

Bark scale:
NumberCenter Frequency (Hz)Cut-off Frequency (Hz)Bandwidth (Hz)
20
15010080
2150200100
3250300100
4350400100
5450510110
6570630120
7700770140
8840920150
910001080160
1011701270190
1113701480210
1216001720240
1318502000280
1421502320320
1525002700380
1629003150450
1734003700550
1840004400700
1948005300900
20580064001100
21700077001300
22850095001800
2310500120002500
2413500155003500

Traced back the paper that the original SPREAD paper selected as a theoretical foundation to SPR sound representation. Would look at that paper and Related Work section of which to furthur learn the existing technique on sound spectra discretization and representation.

Any additional keyword to try would be helpful.


Questions for myself to consider:
Phonemes are of different duration, how are they discretized evenly in time into 50 frames?
In phoneme spectra, different color are based on linear amplitude or logrithmic amplitude (dB)?

I am looking into the MATLAB code for the answers to these questions.