Architecture
The shared reading core, the backend and the cloud services behind it.
The station, the laptop reader and the phone app share one reading core and one backend. The same code serves all three.
Parts
- A Python reading core: an OpenCV page check, stillness and page-turn detection, and button handling on the station.
- One FastAPI backend that holds the cloud keys and caches results, so keys never sit on a device.
- Five cloud services: text recognition, translation, speech to text, text to speech, and a language model for summaries and answers.
- An Android app built with Flutter.
- On-phone object finding with a small pretrained detector, so it works without the internet.
- Git for version control, and a shared task board for two-week sprints.
Services under evaluation
No choice is final. We are testing options on real pages and voices, using free tiers, and will publish the results.
| Task | Options being tested |
|---|---|
| Text recognition | Tesseract (free), Surya OCR, cloud OCR services, and large vision-language models |
| Translation | Google Cloud Translation (Sinhala code si) |
| Speech to text | Google Speech-to-Text (si-LK) |
| Text to speech | Azure neural Sinhala voices (si-LK), with speed and pause control; other Sinhala voices in preview |
| Object finding | Small pretrained detectors such as YOLO nano or MediaPipe |
Camera sharpness
How sharp small print looks depends on the pixels the camera puts on the page. On an A4 page, a 1080p webcam gives about 92 pixels per inch, which is too soft for small print. A 4K camera gives about 185 and a 12 MP camera about 260. We are aiming for a 4K or 12 MP autofocus camera.
| Camera | Approximate pixels per inch on A4 |
|---|---|
| 1080p webcam | 92 |
| 4K camera | 185 |
| 12 MP camera | 260 |
Hardware approach
We build and test everything in software first, on a laptop and webcam, before ordering hardware. The same code can then move to a Raspberry Pi. A Pi Zero 2 W may be enough because the heavy work happens in the cloud; we will measure memory use and page-check time and move to a Pi 4 only if it falls short.