Problem
To measure impulse responses for sound source localization and sound source separation.
Solution
You need a loudspeaker, a microphone array, an audio device that can simultaneously play and record a sound, and a signal including multiple TSPs. Upon installing harktool , a wave file of a single TSP signal is installed in /usr/bin/harktool3_utils; the file name is 16384.little_endian.wav. Since this file includes a single TSP signal, it is necessary to cut and paste to make multiple TSPs (e.g., 8 or 16 times) using waveform editing software, such as matlab, or python. Note that NO spaces should be inserted between TSPs.
You can decide the number of TSPs depending on the environment of the measurement. If the environment is quiet, you can use 8-times TSPs which is short. However, if the environment is noisy, e.g., an air conditioner is running, we recommend to use 16-times TSPs to suppress the effect of the noise.
Similarly, 16384.little_endian.tsp is also installed to the same path. This is a raw file, with32 bit floating amplitude data installed in series. To read the file, use wavesurfer (to install on Ubuntu, use sudo apt-get install wavesurfer) Then, open the file with wavesurfer,
wavesurfer /usr/bin/harktool3_utils/16384.little_endian.tsp
and set the configuration (Fig. 5.1)
Impulse responses are measured in two steps: (1) playing and recording the TSP signal, and (2) calculating impulse responses from TSP signals.
Playing and recording the TSP signal
Play multiple TSP signals because their addition reduces background noise and reverberation. Assume the use of tsp8.wav having eight TSP signals.
Use wios for recording. If you want to record the impulse response using an ALSA device with 8 channels, use the following command (see Recording multichannel sound how to use wios )
wios -s -x 0 -i tsp.wav -c 8 -o r100_d000.wav
It is necessary to record impulse responses from every direction. For example, impulse responses can be measured along a circle with its center at the microphone array position and a radius of 1-2m. After each recording, the loudspeaker should be moved 5 or 10 degrees, followed by another recording. If impulse responses are recorded at a 1m distance and every 10 degrees, the file names will be
r100_d000.wav r100_d010.wav ... r100_d350.wav
Calculating impulse responses from TSP signals.
The impulse response for each TSP signal can be calculated by adding each TSP and calculating the converse of the inverse TSP signal with the added TSP. These calculations can be performed using harktool. See the HARK document or the tutorial video on measurements of transfer function for details.
Discussion
Impulse response is an output of the system following the application of an impulse function to the system. Intuitively, the reverberation you hear upon clapping your hands in a room is a type of impulse response. The problem in actually measuring the “impulse response” is the need for a large amount of energy with a sufficient signal-to-noise ratio. To solve this problem, the impulse response is measured using a Time Stretched Pulse (TSP) signal, whose energy is stretched over time. Impulse response can be determined by recording the TSP and calculating the converse and inverse of the TSP [1,2]. The best interval between measurements is usually around 5 or 10 degrees, although it depends on the microphone array and on the shape and configuration of the room.
See Also
See Recording multichannel sound to determine how to use wios . See HARK Installation Instructions to determine and the section on harktool in the HARK document on the installation of HARK and the use of the harktool. We also provide an instruction video on the measurement of transfer function .
References
Y. Suzuki, F. Asano, H.-Y. Kim, and Toshio Sone, "An optimum computer-generated pulse signal suitable for the measurement of very long impulse responses", J. Acoust. Soc. Am. Vol.97(2), pp.-1119-1123, 1995
Impulse response measurement using TSP (in Japanese) http://tosa.mri.co.jp/sounddb/tsp/index.htm