Crates.io | scanner-soundboard |
lib.rs | scanner-soundboard |
version | 0.2.0 |
source | src |
created_at | 2021-10-09 00:23:52.133761 |
updated_at | 2022-05-15 23:46:18.501363 |
description | Trigger sounds via RFID tags or barcodes |
homepage | https://homework.nwsnet.de/releases/9b23/#scanner-soundboard |
repository | https://github.com/homeworkprod/scanner-soundboard |
max_upload_size | |
id | 462584 |
size | 37,072 |
Reads codes via RFID or 1D/2D barcode USB scanners and plays soundfiles mapped to them.
The input device is grabbed exlusively so that scanned codes will be passed to the program regardless of what program/window currently has focus.
I originally developed this to play insider jokes as custom sounds (generated via text-to-speech engines) during regular internal evenings of Among Us games. The sounds are triggered by placing 3D-printed Among Us figurines (glued to coin-size RFID tags) on a cheap (~12 €) USB RFID reader, itself covered by a 3D-printed plan of a map from the game.
Have a bunch of sound files.
Have a bunch of codes to trigger the sounds. Those codes can come from RFID tags (10-digit strings seem to be common) or whatever you can fit in a 1D barcode or matrix/2D barcode (Aztec Code, Data Matrix, QR code, etc.). Anything your scanner supports.
Specify the path of the sound files and map the codes to sound
filenames in a configuration file (see config-example.toml
for an
example).
Find out where your scanner is available as a device. sudo lsinput
and sudo dmesg | tail
can help you here. Note that the path can
change over time, depending on the order devices are connected.
Run the program, pointing to the configuration file and input device:
$ scanner-soundboard -c config.toml -i /dev/input/event23
Ogg Vorbis and MP3 are supported out of the box. However, the employed
audio playback library (rodio)
also supports FLAC, WAV, MP4 and AAC, but those have to be enabled as
features in Cargo.toml
and require recompilation of the program.
Scanner Soundboard is licensed under the MIT license.
Scanner Soundboard was created by Jochen Kupperschmidt.