Speaker
A speaker object represents the physical speaker or audio backchannel of a device integrated into Netsocs. Its function is to receive audio from the platform and play it on the physical device, enabling voice communication in the operator → device direction.
It complements the microphone object: while the microphone captures audio from the environment, the speaker allows an operator to speak towards it. Together they form the basis of a two-way communication system.
Main characteristics
- Real-time talkback: Receives RTP packets from DriversHub and forwards them to the device audio channel.
- Managed sessions: Each talkback session has a unique
session_id that allows them to be managed independently.
- Output configuration: Exposes audio output parameters from the device (codec, sample rate, volume level).
Common use cases
- IP intercoms and PA systems.
- Real-time voice instructions to monitored areas.
- Automated audio warnings triggered by automations.
- Two-way communication on IP cameras with built-in speaker.
States
| State |
Description |
speaker.state.idle |
The speaker is available but not playing audio. |
speaker.state.talkback |
An active talkback session is in progress. |
Actions
| Action |
Description |
speaker.action.start_talkback |
Starts a talkback session. Requires session_id in the payload. |
speaker.action.stop_talkback |
Stops the active talkback session for the given session_id. |
State properties
| Property |
Description |
profile_token |
Device media profile token. |
output_token |
Audio output token on the device. |
decoder_token |
Audio decoder token for the backchannel. |
codec |
Audio codec in use (e.g. G711). |
sample_rate |
Sampling frequency in Hz (e.g. 8000). |
output_level |
Output volume level from 0 to 100. |