Build an Offline Gemma Translator
Google Creative Lab's open-source prototype runs speech recognition, Gemma 4 E2B translation and speech synthesis on a Raspberry Pi 5, with no network required after setup.
The 60-second version
Google Creative Lab released a buildable Raspberry Pi voice translator whose recognition, Gemma translation and speech output all run locally after setup.
Key points
- The current implementation uses Gemma 4 E2B through LiteRT-LM, correcting early E4B coverage.
- The reference build needs a Raspberry Pi 5 with 8 GB RAM, local audio hardware, a display and at least 6 GB of free storage for model setup.
- The complete bundled voice path supports Arabic, English, Spanish, Japanese, Chinese and Korean.
- Code, setup scripts and enclosure STL files are open under Apache 2.0, but the project is not an officially supported Google product.
- No accuracy, latency, power or battery benchmark has been published, so critical translations still need verification.
Verdict. It is a convincing offline edge-AI reference build, not evidence that a Raspberry Pi now replaces a professional interpreter or mature cloud translator.
The short versionA complete voice pipeline runs on one Pi
The project turns a Raspberry Pi 5 into a two-person voice translator. Once models and dependencies are downloaded, speech recognition, translation and speech synthesis run locally without a network request.
The useful part is not merely that Gemma can translate text. The repository packages the full chain: microphone input, local transcription, Gemma inference, local voice output, a compact interface, deployment scripts and printable enclosure files.
ArchitectureThree local models do different jobs
| 1. Speech to text | Moonshine transcribes microphone audio locally for the selected source language. |
|---|---|
| 2. Translation | LiteRT-LM runs the instruction-tuned Gemma 4 E2B model on the Raspberry Pi CPU. |
| 3. Text to speech | moonshine-voice synthesizes the translated text using a local language-specific voice. |
| Interface | A React kiosk presents two language lanes and coordinates push-to-talk, translation and playback. |
Supported speechThe bundled pipeline has six languages
The checked-in frontend and backend map Arabic, English, Spanish, Japanese, Chinese and Korean across recognition and voice output. Gemma may know additional languages, but the complete voice product only works when STT and TTS also support the pair.
HardwareWhat the reference build requires
| Compute | Raspberry Pi 5 with 8 GB RAM. |
|---|---|
| Audio input | A microphone or USB audio capture interface. |
| Audio output | A speaker, headphones or another supported output device. |
| Display | A monitor or small touchscreen, with the interface designed for roughly 480 × 320. |
| Enclosure | Optional STL files are included for a 3D-printed case. |
| Storage | The downloader expects about 2.6 GB for the download and another 2.6 GB for the imported model, then requires at least 6 GB free. |
Build pathFrom repository to kiosk
- 1. Clone `google-gemma/gemma-translator` on Linux, macOS or the Raspberry Pi.
- 2. Make `setup.sh`, `download_model.sh`, `start.sh` and `deploy-pi.sh` executable.
- 3. Run `./setup.sh` to create the Python environment and install Node and application dependencies.
- 4. Run `./download_model.sh` while online to download and import Gemma 4 E2B into LiteRT-LM.
- 5. Use `./start.sh` for development, or `./deploy-pi.sh` to build a systemd-backed Chromium kiosk on Raspberry Pi OS or Debian.
The current interface is keyboard-driven. In landscape mode, Space switches the active speaker, Z is push-to-talk and the arrow keys rotate languages. Vertical mode gives each speaker a separate set of keys. Physical buttons and a rotary controller can map to those inputs, but touch recording controls are not enabled in the current frontend.
Why offline mattersUseful without pretending it is magic
| Connectivity | Normal translation can continue after setup without Wi-Fi or cellular service. |
|---|---|
| Data path | Audio, transcript, translation and synthesized speech stay in the local stack during ordinary use. |
| Cost | There is no per-request cloud inference charge after the hardware and model are installed. |
| Trade-off | The device is larger, uses more power and may be slower or less accurate than a cloud service. |
| Maintenance | The owner must update dependencies, secure the device and manage physical access and any local logs. |
Evidence limitsA demo is not a benchmark
Test every target language pair, speaker accent and noise environment before relying on it. Names, numbers, medical directions, legal terms and emergency instructions should always be repeated or independently checked.
The practical takeaway: this is a strong edge-AI reference design and a buildable travel or field-work tool, but it remains a maker project. Use the source code as a platform, not the demo video as a quality guarantee.