Simulink Raspberry pi ALSA audioCapture data type miss match
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi.
I'm trying to get 32bit audio data from the raspberry pi microphone array.
But i got this error:
For '?' of 'simulink_test/ALSA Audio Capture', the 'stepImpl' method of the System object 'codertarget.raspi.internal.RaspiALSAAudioCapture' returned a value that has data type 'int16'. This data type does not match the type 'int32' returned by the 'getOutputDataTypeImpl' method, inherited from System object 'codertarget.linux.blocks.ALSAAudioCapture'. To override the inherited behavior, customize 'getOutputDataTypeImpl' for System object 'codertarget.raspi.internal.RaspiALSAAudioCapture'.
With this microphone array, data can only be received in 32-bit, and my deep learning model was also trained with 32-bit data.
How can I fix this error?
Thank you.
0 comentarios
Respuestas (1)
Brandon Stevens
el 10 de Nov. de 2022
For the 'ALSA Audio Capture' block there is a block paramater called 'Device bit depth' that you would want to change to 32-bit.
This parameter specifies what data type the audio data should be cast to. The default is 16-bit which seems to be what your parameter is set to.
For more information, check out the documentation page for the block:
https://www.mathworks.com/help/supportpkg/raspberrypi/ref/alsaaudiocapture.html
0 comentarios
Ver también
Categorías
Más información sobre Raspberry Pi Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!