Audio Input
Audio Input exposes a local microphone, line-in, USB audio device, or virtual capture source as a reusable audio source for tasks that need external audio.
Select a capture device and supported PCM format
Use Audio Input when the agent needs a reusable local audio capture source: a USB microphone, line-in device, HDMI capture audio input, virtual audio source, or system-level capture device.
The component opens the selected capture mixer as a recordable line and exposes audio samples to tasks that consume external audio. Choose a format offered by the selected device; unsupported formats cause startup failure.
Select the device
Set Audio device to the capture device shown by the local Java Sound system. If the expected device is missing, check OS audio permissions, service user access, and whether another process already locked it.
Choose the format
Set Audio format to a value supported by the device. Prefer 16-bit signed PCM for most detection and recording pipelines.
Match downstream workload
Use mono and lower sample rates for sound detection. Use 44.1 kHz or 48 kHz when audio should be recorded with video or preserved closer to device quality.
Configuration parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
Audio device | Yes | Local audio capture device identifier selected from recordable Java Sound mixers. | None |
Audio format | Yes | Audio format in encoding/sampleRate/sampleSizeInBits/channels form, for example PCM_SIGNED/48000/16/2. Common encodings are PCM_SIGNED, PCM_UNSIGNED, ALAW, and ULAW. | None |
Share one audio capture source with media tasks
On start, Audio Input opens and starts the selected capture line. On stop, it stops and closes that line. Tasks that need external audio can then read samples from this source instead of opening the device directly.
Use it with Local Media when video comes from one local source but audio must come from another source. In that setup, configure Local Media to use an external audio source and select this Audio Input.
Capture source
Represents a concrete microphone, line-in, HDMI capture input, or virtual capture device on the host.
Audio format
Controls encoding, sample rate, bit depth, and channel count passed downstream.
Resource tuning
Lower sample rate and mono reduce processing cost for detection workloads.
Choose formats for detection and recording
Sound detection microphone
Use PCM_SIGNED/16000/16/1 or PCM_SIGNED/22050/16/1, then tune Sound Detection thresholds downstream. Mono is usually enough for alarm detection.
Video recording with external microphone
Use PCM_SIGNED/48000/16/1 or PCM_SIGNED/48000/16/2 depending on microphone and recording requirements.
USB microphone on headless Linux
Verify the device appears after the agent starts, then choose a conservative 16-bit PCM format. If capture fails after reboot, check device naming/order and service permissions.
Virtual audio source
Select the virtual capture device and use a format that matches the producer to avoid extra resampling or unsupported-line errors.
Low-resource installation
Use mono and a lower sample rate, especially when several audio inputs run on the same host.
Operational notes
Format changes restart capture
Changing Audio device or Audio format restarts the component.
Device sharing can fail
Only one consumer should actively read from the same capture line unless the platform explicitly supports sharing. Route shared audio through one media pipeline when possible.
Unsupported format blocks startup
If the selected format is not supported by the mixer, the component fails to start. Pick one of the formats offered for the selected device.