Skip to content

Latest commit

 

History

History
116 lines (91 loc) · 5.34 KB

README.md

File metadata and controls

116 lines (91 loc) · 5.34 KB

🎤 record - record sound periodically

Monitors attached microphone and provides arecord functionality as micro-service, providing WAV data. This container may be run locally using Docker, pushed to a Docker registry, and published to any Open Horizon exchange.

Status 🚧

Supports amd64 Architecture Docker Pulls

Supports arm Architecture Docker Pulls

Supports arm64 Architecture Docker Pulls

Service discovery

Service variables

  • RECORD_DEVICE - device to record sound; default: PS3 Eye camera microphone identifier
  • RECORD_PERIOD - interval to poll audio device; default: 10 seconds
  • RECORD_SECONDS - amount of time to record; default: 5 seconds
  • LOG_LEVEL - specify level of logging; default info; options include (debug and none)
  • DEBUG - default: false

How To Use

Copy this repository, change to the record directory, then use the make command; see below:

% mkdir ~/gitdir
% cd ~/gitdir
% git clone http://github.com/dcmartin/open-horizon
% cd open-horizon/record
% make
...

The record value will initially be incomplete until the service completes its initial execution. Subsequent tests should return a completed payload, see below:

% make check

EXAMPLE

{   
  "date": 1555192656,
  "hzn": { "agreementid": "ca200f9e5620cde9ad9d36384de52c0fcd307e8f0b22428a2f55da71ef4ac403", "arch": "arm", "cpus": 1, "device_id": "test-cpu-2", "exchange_url": "http://exchange:3090/v1/", "host_ips": [ "127.0.0.1", "192.168.1.52", "172.17.0.1", "172.18.0.1", "169.254.179.194" ], "organization": "[email protected]", "ram": 0, "pattern": "record" },
  "service": { "label": "record", "version": "0.0.1", "port": "9192" },
  "config": {
    "log_level": "info",
    "debug": true,
    "device": "/dev/video0",
    "period": 10,
    "seconds": 5,
    "sample_rate": 19200,
    "services": null
  },  
  "record": {
    "type": "WAV",
    "start": 1555541712,
    "finish": 1555541717,
    "id": "test-cpu-1-20190417225512",
    "audio": "<redacted>",
  }
}

Changelog & Releases

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Authors & contributors

David C Martin ([email protected])