14.3.2 Online sound source localization

In prior to running the script, you need to configure the wireless RASP first. Edit the network file demoWS8ch.n and set the IP address to your RASP’s one. The default value is 127.0.0.1. Next, configure the FPAA (firmware) of you RASP. See the manual of RASP for details.

After these preparations, run the script demoWS8ch.sh. You will see the outputs shown in Figure 14.3.2 and visualized sound locations.

$>$ demoWS8ch.sh
UINodeRepositoryScan()
Scanning def /usr/lib/flowdesigner/toolbox
done loading def files
loading XML document from memory
done!
Building network MAIN
reading A matrix
Identifier is different from HARK’s oneH
Try to read ../config/music.dat as header-less MUSIC transfer function format.
72 directions1 ranges8 microphones512 points
done
initialize
Source 0 is created.
Source 0 is removed.
The rest is omitted
Figure 14.9: Execution example of demoWS8ch.sh.

If you have problem on localization, check the path or the validity of your music.dat. Refer to Localization failed for details.

Eight modules are included in this sample. There is one module in MAIN (subnet) and are seven modules in MAIN_LOOP (iterator). MAIN (subnet) and MAIN_LOOP (iterator) are shown in Figures and 14.11. Channels used for the audio waveforms collected with the AudioStreamFromMic module in ChannelSelector are selected and they are converted into spectral representation in MultiFFT , and MUSIC spectra are obtained in LocalizeMUSIC . Next, peaks of the MUSIC spectra are obtained in SourceTracker and tracking is performed based on the continuity with a peak of the former processing time. SourceIntervalExtender is processing to extend the start time of the sound source to the past. Finally, sound source localization results are displayed in DisplayLocalization .

\includegraphics{fig/recipes/demo-LocalizationWS8ch-MAIN.png}
Figure 14.10: MAIN (subnet)
\includegraphics{fig/recipes/demo-LocalizationWS8ch-MAIN_LOOP.png}
Figure 14.11: MAIN_LOOP (iterator)

Table 14.10 summarizes the main parameters.

Table 14.10: Parameter list

Node name

Parameter name

Type

Value

MAIN_LOOP

LENGTH

int 

512

 

ADVANCE

int 

160

 

SAMPLING_RATE

int 

16000

 

A_MATRIX

string 

ARG1

 

DOWHILE

bool 

(empty)

LocalizeMUSIC 

NUM_CHANNELS

int 

8

 

LENGTH

subnet_param 

LENGTH

 

SAMPLING_RATE

subnet_param 

SAMPRING_RATE

 

A_MATRIX

subnet_param 

A_MATRIX

 

PERIOD

int 

50

 

NUM_SOURCE

int 

1

 

MIN_DEG

int 

-180

 

MAX_DEG

int 

180

 

LOWER_BOUND_FREQUENCY

int 

500

 

HIGHER_BOUND_FREQUENCY

int 

2800

 

DEBUG

bool 

false