luxai-qtrobot / QA

Virtual repository for Questions & Answers system
http://luxai-qtrobot.github.io
5 stars 0 forks source link

Microphone Topic #11

Open RMichaelSwan opened 4 years ago

RMichaelSwan commented 4 years ago

Are there plans for a microphone ROS topic or are we currently bound to the RPi in the head due to hardware/latency limitations?

andrewpbstout commented 4 years ago

I'm also interested in the answer to this question. I'm evaluating wakeword providers, and some have greater compatibility for x86 than for RPi. I'm assuming doing wakeword detection on the NUC would introduce unacceptable latency, but it would be nice to know if I'm wrong.

apaikan commented 4 years ago

I thoroughly agree with you guys. Anyway there are few simple reasons why we did not implement custom Mic/audio streaming topic:

  1. First and most, it already exists in standard ROS under audio_common packages☺️ @dkcodeguy is providing a short tutorial on how to use it with QTrobot.
  2. Some of audio tools such as hotword detector need exclusive access to the microphone. So one should stop the ROS audio streaming node before running such a tool.
  3. QTrobot comes with ReSpeaker Mic Array v2.0 which has 6 audio channels: 4 independent mic raw data, one processed audio for ASR and one merged playback channel. Although the ASR channel is most common used, depending on the user application, any of these configurations might be of interest.
codionysus commented 4 years ago

When using audio_common you just need to configure capture.launch file to use proper device, so our mic is hw:1,0. Running audio_capture it will create "/audio/audio" topic and on that topic you can listen to the mic, read data etc. There is already tutorial on that page how to set it up. You can also try this respeaker_ros and use some of this topics :