LCAV / FRIDA

A high-resolution direction-of-arrival finding algorithm relying on finite rate of innovation sampling with a robust reconstruction algorithm.
MIT License
91 stars 46 forks source link

How can I use my own data for test? #5

Open jhkim6757 opened 5 years ago

jhkim6757 commented 5 years ago

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.

fakufaku commented 5 years ago

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:

jhkim6757 commented 5 years ago

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.

fakufaku commented 5 years ago

@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.

jhkim6757 commented 5 years ago

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

fakufaku commented 5 years ago

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.

jhkim6757 commented 5 years ago

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