iot-schema-collab / iotschema

30 stars 12 forks source link

Capability: Microphone #65

Open danicic opened 5 years ago

danicic commented 5 years ago

Capability Microphone

A capability for an Internet Protocol microphone or an IP microphone.

Properties

Name Description Input Output
OutputPayloadType Type of the payload output (e.g., stream or buffer/batch). OutputPayloadData OutputPayloadData
BitDepth The number of bits of information in each sample. It is the resolution of each sample, e.g. 8, 16 or 24 bits per sample. BitDepthData BitDepthData `
Encoding The number that represents the amplitude of the signal at a specific point in time, e.g., an (un-)signed integer or a floating point EncodingData EncodingData `
NumberOfChannels The number of channels used, e.g. mono uses 1 channel and stereo uses 2 channels. ChannelData ChannelData `
Rate Recording rate. RateData RateData `
SilenceTimeout The silence is detected after reaching a number of consecutive frames defined by the SilenceTimeout. SilenceTimeoutData SilenceTimeoutData `
SilenceStop Stop recording on silence. SilenceStopData SilenceStopData `

Provide Input for writable properties.

Actions

Name Description Input Output
TurnOn Turn on a thing (microphone). --- ---
TurnOff Turn off a thing (microphone). --- ---
StartRecording Starts recording activity (e.g., audio, video). --- Stream or Buffer Data
StopRecording Stops recording activity (e.g., audio, video). --- ---
PauseRecording Pause recording activity (e.g., audio, video). --- ---
ResumeRecording Resume recording activity (e.g., audio, video). --- Stream or Buffer Data

Data Types

Numeric Data Types:

Name Definition Min Value Max Value Unit Code
BitDepthData Number 4 64 ---
EncodingData Number (Integer, SignedInteger, Float) --- --- ---
RateData Number --- --- ---
SilenceTimeoutData Number --- --- Second or number of frames

Enumeration or Text Data Types:

Name Data Type Enumeration (comma separated) Values
OutputPayloadData String Stream, Buffer
ChannelData Number 1, 2

Boolean Data Types:

Name
SilenceStopData
danicic commented 5 years ago

Properties such as for example: OutputPayloadType, Rate, BitDepth, SilenceTimeout etc. (see above) are configuration parameters rather than properties in sense of W3C TD Properties. Some configuration parameters are supposed to be set before a Thing can be used. Others can be initialized but later changed. Some of them are mandatory, wheres the other may be optional and so forth. Thus, we should extend the iotschema model to accommodate configuration parameters, and also to propose this extension to W3C WoT Thing Description model.

6d77 commented 5 years ago

Comment on the naming: technically, a Microphone is a device which converts air vibrations into an electrical signal without recording. A recording device is separated from that. There should be a better naming taking into account the technical realizations and also the possibilities to combine optical and acoustical sensing and recording. Just consider the following technically distinct components with the described functions (capabilities?):

Actual devices may combine any of those:

For the naming I propose to think into the following direction:

Nouns are quite often not good candidates to describe a capability. IMHO they tend to describe things and devices, like a microphone. Instead a -ing form describing a process much more relates to a capability, e.g.

@danicic what do you think?