LCAV / pyroomacoustics

Pyroomacoustics is a package for audio signal processing for indoor applications. It was developed as a fast prototyping platform for beamforming algorithms in indoor scenarios.
https://pyroomacoustics.readthedocs.io
MIT License
1.47k stars 432 forks source link

ValueError: operands could not be broadcast together with shapes (2709,96) (2500,1) (2709,96) #339

Open Jinbo-Hu opened 8 months ago

Jinbo-Hu commented 8 months ago

I utilized the following hyper-parameters, but got ValueError: operands could not be broadcast together with shapes (2709,96) (2500,1) (2709,96) . Why does the error happen?

import pyroomacoustics as pra
import numpy as np

mic_pos = np.array([8.06855248, 2.797363, 1.74566051]) + \
    np.array([[ 0.02432757,  0.02432757,  0.02409021],
       [ 0.02432757, -0.02432757, -0.02409021],
       [-0.02432757,  0.02432757, -0.02409021],
       [-0.02432757, -0.02432757,  0.02409021]])
src_pos = [5.02121447, 4.03800758, 2.02739953]
room_dim = [15.52462282, 5.38237875,  3.35880829]

e, max_o = pra.inverse_sabine(rt60=1.99, room_dim=room_dim)
room = pra.ShoeBox(room_dim, fs=24000, max_order=max_o, 
                   materials=pra.Material(e), ray_tracing=True)
room.add_microphone_array(mic_pos.T)
room.add_source(src_pos)
room.compute_rir()