Skip to content

Community examples: Pomodoro + Bible (WEB reader + offline Piper listen) #145

Description

@michaelp91-dev

Summary

Two complete community example tools built on light-sdk, ready for the team to inspect:

  1. Pomodoro (examples/pomodoro) — focus / break timer with settings, auto-start, session continuity, and chime
  2. Bible (examples/bible) — World English Bible (WEB, public domain) reader with reference search and offline Piper listen mode

Branch (on my fork once published): examples/pomodoro-and-bible

I would like to open a PR adding these under examples/ if that is welcome. Happy to split SDK helpers vs examples if preferred.

Pomodoro

  • Work / break cycles with labels and auto-advance
  • Timer continues while changing settings
  • Reset vs restart-all, preferences via DataStore
  • Optional chime via LightAudioVoice
  • Unit tests for models
./gradlew :examples:pomodoro:installDebug
adb shell am start -n com.thelightphone.pomodoro/com.thelightphone.sdk.LightActivity

Bible

  • Full 66-book WEB text bundled offline (assets/bible/web.json)
  • OT / NT lists → chapter picker → verse reader
  • Search: John → chapters, John 3 → chapter, John 3:16 → chapter with verse at top
  • Listen: offline Piper (en_US-amy-low via sherpa-onnx), chapter title announcement, body-only speech, follow-along highlight, ±5% speed controls
  • System TTS fallback if Piper fails to load
  • Unit tests for reference parsing and models
./gradlew :examples:bible:installDebug
adb shell am start -n com.thelightphone.bible/com.thelightphone.sdk.LightActivity

Size / native notes (for reviewers)

  • Bible APK is large (~90MB debug) because of Piper voice zip + arm64 native libs
  • jniLibs currently arm64-v8a only
  • Voice: Piper en_US-amy-low int8; runtime sherpa-onnx JNI

Small SDK / plugin additions (used by Bible listen)

Change Why
LightTextToSpeech Optional system-TTS fallback (sandbox-friendly wrapper)
LightAudioPcmPlayer Stream Piper PCM with audio focus
Manifest <queries> for TTS_SERVICE Package visibility so engines can be discovered
SealedLightContext.appContext Documented app context for audio/TTS helpers

If you want examples only, these SDK bits can be discussed / pared separately.

Ask

Would the Light team welcome a PR that adds examples/pomodoro and examples/bible (plus the small TTS/PCM helpers)?

Per CONTRIBUTING I’m opening this issue first and will wait for a green light before filing the PR.

Thanks for building the SDK — happy to adjust packaging, size, or API surface based on feedback.

Branch for inspection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions