-
Notifications
You must be signed in to change notification settings - Fork 441
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
Beamforming real signal data, setting up beamformer and setting speed of sound #272
Comments
Hi, the delay and sum (DS) beamformer only makes sense for a single source. bf_signals = []
for source in my_sources
mics.rake_delay_and_sum_weights(signal)
bf_signals.append(mics.process()) I see some other problems with your code
|
Hi, Thank you so much for the quick response! I seem to have been very confused when typing out this code and question yesterday, upon rereading what I wrote I see every problem you mentioned. Let me clarify my question and situation, I have one source of sound and 10 microphone pickups, and would like to beamform their measurements to a one channel output using pyroomacoustics. I'm having trouble applying the included examples to my situation. Thanks again for the help. |
I see, so you have some recorded data already ? Or do you want to do simulation too ? Have you checked the beamforming example scripts ? |
I have 10 channels of recorded data and have taken a look at the examples. I understand how to output a single beamformed channel through the simulation workflow, but don't see an example for how to do it using one's own recorded data, for example with 10 wav files. |
I see. It is true there is no good explanation on how to do that. import pyroomacoustics as pra
from scipy.io import wavfile
fs, my_signals = wavfile.read("path/to/my_recording.wav")
# my_signals.shape == (n_samples, n_channels)
mics = pra.Beamformer(R, fs, ...) # set the beamformer object as you like
mics.rake_delay_and_sum_weights(source)
mics.signals = my_signals.T
output = mics.process() |
Thank you so much for the help, that works! Where would one set the speed of sound in this example since no virtual "room" is being setup? My data is collected in an argon environment so the speed of sound is a bit slower. Thanks again! |
For air there are formula. I don't know about Argon. But it looks like you can find it online: https://www.betamachinery.com/knowledge-center/speed-of-sound-in-gases-list |
I know the speed of sound through argon is 323 m/s, however, the way you set it up in the beamformer is ambiguous to me. When beamforming using simulated data you can use the Thank you for your time. |
Hi,
In the same vein as issue #132 I'm trying to extract a signal beamformed channel from a set 10 channels of real world data in the form of SoundSource objects in PRA. I know the mic and source locations, however, am having trouble getting the rake_delay_and_sum_weights function to work as issue #132 shows it done.
I'd really appreciate someone posting an example of how this should be written, currently I have this:
source1 = pra.SoundSource(mic_loc[0], signal = sig1)
source2 = pra.SoundSource(mic_loc[1], signal = sig2)
source3 = pra.SoundSource(mic_loc[2], signal = sig3)
. . .
mics = pra.Beamformer(mic_locs, fs, N = 256)
mics.rake_delay_and_sum_weights(source1, source2, source3, source4, . . .)
output = mics.process()
rake_delay_and_sum_weights does not seem to accept an array of sources and from issue #132 it seems like this is how you input multiple sources? Reading the source for the function though it seems like you can only feed it a single source, is there a way you can feed it multiple SoundSource objects?
Thank you!
The text was updated successfully, but these errors were encountered: