chris-hld / spaudiopy Goto Github PK
View Code? Open in Web Editor NEWSpatial Audio Python Package
Home Page: https://spaudiopy.readthedocs.io/
License: MIT License
Spatial Audio Python Package
Home Page: https://spaudiopy.readthedocs.io/
License: MIT License
Test_parallel fails frequently, but not always.
It seems that tests/test_parallel.py::test_render_bsdm
is causing it (most of the times?).
As it doesn't occur every time, it might be undefined behaviour related to the shared memory access.
I will first try to collect some tracebacks, maybe they show some pattern.
Test on macOS-latest with Python 3.6
test_jobs = None
@pytest.mark.parametrize('test_jobs', JOB_COUNTS)
def test_render_bsdm(test_jobs):
sdm_p, sdm_phi, sdm_theta = [*np.random.randn(3, 1000)]
hrirs = spa.IO.load_hrirs(fs=44100, filename='dummy')
bsdm_l_r, bsdm_r_r = spa.sdm.render_bsdm(sdm_p, sdm_phi, sdm_theta, hrirs,
jobs_count=1)
bsdm_l_t, bsdm_r_t = spa.sdm.render_bsdm(sdm_p, sdm_phi, sdm_theta, hrirs,
jobs_count=test_jobs)
> assert_allclose([bsdm_l_t, bsdm_r_t], [bsdm_l_r, bsdm_r_r])
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E Mismatched elements: 1 / 2510 (0.0398%)
E Max absolute difference: 0.64633057
E Max relative difference: 1.
E x: array([[ 1.955098, 0.205032, -1.341322, ..., 0. , 0. ,
E 0. ],
E [ 1.955098, 0.205032, -1.341322, ..., 0. , 0. ,
E 0. ]])
E y: array([[ 1.955098, 0.205032, -1.341322, ..., 0. , 0. ,
E 0. ],
E [ 1.955098, 0.205032, -1.341322, ..., 0. , 0. ,
E 0. ]])
In "mode strength" function :
def spherical_h2(n, z):
with np.errstate(divide='ignore'):
return scyspecial.spherical_jn(n, z) + 1j * scyspecial.spherical_yn(n, z)
Shouldn't it be minus sign ?
return scyspecial.spherical_jn(n, z) - 1j * scyspecial.spherical_yn(n, z)
https://spaudiopy.readthedocs.io/en/latest/_modules/spaudiopy/sph.html#mode_strength
When installing the package with "pip install spaudiopy", the error occurs:
ERROR: Requested spaudiopy from https://files.pythonhosted.org/packages/45/d3/bc5d9e57b8b8a339b582dc47e058979403f771ffe368ebfc72585b64df7b/spaudiopy-0.1.3.tar.gz#sha256=0a35b290e11f148f4e9b0834748fbfe9e2c5b9f8054a31dd0814be3902511095 h
as different version in metadata: '-tail-.is.not.recognized.as.an.internal.or.external.command-operable.program.or.batch.file.-dirty'
Hi
when I set src_coords, it defaults he has his face towards to me, any ideas I can make he has his back towards to me?
Hi everyone,
I’m currently working on a project that involves spatial audio processing using the STARSS23 dataset. My goal is to convert the FOA (First-Order Ambisonics) format audio files from this dataset into a format compatible with a planar circular four-microphone array.
The planar circular microphone array I’m using has the following coordinates in spherical format:
Mic 1: (0°, 0°, 1)
Mic 2: (90°, 0°, 1)
Mic 3: (180°, 0°, 1)
Mic 4: (270°, 0°, 1)
I’ve read that spaudiopy is a powerful tool for such spatial audio processing tasks, and I believe it can help with this conversion. However, I’m looking for guidance on how to effectively decode FOA signals to match this specific planar circular microphone configuration.
If anyone has experience with this kind of conversion or can point me to relevant documentation or examples using spaudiopy, I would greatly appreciate your help.
Thanks in advance for your assistance!
Best regards
Hi,
Thanks for the wonderful library.
I have a First Order Ambisonics (FOA) recording with a single static source. Can I use this library to estimate the direction of arrival (DOA), i.e. the azimuth and elevation angles of the sound source?
I am new to spatial audio, this might be a straightforward task, but I would greatly appreciate any guidance you can provide. A code snippet or a high-level explanation would be helpful.
Thanks,
Saksham
hello,
I would like to use another hrtf dataset in resonanceaudio other than its default one.
can you guide me on how would I use spaudiopy to read and create spherical harmonics for resonanceaudio?
it has some matlab scripts, but its just for its default dataset.
for example for mit kemar, data, how can I process it into spherical harmonic wavs?
thanks.
Hi
I am trying to use this great piece of code to simulate 3d spacial audio but I am not sure where to start. Is there a tutorial or some basic test exemples to get started and understand the basic concepts / building blocs and then develop from there?
I had a look at the doc and it is great but it assume already a good understanding of the overall expertise domain.
I went to the exemple folder but I am not sure what the exemlles are doing, I could not find a description except in the file names.
Looking for some guidance and first steps push, if you can point me to some documentation I would have missed that is great.
Thanks
Hello. It looks like this lib uses matplotlib to draw 3d environment model.
But matplotlib throws an error:
NotImplementedError: It is not currently possible to manually set the aspect on 3D axes
while trying to execute the following code:
File "\.conda\envs\vbap_test\lib\site-packages\spaudiopy\plots.py", line 362, in hull_normals
ax = fig.add_subplot(1, 1, 1, projection='3d', aspect='equal')
I'm using matplotlib==3.1.1
Hi! Great library, I found it because of your nice interface to the Lebedev Quadrature.
https://spaudiopy.readthedocs.io/en/latest/spaudiopy.grids.html#spaudiopy.grids.load_lebedev
Unfortunately, I have the impression something is wrong.
In my opinion and according to the source you cited for your values,
https://people.sc.fsu.edu/~jburkardt/datasets/sphere_lebedev_rule/lebedev_003.txt
the Lebedev grid of precision 3 should consist of six vectors. In your code, it only returns four of them:
>>> import spaudiopy as spa
fatal: not a git repository (or any of the parent directories): .git
>>> vecs, weights = spa.grids.load_lebedev(degree=3)
>>> len(vecs)
4
This seems to be a problem with the .mat file added in 4242e89 not containing the right data:
>>> from scipy.io import loadmat
>>> data = loadmat("/home/philipp/spaudiopy/lebedevQuadratures_3_131.mat")
>>> len(data['lebedev_003'])
4
Hi everyone,
first of all thanks for this great implementation! I was wondering if there is a way to make a simplified 2D use case work for VBAP algorithm? I am running into errors because my loudspeaker arrangement is coplanar for this simplified setup. Thank you!
Best, nwesem
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.