How to add several sound sources, in a room with only one sound signal available
See original GitHub issueI want to record sound in a room with multiple sound sources, but without attaching a specific signal from each source. Imagine if I were to place a microphone array into a room where I only know the locations of the sources, but not what sounds that individually emit. I only record all of the sounds combined.
From this, I want to generate a RIR. I want the final result to be a sound with no echo and no reverberant sounds before passing it on to the next algorithm.
Any advice?
Right now I am adding one source with one signal, then room.simulate() to get a better sound in return. `
room = pra.ShoeBox(room_dim, =fs, absorption=absorption, max_order=max_order)
# add source and set the signal to WAV file content. NB: SoundSource must ne np.array()
room.add_source(soundSource3DLoc,
signal=soundData_i) # changed to Global var soundSource3DLoc
# add one-microphone 3D XYZ array add coordinates of every mic
room.add_microphone_array(pra.MicrophoneArray(room_mic_XYZ_locations,
room.fs))
room.image_source_model(use_libroom=False)
"""gets the impulse response between mic and source"""
ir = room.compute_rir()
"""calculates the n samples before sound dissipates with 60 db"""
t60_samples = pra.experimental.measure_rt60(ir)
"""calculates the time in sec before sound dissipates with 60 db"""
t60_s = pra.experimental.measure_rt60(ir, fs=fs)
"""Then the target RT60 and the estimated RT60 match really well! Now I haven't made this change just yet because
there are some caveats. First, I believe a in Sabine's formula relates to energy, while the reflection coefficient
is in amplitude (hence the original computation for the reflection). This might mean that there is a problem with
for example the estimation of the RT60 itself."""
# absorption, max_order = inv_sabine(t60=t60_s, room_dim=room_dim, c=speedOfSound) #
# visualize 3D polyhedron room and image sources
if visualizeRoom:
fig, ax = room.plot(img_order=max_order)
fig.set_size_inches(5, 2, forward=False)
plt.show()
"""Moreover, we can plot the RIR for each microphone once the image sources have been computed."""
if visualizeRoom:
plt.figure()
room.plot_rir()
fig = plt.gcf()
fig.set_size_inches(5, 2, forward=False)
plt.show()
"""Moreover, we can simulate our signal convolved with these impulse responses as such:"""
room.simulate(reference_mic=0) # this method must be called to get access to filteredSound
"""returns the filtered sound"""
return room.mic_array.signals[0, 0:nFrames] #`
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
How to Combine Multiple Signals and Still maintain Total ...
Each sound source connects to the mixer by way of a plug (on the incoming wire) which fits into a jack on the...
Read more >How to Power a Multi-room Music System - Crutchfield
The easiest way to get audio in three rooms with one receiver is to find a 9- or 11-channel receiver with powered speaker...
Read more >BLEND together AUDIO Clips from Different Sources in ...
In a recent Edit, I had to blend together audio clips from two different sources so they sounded the same. After recording, I...
Read more >Locating multiple sound sources from raw audio
Estimating the location of a sound source using only the audio captured by an array of microphones has been an active area of...
Read more >Signals - Adding Decibels - The Engineering ToolBox
The logarithmic decibel scale is convenient when adding signal values like sound power, pressure and others from two or more sources.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you don’t know the reverb exactly, this is actually a fairly hard problem. You could try some blind dereverberation to reduce the length of the reverb. An implementation of a popular algorithm (WPE) is available here: https://github.com/fgnt/nara_wpe
If you have a multichannel recording (done with synced microphones), you can try using the
bss
package. This will not reduce the reverb but will separate different sources, assuming they do not move. If the sources are moving, this gets really hard.I think there is a misunderstanding. The ISM simulator does not remove echo or noise. Quite the opposite, it adds reverberation to a dry signal to simulate what happens in a real recording.
If you want to do some enhancement on recordings you have, you should look at the other modules in the package:
denoise
,bss
, orbeamforming
. What example in the notebook are you referring to ?