Audio source

Hi.
I’m running OH2.4 on rpi4, working on a project that needs the realtime raspberry pi usb microphone audio on habpanel. i could play sounds from $OPENHAB_CONF/sounds on habpanel but the problem is that how i can set the raspberry pi usb mic for audio source of OH?? that i can play microphone on habpanel.
i’ve set the System Microphone for audio source in paper ui but how to use it in rules??
the project is a doorbell using rpi camera with ip camera binding to stream video that finally can be watched in habpanel, for audio using raspberry pi microphone and play() function also played in habpanel.
any advice or guidance would be greatly appreciated.

Are you trying to setup a kind of video phone?

For my own opinion, I think you’d get on better if you tired to encode the audio into the same stream as the video.

If never heard of anyone “Passing Through” audio from openHAB2 server’s audio input directly to an audio sink.

I’ve been able to record audio and play it out via an Audio Sink, but I don’t think that’s what you’re asking for.

  • How does your camera output it’s video?
    As a stream, a HDMI or old school composite video

  • Does your camera have an audio input, so it can encode both the Audio & Video into its output?

  • Some IP cameras have an option to only retrieve an audio (but I can’t recall which models I’ve seen that in, as it’s not something I use)

You could see if you can get some kind of audio streaming software running that turns the audio input into a ‘on demand’ stream?

VLC has this option, as an example

@MDAR
First of all thank you for your fast reply.
i’m trying to make something like two way audio and one way video with running two OH on two raspberry pi. one at the door (doorbell) and another in home. i’ve attacehd rpi camera to first rpi with usb soundcard and microphone. video from rpicam is streaming on a custom url which can be watched from another rpi which is in home, they are in the same network, the concept is when someone presses a button, First Rpi play microphone to habpanel.
rpi camera does not have audio input.
i’have configured uv4l with webrtc which described below, webrtc has simple two-way audio video like video-call but i dont know how to control it with openhab !!!
https://www.linux-projects.org/uv4l/installation/