This is a python server that is running on a pi zero.

I used a USB sound card and got a TRS cable to plug into the output of my digital piano into the microphone port of the USB sound card. Then, plugged the sound card into the micro-USB port of the zero.
Setup cost:
- Pi-zero dev kit (include case and power bank): $35
- USB Sound card: $14
- 1/4" male to 1/8" male TRS cable: $10
- USB Female to microUSB male: $5
Total setup cost: $65 + taxes
With this script I can start a recording and stop it manually and download the FLAC files to my computer. (Screenshot says WAV but I changed the script afterwards).
Enjoy!
Note: the script was 90% written by Chat-GPT with a few prompts for it to fix the script itself. Neat!
Notice: I am not responsible for anything that might happen to you, run this very janky and unprotected script at your own risk.
Copyright: Public domain.