Skip to main content
This guide covers deploying the Humain Kiosk C library on a Raspberry Pi running Raspberry Pi OS (64-bit, Bookworm or later). By the end you will have a persistent voice-enabled kiosk service running under systemd, with auto-reconnect on network failure. For audio hardware recommendations — USB microphones, I²S HATs, and speaker amplifiers — see the Audio hardware guide.
1

Install dependencies

Update the package list and install the core build tools and libcurl:
For voice sessions, also install the WebRTC and audio dependencies:
2

Clone and build the library

Build with text sessions only (minimal, no voice dependencies required):
Or build with voice and the built-in ALSA helper:
Verify the install:
3

Store your credential securely

Write the credential to a root-readable environment file:
The credential is shown only once in the admin panel. Store it immediately. If lost, revoke it and issue a new one — do not share credentials across devices.
4

Create your kiosk application

Write a minimal kiosk app that reads voice input from ALSA and streams responses:
Compile and install the binary:
5

Create a systemd service

Create /etc/systemd/system/humain-kiosk.service:
Enable and start:
View live logs:

The library retries transient network errors automatically (up to max_retries times with exponential back-off). For persistent failure — e.g., the Pi loses Wi-Fi for more than 90 seconds — the systemd Restart=on-failure directive relaunches the process.For more resilient applications, add an explicit reconnect loop:
Call open_with_retry() both on startup and whenever kiosk_session_message() or kiosk_session_stream() returns KIOSK_ERR_NETWORK, KIOSK_ERR_TIMEOUT, or KIOSK_ERR_SESSION_ENDED.
Requires the library built with -DKIOSK_WITH_VOICE=ON -DKIOSK_WITH_ALSA=ON and the voice dependencies installed (see step 1).
Compile and run: