Appearance
traits/microphone.proto
Table of Contents
traits/microphone.proto
DescribeGainRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
GainSupport
GainSupport describes the capabilities of devices implementing this trait.
Field | Type | Label | Description |
---|---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis | |
gain_attributes | smartcore.types.FloatAttributes | Attributes associated with the gain property of the microphone. Note that a step value that is the same as the bounds implies that the microphone only supports mute | |
mute_support | smartcore.types.MuteSupport | How is mute implemented by the device. Can help to customise behaviour of interfaces to the device, e.g. by disallowing gain change when muted |
GetMicrophoneGainRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | fields to fetch relative the the AudioLevel type |
PullMicrophoneGainRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | fields to fetch relative the the AudioLevel type | |
updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullMicrophoneGainResponse
Field | Type | Label | Description |
---|---|---|---|
changes | smartcore.types.AudioLevelChange | repeated | Changes since the last message |
UpdateMicrophoneGainRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to update the state for | |
gain | smartcore.types.AudioLevel | The updated gain value | |
delta | bool | Only supported for AudioLevel.gain. Update the value relative to the current value. | |
update_mask | google.protobuf.FieldMask | The fields we intend to update relative to the AudioLevel type |
MicrophoneApi
Trait for devices that support some kind of audio input. The most basic is a simple muting microphone, it's optional to support gain adjustment on a scale.
For the sakes of this trait "gain" means the combination of a gain and a mute state.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetGain | GetMicrophoneGainRequest | .smartcore.types.AudioLevel | Get the current state of the gain for the device |
UpdateGain | UpdateMicrophoneGainRequest | .smartcore.types.AudioLevel | update the gain state for the device |
PullGain | PullMicrophoneGainRequest | PullMicrophoneGainResponse stream |
MicrophoneInfo
Describes the capabilities of a specific named device with respect to this trait.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeGain | DescribeGainRequest | GainSupport | Get information about how a named device implements Gain features |