Bring it up and run:
docker compose -f docker-compose.rpi.yml up -d --build
To run the watcher/analyzer:
docker compose -f docker-compose.rpi.yml exec web python manage.py runscript analyze
To run the Django test cases:
docker compose -f docker-compose.rpi.yml exec web python manage.py test
To take it down:
docker compose -f docker-compose.rpi.yml down
To run bash within the docker instance:
docker compose -f docker-compose.rpi.yml exec web bash
To rebuild the image for a reason (e.g. after pip change)
docker compose -f docker-compose.rpi.yml down; docker compose -f docker-compose.rpi.yml build --no-cache
Bring it up and run:
docker compose -f docker-compose.macm1.yml up -d --build
To run the watcher/analyzer:
docker compose -f docker-compose.macm1.yml exec web python manage.py runscript analyze
To run the Django test cases:
docker compose -f docker-compose.macm1.yml exec web python manage.py test
To take it down:
docker compose -f docker-compose.macm1.yml down
To run bash within the docker instance:
docker compose -f docker-compose.macm1.yml exec web bash
To rebuild the image for a reason (e.g. after pip change)
docker compose -f docker-compose.macm1.yml down; docker compose -f docker-compose.macm1.yml build --no-cache
Bring it up and run:
docker compose -f docker-compose.macintel.yml up -d --build
To run the watcher/analyzer:
docker compose -f docker-compose.macintel.yml exec web python manage.py runscript analyze
To run the Django test cases:
docker compose -f docker-compose.macintel.yml exec web python manage.py test
To take it down:
docker compose -f docker-compose.macintel.yml down
To run bash within the docker instance:
docker compose -f docker-compose.macintel.yml exec web bash
To rebuild the image for a reason (e.g. after pip change)
docker compose -f docker-compose.macintel.yml down; docker compose -f docker-compose.macintel.yml build --no-cache
The docker container itself does not record audio to the audio/inbox
directory. See below for basic examples for recording 30-second properly-dated WAV files to audio/inbox.
Prerequisites: arecord
To record an audio stream to "audio/inbox", run the following.
python script_examples/audio_recording_rpi.py
Prerequisites: sox, pysox
To record an audio stream to "audio/inbox", run the following.
python script_examples/audio_recording_macos.py
In order to create a self-running, restart-tolerant installation, you'll need to setup a few extra things. For example, the setup for a Raspberry Pi 4 is provided below. Other systems will require other methods of starting and restarting the processes.
Prerequisites: Raspberry Pi 4 with clean 64-bit system, docker
, docker-compose
and arecord
.
In one terminal, run:
# You can omit the build option if you've run this in the past.
docker compose -f docker-compose.rpi.yml up -d --build
docker compose -f docker-compose.rpi.yml exec web python manage.py runscript analyze
In another terminal, start the recording:
python script_examples/audio_recording_rpi.py
More to come ...