Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jhkim6757 opened this issue Apr 15, 2019 · 6 comments
Open

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

jhkim6757 opened this issue Apr 15, 2019 · 6 comments

Comments

@jhkim6757
Copy link

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
Copy link
Collaborator

fakufaku commented Apr 15, 2019

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.

@jhkim6757
Copy link
Author

jhkim6757 commented Apr 16, 2019

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
Copy link
Collaborator

@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
Copy link
Author

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

@fakufaku
Copy link
Collaborator

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants