How to work with byte array of audio_capture_msg from audio_common

asked 2022-12-01 11:54:31 -0500

Hello, I am using the audio_common package and trying to create a node that performs speech recognition on captured audio. I therefore have a node subscribed to the audio/audio topic published by the audio_capture_node.cpp node that recieves arrays of bytes (uni8[] in the message) aka chunk. How should this chunk be interpreted if the sample format is S16LE (signed 16 bit little endian)? These bytes do represent the the captured audio in a raw/byte like form correct?

edit retag flag offensive close merge delete


This very old answer says it is not raw audio samples: #q98741

You could have found this yourself by pulling up all questions tagged audio_capture - there's only 13 of them.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-12-02 10:34:09 -0500 )edit