Skip to content

Hrishi2861/YourCarTalks

Repository files navigation

YourCarTalks Logo

YourCarTalks

Your car greets you back. Every time you drive.

Kotlin Android Android Auto API License


YourCarTalks is an Android app that plays a personalized greeting through your car's speakers every time you connect to Android Auto. Add your car name and driver name — it randomly picks one each drive. Choose from system TTS or offline AI voices.


✨ Features

🎙️ Smart Greeting

Hear "Hello Hrishi. Your car is ready for launch." or "Beast is ready for launch." — randomly picks your name or car's name each drive. 20 handcrafted messages keep it fresh.

🔌 Silent Detection

Uses Android Auto's CarConnection API. No icon appears in Android Auto's app drawer — it's purely phone-side.

🔋 Battery Friendly

Foreground service with minimal notification (only visible when connected to Android Auto). Won't get killed by the OS.

🧠 Offline AI Voices

Download Sherpa-ONNX TTS models for fully offline speech synthesis. Male and Female voices available.

🎨 Theme Support

Choose between Light, Dark, or System-default theme. The app follows your preference across the UI.

💬 Custom Greetings

Pick from 20 messages across 5 categories (Performance, Racing, Sci-Fi, Attitude, Time-Based). Or let it surprise you with Random mode.

🚀 Start on Boot

Automatically resumes after device reboot — set it and forget it.


🎯 How It Works

┌─────────────────────────────────────────────────┐
│          Phone connects to Android Auto         │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│     CarConnection emits CONNECTION_TYPE_        │
│               PROJECTION                        │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│      GreetingService (foreground) detects it    │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│     2-second delay (audio routing stabilizes)   │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│   TTS greets with random name + message         │
│   "Hello {name}. {message}" / "{car} {message}" │
│   (System / Sherpa-ONNX Male/Female / Kokoro)   │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│        Audio plays through car speakers         │
│              ✦ Welcome to Your Tesla ✦          │
└─────────────────────────────────────────────────┘

🎙️ TTS Engines

Engine Online Required Quality Details
System TTS No Device-dependent Uses your phone's built-in TTS engine (Google, Samsung, etc.)
Sherpa-ONNX Male Download once High Offline AI voice — English male. ~80 MB download
Sherpa-ONNX Female Download once High Offline AI voice — English female. ~80 MB download
Kokoro British Female Download once High Offline AI voice — English British female (Isabella). ~330 MB download

All engines include a Test button in Settings so you can preview before driving.


🛡️ Permissions

Permission Purpose
FOREGROUND_SERVICE + FOREGROUND_SERVICE_CONNECTED_DEVICE Keep the connection monitor alive in the background
POST_NOTIFICATIONS (Android 13+) Foreground service notification (only while connected to AA)
BLUETOOTH_CONNECT (Android 12+) Required for connectedDevice foreground service type on Android 14+
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS Prevent the OS from killing the background service
RECEIVE_BOOT_COMPLETED Restart the service after device reboot

All permissions are requested during the first-launch setup wizard with clear explanations.


🚀 Getting Started

Prerequisites

  • Android phone with Android 10+ (API 29)
  • Android Auto set up on your phone and car
  • A connected device or emulator for testing

Build & Install

# Clone
git clone https://github.com/Hrishi2861/YourCarTalks.git
cd YourCarTalks

# Build
./gradlew assembleDebug

# Install
adb install -r app/build/outputs/apk/debug/app-arm64-v8a-debug.apk

First Run

  1. Open the app
  2. Enter your car's name (and optionally your driver name)
  3. Follow the setup wizard to grant permissions (battery, auto-start, notification, bluetooth)
  4. Choose your preferred theme, TTS engine, and greeting style
  5. That's it! Connect to Android Auto and hear your greeting 🎉

🧰 Tech Stack

Language Kotlin
UI Jetpack Compose + Material 3
Car API androidx.car.app:app (CarConnection only)
Architecture Single-activity + Lifecycle-aware Foreground Service
Persistence Jetpack DataStore (Preferences)
Offline TTS Sherpa-ONNX
Min SDK API 29 (Android 10)
Target SDK API 34

📄 License


Made with ❤️ for everyone who talks to their car

About

An Android app that greets you by your car's name every time you connect to Android Auto — with offline AI voices powered by Sherpa-ONNX and Kokoro TTS.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages