| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Android AI Assistant is a graduation project that converts spoken commands into structured Android actions. The system combines Android SpeechRecognizer, a FastAPI backend, deterministic command rules, an XLM-RoBERTa intent classifier, validation and parameter enrichment, and Android Accessibility/System APIs.
The application supports English, Turkish, and Arabic, including an RTL-aware Arabic interface. It is designed primarily for hands-busy scenarios and users with limited physical mobility. Initial installation and system-permission setup still require manual interaction and may require assistance.
A separate demo page is available for previewing the main app workflows. It includes three short demos that can be viewed interactively. GitHub README files do not run JavaScript, so the interactive preview is hosted on GitHub Pages.
Open the interactive demo gallery
![]() Home |
![]() Permissions |
![]() Custom Commands |
![]() Guide |
![]() Settings |
![]() Dynamic Selection |
flowchart LR
A[Android SpeechRecognizer] --> B[FastAPI Backend]
B --> C{Deterministic rule matched?}
C -->|Yes| D[Rule Engine]
C -->|No| E[XLM-RoBERTa Classifier]
D --> F[Validation and Enrichment]
E --> F
F --> G[Android Command Executor]
G --> H[Accessibility and System APIs]
B <--> I[(PostgreSQL)]
B <--> J[(Redis Cache)]
The multilingual classifier was fine-tuned from FacebookAI/xlm-roberta-base using 58 classification labels.
| Metric | Validation | Test |
|---|---|---|
| Accuracy | 95.87% | 93.45% |
| Macro F1 | 95.08% | 90.93% |
| Intent accuracy | 97.49% | 94.31% |
| Layer | Technologies |
|---|---|
| Android client | Java, Android SDK, AccessibilityService, SpeechRecognizer, Retrofit |
| Backend | Python, FastAPI, PyTorch, Hugging Face Transformers |
| NLP | XLM-RoBERTa, rule engine, parameter extraction, validation/enrichment |
| Data | PostgreSQL, Redis |
| Languages | English, Turkish, Arabic |
Android_AI_Assistant/
|-- project/
| |-- Android_App/ # Android client and command execution
| |-- Backend/V3/ # FastAPI, NLP pipeline, database, and cache
| |-- Machine Learning Model/ # Dataset and model training scripts
|-- assets/ # README screenshots and demo GIFs
|-- demo/ # GitHub Pages interactive demo gallery
|-- docs/ # Thesis and presentation files
|-- README.md
git clone https://github.com/SE-ABOSALIM/Android_AI_Assistant.git
cd Android_AI_AssistantThe trained model is not stored in Git because of its size. Download the complete model bundle and place it under:
project/Backend/V3/models/result_model/
The directory must contain model.safetensors, tokenizer files, and model configuration files.
Model download: Google Drive link
cd project/Backend
pip install pipenv
pipenv syncCopy the example environment file:
Copy-Item V3/.env.example V3/.envUpdate V3/.env with your local PostgreSQL credentials and Redis URL. Apply the SQL migrations in numerical order:
$env:PSQL_DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@localhost:5432/android-ai-assistant"
Get-ChildItem V3/database/migrations/*.sql |
Sort-Object Name |
ForEach-Object { psql $env:PSQL_DATABASE_URL -f $_.FullName }pipenv run python -m uvicorn V3.main:app --host 0.0.0.0 --port 8001API documentation is available at http://localhost:8001/docs.
cd ../Android_App
Copy-Item local.properties.example local.propertiesEdit local.properties:
sdk.dir=C\:\\Users\\YOUR_USER\\AppData\\Local\\Android\\Sdk
backend.baseUrl=http://YOUR_COMPUTER_LAN_IP:8001/A physical phone cannot reach the computer backend through localhost; use the computer's LAN IP and keep both devices on the same network. Open project/Android_App in Android Studio, build the app, then grant the requested runtime and advanced Android permissions from the Permissions screen.
# Android unit tests
cd project/Android_App
.\gradlew.bat :app:testDebugUnitTest
# Backend tests
cd ../Backend
pipenv run python -m unittest discover V3.testsCurrent verification status: Android unit tests pass, and the backend unittest suite passes with 120 tests. The backend suite covers rule parsing, validation, app-catalog matching, and intent-contract checks.
Muhammed Chreiki
Software Engineering, Istanbul Topkapi University
GitHub
| Back | FazBrowse Home | New Git URL |