kosdk/soxplayer

By kosdk

Updated about 3 years ago

A container that can play recorded sounds on demand via a simple HTTP web API.

Image

250

Sox Player

A image for playing sounds on a host machine. Comes with a simple HTTP API written in nodejs for playing back audio on demand from a remote process or system.

Repository available at Github.

Setup

You must map the /dev/snd device to the container so that the playback audio occurs.

It is recommended that you place this behind a reverse proxy so that you can secure the API. You can use the X-FORWARDED-FOR header to pass through the origin IP. Check the documentation for your reverse proxy for more information.

Environment Variables

VariableTypeDescription
PORTNumberThe port to start the API web server on. Default 3859.
LOCATIONStringThe location in the container of the playback folder. Default /data.
DENY_LISTBooleanDisables listing of files in the playback folder. Default false.

API

The HTTP API is simple and uses GET requests. Refer to the APIDOCS on Github for further details.

  • /api/v1/play
  • /api/v1/stop
  • /api/v1/list

Docker Pull Command

docker pull kosdk/soxplayer