IanHarvey / bluepy

Python interface to Bluetooth LE on Linux
Other
1.58k stars 490 forks source link

question regarding thingy52 microphone data #437

Open saket424 opened 3 years ago

saket424 commented 3 years ago

Can someone who has used the thingy52 microphone data comment here

(venv3) pi@pi0gadget:~/thingy-stuff/bluepy $ thingy52 -n 6000000 --microphone --speaker EF:0A:F1:95:FC:F1 Connecting to EF:0A:F1:95:FC:F1 Connected... LED set to breathe mode... Enabling selected sensors... All requested sensors and notifications are enabled... Notification: Speaker Status: b'00' Notification: Microphone: b'000000fffff08088008808008090188882180a81' Notification: Microphone: b'febc0a3488a90903315a9370098c092134bc90f2' Notification: Microphone: b'ff8c041418b04ba3371b8ba44895b3001a290f01' Notification: Microphone: b'002d059012c12a73139b010798b0c3013aabb139'

It appears to be 20 samples per notification. is this 8KHz sampling of 16bit PCM data which equates to 2.5 msec of binary2hex samples? Does anyone have a utility or code to parse this data and save it into a wav file or some other format?

Thanks in advance