PartyHall Phonebooth is a simple audio-guestbook that is working in the PartyHall ecosystem.
Currently it is only a project RELATED to PartyHall. Nothing is integrated yet.
The "long-term" goal is to have it work the same way as an appliance, you give it its device credentials and it auto-uploads the recorded messages to the PartyNexus instance.
This is NOT the case for now.
- A Raspberry Pi (I used a Model 2)
- UGREEN Usb sound card
- A Cheap lavalier microphone (Not the one I used because I bought mine at a local store but it should work
- USB-C Power Plug
- A Socotel S63 with keypad (Other models probably will work too, but that's what I used)
Note that you are expected to have wires and stuff like that, no need for a speaker as we reuse the one in the original phone.
-
Install a bare Raspberry Pi OS lite.
-
Do the initial setup through raspi-config (setup wifi, enable ssh, ...)
-
Install the required software
$ sudo apt update
$ sudo apt install mpg123 alsa-utils util-linux
- Configure Alsa properly
You need to setup alsa (through
.asoundrc) to use your USB audio input and output without any other configuration.
To test that everything is ok you can use the following commands:
$ mpg123 -o alsa <filename> # Play an MP3 file that you need to head in your handset
$ arecord -r 16000 -c 1 -f S16_LE -t wav <filename> # Record a test file that should be picked up from the handset's microphoneThose are the exact commands the software will use (unless you manually decide to change them). If those work, PartyHall Phonebooth will work.
- Set up the config file (
/etc/partyhall/phonebooth.jsonc)
Since you can replicate the files through the output_folders, you might want to setup USB keys that get the backups.
/!\ CAUTION /!: If you format your USB key, the UUID will change and you'll need to update the fstab accordingly. For now there's no config UI so you have to do this manually, I hope that at some point I can provide an admin panel to set this up properly.
Please ensure your USB key is formatted as FAT32 so that it works everywhere. It is not mandatory if you know what you're doing but for most people that's the best way to do it.
First, plug the usb key in your RPi and use the blkid command (from the dosfstools package):
$ sudo blkid
/dev/sdb1: UUID="3ED9-F1F7" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="6cad8aba-7cd1-48b2-9919-4dd22b6a42c3"In this example, my USB key is 3ED9-F1F7.
Let's edit /etc/fstab so that our usb key is mounted on startup:
[...]
UUID=3ED9-F1F7 /mnt/usb vfat rw,user,nofail,sync,uid=1000,gid=1000,umask=022 0 0
Don't forget to make the mount folder:
$ sudo mkdir /mnt/usb
$ sudo chown -R USER:USER /mnt/usb # replacer USER with the username you chose for the OSThen we're good. To apply changes directly you can do:
$ sudo systemctl daemon-reload
$ sudo mount -aIf you set subfolders, those will NOT be created automatically so please ensure the paths exists.
Like all other PartyHall software,
For now, until I get things ready and have the time to work on everything I want, consider everything in this organization ALL RIGHT RESERVED. You have the right to use this software at your own risks and I can not be held responsible for anything. It WILL have a proper license in the future.
This is an early in-dev software that might break at any time.
{ "phonebooth": { "hangup_pin": 21, // The pin that your handset is plugged into "delay_before_play": 2, // The amount of seconds between picking the handset and starting to play the pickup mp3 "inverted": false, // Mostly for debug, set to false if you want to use a normally open button instead of a normally closed one "max_recording_duration": 10, // Maximum recording duration in seconds "playback_command": [ // Optional, this is the default value. "mpg123", "-o", "alsa", "{{FILENAME}}", ], "record_ext": "wav", // The recording's file extension "record_command": [ // Optional, this is the default value. "arecord", "-r", "16000", "-c", "1", "-f", "S16_LE", "-t", "wav", "{{FILENAME}}", ], "sounds": { "pickup": "pickup.mp3", // Sound played when the handset is picked up "recording_too_long": "recordingTooLong.mp3", // Sound played in loop when the recording exceed the max duration allowed }, "output_folders": [ // List of folders where to save the stuff // Since this software is built for a wedding I want to be EXTRA CAREFUL // Which means if the SD card somehow gets fried I want to ensure that // we don't loose anything // Every folder in this list will have a copy of the recorded files // The first one is the "main one" where the recording is first saved // The other ones are replicas "/home/oxodao/phonebooth/recordings", "/mnt/usb1/recordings", ], }, }