Recording audio and aggregating via python vs bonsai #1212
Unanswered
matiasandina
asked this question in
Q&A
Replies: 3 comments 7 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello, thank you for the reply.
I sometimes got this error, which is not very clear to me but I think it might be due to choosing the wrong fields (like stereo instead of mono) |
Beta Was this translation helpful? Give feedback.
7 replies
-
Oh that's lame from me, sorry about that.
Getting this error though
[image: image.png]
@bruno-f-cruz Image was not rendering correctly here so I put it again
![image](https://user-images.githubusercontent.com/7494967/212757408-b3303ba5-0ea0-4796-b1e7-53a815827117.png)
El jue, 5 ene 2023 a las 18:54, brunocruz ***@***.***>)
escribió:
… The expression should go in the Expression property of the
ExpressionTransform node. You are typing it in the Description attribute.
—
Reply to this email directly, view it on GitHub
<#1212 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZF2N67U3BXVUI5EODDF7DWQ5NLNANCNFSM6AAAAAATNAF5UI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a function that I use to record audio from a microphone and aggregate the amplitude on windows of 1 second.
I am thinking about integrating this function with my bonsai workflows. It might be that it's better to handle this from bonsai's audio capture and buffering and feed the array to python to perform the averaging (and likely possible to do everything in bonsai). Since I had the python code already working, I thought it might be possible to integrate it as a python node, and modify the function to be either triggered or to return to bonsai each time it ran so we get a proper timestamp. Any advice appreciated.
While we are at it, I haven't fully tested having more than one microphone (e.g., 1 microphone per animal box and n>1 animals) with either the python script or bonsai (in fact, if multiple devices detected I'm using the first one only). It would be desired that the solution works for more than one microphone stream. One thing about using more than one mic, besides having to find the name-index match, is that I would need them to be in sync and here bonsai would be nice instead of doing it in different python threads or different
pyaudio
streams.Beta Was this translation helpful? Give feedback.
All reactions