ros-drivers / audio_common

Common code for working with audio in ROS
BSD 3-Clause "New" or "Revised" License
88 stars 153 forks source link

High latency of audio_capture audio stream #196

Open reisenhofer opened 2 years ago

reisenhofer commented 2 years ago

I am working on a project where we use live transmissions of an audio stream captured from a microphone (via audio_capture) and a video stream from a webcam (via video_stream_opencv). We work with Python and ROS Noetic on Ubuntu 20.04 and use audio_play and image_view, respectively, to playback the streams at a remote location.

Compared to the video stream, the audio_capture/audio_play audio stream has a latency of more than 1 (maybe even 2) seconds. To me, this seems unnecessarily high, in particular as the audio stream should require much less bandwidth than the video stream. Can you think of any possibility of reducing this latency when working with audio_capture/audio_play?

Thanks so much in advance!

knorth55 commented 2 years ago

I have no idea. can you check if the high latency also occurs in alsa or non-ROS programs?

pourya-shahverdi commented 2 years ago

Check your local network bandwidth. I moved to Ethernet, and the latency is much better.