FRIDA
FRIDA copied to clipboard
How can I use my own data for test?
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.
Hi @jhkim6757 , it should be possible to process your data by modifying the file test_doa_recorded.py
.
- Change the code so that the variable
mic_array
contain the coordinates of the microphones in the microphone array. The variable should be anumpy.ndarray
of shape(2, n_mics)
wheren_mics
is the number of microphones. - Modify the code so that the variable
speech_signals
contain your recorded signals. This is also anumpy.ndarray
of size(n_samples, n_mics)
wheren_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 inmic_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 frequencyfs
, etc. - Pay particular attention to
M
, this is the maximum Fourier coefficient index(-M to M)
, used in FRIDA. The algorithm requires thatK_est <= M <= n_mics*(n_mics - 1) / 2
. A smallerM
will provide more robustness, but lower accuracy, and a largerM
vice versa.
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 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.
is there any adjustment for 'protocol.json' to test my own data set and 4mic configuration?
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.
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