-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for microphone direct input #30
Comments
@zhulik I'm not sure if this is still relevant 🙂 but you can try passing alsa related arguments to the
|
@black-roland Thanks, I'll try it |
Works for me with such configuration:
But there is an issue, it stops working after some time (~1h), nothing in logs, binary_sensor is all time in "Clear" state, and microphone itself is in busy state (means process is running, but not piped to Home Assistant?) |
This is how I can easily use
ffmpeg
to detect noise using a microphone directly:ffmpeg -f alsa -i hw:0,0 -af silencedetect=n=-40dB:d=1 -f null -
It seems like it is impossible to build such command using
ffmpeg_noise
HA integration, becausehaffpeg
always puts input to the first place.This is what I tried:
And it didn't work because the command
haffmpeg
built was'ffmpeg', '-i', 'hw:0,0', '-vn', '-f', 'alsa', '-filter:a', 'silencedetect=n=-40dB:d=1', '-f', 'null', '-']
As you can see,
-f alsa
follows after-i hw:0,0
, soffmpeg
can't recognize the input.I know that it's possible to stream data from microphone using rtp and then process it as described here, but I also know that it adds a lot of complications to the systemd configuration and it is not very efficient because the streaming constantly uses 10-15% of my CPU.
How difficult it would be to add support for direct microphone input?
The text was updated successfully, but these errors were encountered: