How stypox/dicio-android works
Project type and purpose
• This is a multi-module Android application (“Dicio assistant”) that works entirely on-device as a privacy-focused voice assistant.
• Modules:
• app: the Android UI, DI setup, input/output wiring, ViewModels, Compose screens.
• skill: a Kotlin library defining the generic “Skill” abstraction, matching/evaluation engine and standard constructs.
• sentences-compiler-plugin: a Gradle compiler plugin that processes YAML sentence definitions at compile time to generate type-safe code for sentence matching.
File structure
• Top-level:
• app/: Android Studio Gradle module (build.gradle.kts).
• skill/: plain Kotlin/Android library module with its own AndroidManifest (needed for instrumentation).
• sentences-compiler-plugin/: a Gradle plugin project that reads app/src/main/sentences and generates code.
• fastlane/: CI & Play/F-Droid release metadata and screenshots.
• app/src/main/kotlin/org/stypox/dicio/:
• di/: manual dependency-injection modules for network, locale, hardware wrappers (wake, STT, TTS).
• io/: input (wake-word, STT via Vosk or Android Speech, external popup), speech output, wake service.
• eval/: orchestration of skills (SkillEvaluator, SkillHandler), ranking and context.
• skills/: concrete skill implementations grouped by feature (weather, search, calculator,…).
• settings/, ui/, util/, error/: MVVM ViewModels, Compose UI, error screens, utilities.
• Protobufs under app/src/main/proto drive serialization of settings, language, theme, I/O device enums.
Key architecture insights from README
• On-device STT via Vosk, on-device TTS via Android TTS or fallback.
• Plug-in “skills” system: each skill provides sentences (YAML → compiler plugin → sealed classes), a SkillInfo object, a concrete Skill class (score + generateOutput), and a SkillOutput with both speech text and @Composable UI.
• Network calls for DuckDuckGo, OpenWeatherMap, Genius.
Essential details
• DI container feeding NetworkModule, LocaleManager, Device wrappers into core engine and skills
• Proto layer as configuration driving language, theme, settings serialization