synesthesiam/homeassistant-satellite

pulseaudio output with mic-command

ACiDGRiM opened this issue · 1 comments

I am trying to get the cameras in my rooms piped in as microphones in an existing audio docker container that I have pulse audio running in. pulse audio is already working with the music streaming app I use.

I tried to create a null-source and using ffmpeg to transcode the camera rstp feed into pcm audip, and wake word detection was working, but I just couldn't get past an issue where everything that was picked up by the camera stream was being played over the null-sink that the media player uses, creating a feedback loop.

So I noticed there's a mic-command, and I'm trying to get this to work with the same ffmpeg command that "worked" with the null-source. However I don't see any wake word activity. Is it possible I can't use the ducking feature of pulseaudio output with mic_command for input?

heres the ffmpeg mic command
--mic-command "ffmpeg -i rstp://camera -vn -ar 16000 -ac 1 -acodec pcm_s16le -f wav -"

It seems if I remove or edit the if else for mic-setup it will use the mic command for input, but I'm not getting any wakeword detection with the cmdline I'm using

I'm able to confirm audio is being recording with this modification, and wake word activation sounds play over pulseaudio