FRIDA icon indicating copy to clipboard operation
FRIDA copied to clipboard

How can I use my own data for test?

Open jhkim6757 opened this issue 5 years ago • 6 comments

I am getting a lot of help from your paper.

I want to test my own data. (4 MIC configuration DoA estimation)

What parts of the code will need to be modified before testing can proceed?

I would really appreciate it if you could let me know.

jhkim6757 avatar Apr 15 '19 05:04 jhkim6757

Hi @jhkim6757 , it should be possible to process your data by modifying the file test_doa_recorded.py.

  1. Change the code so that the variable mic_array contain the coordinates of the microphones in the microphone array. The variable should be a numpy.ndarray of shape (2, n_mics) where n_mics is the number of microphones.
  2. Modify the code so that the variable speech_signals contain your recorded signals. This is also a numpy.ndarray of size (n_samples, n_mics) where n_samples is the length of the signal in samples.

Some details to pay attention to:

  • The order of the signals in speech_samples should match that of the coordinates of the microphones in mic_array (this is a problem more common that you'd think, and quite difficult to debug)
  • To obtain good performance you will most likely need to adjust the parameters of the algorithm to account for dominant frequencies in your signal, microphone spacing, etc. For examples, freq_hz (frequency bands), fft_size, sampling frequency fs, etc.
  • Pay particular attention to M, this is the maximum Fourier coefficient index (-M to M), used in FRIDA. The algorithm requires that K_est <= M <= n_mics*(n_mics - 1) / 2. A smaller M will provide more robustness, but lower accuracy, and a larger M vice versa.

fakufaku avatar Apr 15 '19 05:04 fakufaku

Thank you for comment, I would like to ask few more questions.

I got a Error Message when I execute test_doa_recorded.py. ' LinAlgWarning: scipy.linalg.solveIll-conditioned matrix detected. Result is not guaranteed to be accurate.', instead of 'Appling FRI ...' How can I solve this problem?

Additionally, Should I have to match the filename to 1.wav, 2.wav, ..., 16.wav etc.

jhkim6757 avatar Apr 16 '19 02:04 jhkim6757

@jhkim6757 The message you describe is a warning, rather than an error. It doesn't mean the code is not working, unless some other error occurs, or you are getting garbage results out.

Concerning the filenames, you have to change the code so that filename (see this line) contains the name of the wav file with the data. In our code, we assume all channels are contained in a single wav file. If this is not the case, you have to open every file individually and concatenate the signals into the speech_signals array as described in my reply above.

Hope this helps.

fakufaku avatar Apr 16 '19 09:04 fakufaku

is there any adjustment for 'protocol.json' to test my own data set and 4mic configuration?

jhkim6757 avatar Apr 19 '19 08:04 jhkim6757

The protocol.json file was used to store all the information pertaining to our own recorded data. I think the best way is for you to get rid of this part of the code and only specify what you need.

fakufaku avatar Apr 19 '19 09:04 fakufaku

Due to the warning mentioned above, we are not getting accurate results. Could you tell me where 'the ill-conditioned matrix detected' warning occurred?

' LinAlgWarning: scipy.linalg.solve Ill-conditioned matrix detected. Result is not guaranteed to be accurate.'

I want to see the DOA results my data. Thank you

jhkim6757 avatar Apr 22 '19 13:04 jhkim6757