Skip to content

indra057/Zesty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Zesty Icon Zesty - Voice-Assisted Culinary Companion

Zesty Logo

A sophisticated Android cooking application that combines offline recipe management with voice-assisted cooking features. Zesty provides hands-free cooking guidance through advanced machine learning-powered voice recognition and offers access to over 6000+ Indian recipes offline.

๐ŸŽฌ Demo Video

Zesty App Demo

Watch Zesty in action - Voice-assisted cooking with 6000+ offline recipes

๐Ÿ“บ Detailed Walkthrough

For a comprehensive walkthrough of all features and voice-assisted cooking capabilities:

Zesty App Walkthrough

๐ŸŽฅ Complete App Walkthrough - Detailed demonstration of voice commands, recipe search, and cooking mode

โ–ถ๏ธ Watch on YouTube

๐Ÿ“ฑ Application Screenshots

๐Ÿ“ฑ View All Screenshots

Click to see detailed screenshots of all app screens

๐Ÿ“ฑ Features

๐ŸŽฏ Core Features

  • Voice-Assisted Cooking: Hands-free recipe navigation using ML-powered voice commands
  • Offline Recipe Database: 6000+ Indian recipes accessible without internet
  • Smart Recipe Search: Advanced fuzzy search with ingredient-based filtering
  • Recipe Management: Favorites, shopping lists, and personal ingredient tracking
  • Cooking Timer: Voice-controlled timer with step-by-step guidance
  • YouTube Integration: Video tutorials for recipes
  • Modern UI: Beautiful Material Design 3 interface with smooth animations

๐Ÿง  AI-Powered Features

  • Intent Classification: ML model trained to understand cooking voice commands
  • Speech Processing: Real-time voice command processing and execution
  • Smart Search: Fuzzy matching and ingredient-based recipe discovery
  • Text-to-Speech: Audio feedback for cooking instructions

๐Ÿ—๏ธ Architecture Overview

Application Flow Diagram

graph TB
    A[User Opens App] --> B[Splash Screen]
    B --> C[Home Screen]
    C --> D{User Action}
    
    D -->|Voice Command| E[Speech Recognition]
    D -->|Text Search| F[Search Input]
    D -->|Browse| G[Recipe Categories]
    
    E --> H[Intent Classification]
    H --> I{Command Type}
    
    I -->|Search Recipe| J[Local Recipe Search]
    I -->|Timer Command| K[Cooking Timer]
    I -->|Navigation| L[Step Navigation]
    I -->|Show Ingredients| M[Ingredient Display]
    
    J --> N{Local Results?}
    N -->|Yes| O[Display Local Recipes]
    N -->|No| P[TheMealDB API]
    P --> Q[Display Online Recipes]
    
    F --> J
    G --> J
    
    O --> R[Recipe Detail Screen]
    Q --> R
    
    R --> S[Cooking Mode]
    S --> T[Voice-Guided Steps]
    T --> U[Timer Management]
    U --> V[Step Navigation]
    V --> T
    
    R --> W[Add to Favorites]
    R --> X[Add to Shopping List]
    R --> Y[Share Recipe]
Loading

Data Flow Architecture

graph LR
    A[User Voice Input] --> B[SpeechHelper]
    B --> C[IntentClassifier]
    C --> D[SpeechProcessor]
    D --> E[Command Execution]
    
    F[Recipe Search] --> G[LocalRecipeHelper]
    G --> H[Offline Database]
    G --> I[Fuzzy Search Engine]
    
    J[Online Fallback] --> K[TheMealDB API]
    K --> L[Recipe Conversion]
    L --> M[Display Results]
    
    N[User Actions] --> O[Room Database]
    O --> P[Favorites]
    O --> Q[Shopping List]
    O --> R[User Ingredients]
Loading

๐Ÿ“ Project Structure

๐ŸŽฏ Core Application Files

Main Application

  • MainActivity.kt - Entry point with global error handling
  • ZestyApplication.kt - Application class with dependency injection
  • AndroidManifest.xml - Permissions and app configuration

Navigation & UI

  • NavGraph.kt - Navigation structure with bottom bar
  • HomeScreen.kt - Main dashboard with voice search
  • RecipeDetailScreen.kt - Detailed recipe view with cooking mode
  • FavoritesScreen.kt - Saved recipes management
  • ShoppingListScreen.kt - Shopping list functionality
  • MyIngredientsScreen.kt - Personal ingredient tracking & detailed ingredient search

Data Layer

  • Models.kt - Core data models (Recipe, Ingredient, etc.)
  • ZestyDatabase.kt - Room database configuration
  • ZestyDao.kt - Database access methods
  • FavoritesRepository.kt - Repository pattern implementation

ViewModels

  • HomeViewModel.kt - Home screen state management
  • RecipeViewModel.kt - Recipe detail and cooking state
  • FavoritesViewModel.kt - Favorites management
  • ShoppingListViewModel.kt - Shopping list operations
  • MyIngredientsViewModel.kt - Ingredient management

๐Ÿค– AI & Voice Processing

Voice Recognition System

  • SpeechHelper.kt - Android Speech Recognition integration
  • SpeechProcessor.kt - Voice command processing and intent extraction
  • IntentClassifier.kt - ML model for command classification
  • TTSHelper.kt - Text-to-speech functionality

Machine Learning Model

  • model.tflite - Trained TensorFlow Lite model for intent classification
  • labels.txt - Command labels for the ML model
  • tflite_voice_training_model.ipynb - Jupyter notebook for model training

๐Ÿฝ๏ธ Recipe Management

Offline Recipe System

  • LocalRecipeHelper.kt - Offline recipe search and management
  • recipes.json - 6000+ Indian recipes database

Online Recipe Integration

  • TheMealDBHelper.kt - TheMealDB API integration
  • TheMealDBModels.kt - API response models
  • NetworkHelper.kt - Network connectivity management

๐Ÿ› ๏ธ Utilities & Helpers

Core Utilities

  • Constants.kt - Application constants
  • Extensions.kt - Kotlin extension functions
  • RecipeRepository.kt - In-memory recipe storage
  • MicButton.kt - Custom microphone button component

Specialized Helpers

  • ImageCacheHelper.kt - Image loading and caching
  • RecipeStepParser.kt - Recipe instruction parsing
  • SearchPerformanceHelper.kt - Search optimization
  • TimerWorker.kt - Background timer management
  • YouTubeAPIHelper.kt - YouTube video integration

๐Ÿง  Machine Learning Implementation

Voice Command Classification

The application uses a custom-trained TensorFlow Lite model for voice command classification:

Model Architecture

  • Input: Text strings (voice commands)
  • Architecture: Bidirectional LSTM with Global Max Pooling
  • Output: Intent classification (5 main intents)
  • Accuracy: 95%+ on test data

Supported Voice Commands

search_recipe    - "I want to make biryani"
set_timer        - "Set timer for 10 minutes"
show_ingredients - "Show me the ingredients"
next_step        - "Next step"
previous_step    - "Go back"

Training Process

The model was trained using Google Colab with the following approach:

  1. Data Collection: 794 voice command samples across 5 intent categories
  2. Preprocessing: Text normalization and tokenization
  3. Model Training: BiLSTM with embedding layer and dropout
  4. Optimization: Early stopping and learning rate reduction
  5. Export: TensorFlow Lite conversion for mobile deployment

Model Performance

  • Training Accuracy: 95%+
  • Validation Accuracy: 93%+
  • Model Size: ~2MB (optimized for mobile)
  • Inference Time: <100ms on average Android device

๐Ÿฝ๏ธ Recipe Database System

Offline Recipe Management

Zesty includes a comprehensive offline recipe database with 6000+ Indian recipes:

Dataset Source

  • Original Dataset: Kaggle Indian Recipes Dataset
  • Processing: Custom Python scripts for data cleaning and image URL updates
  • Format: JSON with structured recipe data

Data Processing Pipeline

graph LR
    A[Kaggle Dataset] --> B[python_image_gen.py]
    B --> C[Updated CSV]
    C --> D[python_to_json.py]
    D --> E[recipes.json]
    E --> F[Android Assets]
    F --> G[LocalRecipeHelper]
Loading

Recipe Data Structure

{
    "RecipeName": "masala karela recipe",
    "TotalTimeInMins": 45,
    "Instructions": ["Step 1", "Step 2", ...],
    "Ingredients": ["salt", "onion", ...],
    "image-url": "https://...",
    "Ingredient-count": 10,
    "matched_page_url": "https://..."
}

Search Capabilities

  • Fuzzy Search: Levenshtein distance-based matching
  • Ingredient Matching: Find recipes by available ingredients
  • Title Search: Exact and partial title matching
  • Performance: Sub-100ms search times with caching

Online Recipe Fallback

When offline recipes don't match user queries, the app falls back to TheMealDB API:

API Integration

  • Base URL: https://www.themealdb.com/
  • Endpoints: Search, random recipes, recipe details
  • Fallback Strategy: Local first, then online
  • Caching: Search results cached for performance

๐ŸŽค Voice-Assisted Cooking Flow

Voice Command Processing Pipeline

sequenceDiagram
    participant U as User
    participant SH as SpeechHelper
    participant IC as IntentClassifier
    participant SP as SpeechProcessor
    participant VM as ViewModel
    participant TTS as TTSHelper
    
    U->>SH: Voice Command
    SH->>IC: Text Input
    IC->>SP: Intent Classification
    SP->>VM: Processed Command
    VM->>TTS: Audio Feedback
    TTS->>U: Spoken Response
Loading

Cooking Mode Features

Step-by-Step Guidance

  • Voice-controlled navigation between recipe steps
  • Audio feedback for each cooking instruction
  • Timer integration for timed cooking steps
  • Hands-free operation during cooking

Timer Management

  • Voice-activated timer setting
  • Background timer with notifications
  • Step-specific timing recommendations
  • Timer pause/resume functionality

๐Ÿ› ๏ธ Technical Implementation

Architecture Patterns

MVVM Architecture

  • Model: Data classes and Room entities
  • View: Jetpack Compose UI components
  • ViewModel: State management with StateFlow
  • Repository: Data access abstraction

Dependency Injection

  • Manual dependency injection through Application class
  • Repository pattern for data access
  • Factory pattern for ViewModel creation

Key Technologies

Android Technologies

  • UI: Jetpack Compose with Material Design 3
  • Navigation: Navigation Compose
  • Database: Room with TypeConverters
  • Networking: Retrofit with Gson
  • Background Tasks: WorkManager
  • Image Loading: Coil with GIF support

Machine Learning

  • Framework: TensorFlow Lite
  • Model: Custom BiLSTM (Bidirectional Long Short Memory) for intent classification
  • Delegates: Flex Delegate for enhanced operations
  • Performance: Optimized for mobile inference

Voice Processing

  • Recognition: Android Speech Recognition API
  • TTS: Android Text-to-Speech API
  • Processing: Custom intent extraction algorithms

Performance Optimizations

Search Performance

  • Caching: Multi-level search result caching
  • Indexing: Pre-built search indices for fast lookups
  • Fuzzy Matching: Optimized Levenshtein distance implementation
  • Background Processing: Async search operations

Memory Management

  • Image Caching: Efficient image loading with Coil
  • Database Optimization: Room with proper indexing
  • State Management: Efficient StateFlow usage
  • Resource Cleanup: Proper lifecycle management

๐Ÿ“ฑ User Interface Design

Design System

Material Design 3

  • Color Scheme: Custom color palette with dynamic theming
  • Typography: Material Design typography scale
  • Components: Custom components with consistent styling
  • Animations: Smooth transitions and micro-interactions

Key UI Components

  • MicButton: Custom animated microphone button
  • CollapsibleHeader: Dynamic header with search functionality
  • RecipeCard: Consistent recipe display cards
  • CustomNavigationBar: Animated bottom navigation

Screen Layouts

Home Screen

  • Featured recipe carousel
  • Voice search interface
  • Suggested recipes grid
  • Quick access to favorites

Recipe Detail Screen

  • Full-screen recipe images
  • Step-by-step cooking instructions
  • Voice control interface
  • Timer and navigation controls

Cooking Mode

  • Hands-free operation
  • Voice feedback
  • Timer integration
  • Step navigation

๐Ÿ”ง Setup & Installation

Prerequisites

  • Android Studio Arctic Fox or later
  • Android SDK 26+ (Android 8.0+)
  • Kotlin 2.0.0+
  • Gradle 8.4.2+

Installation Steps

  1. Clone the Repository

    git clone https://github.com/indra057/zesty.git
    cd zesty
  2. Configure API Keys

    • Create local.properties file in project root
    • Add your YouTube API key:
      YOUTUBE_API_KEY=your_youtube_api_key_here
  3. Build and Run

    ./gradlew assembleDebug

Required Permissions

The app requires the following permissions:

  • RECORD_AUDIO - For voice recognition
  • INTERNET - For online recipe fetching
  • ACCESS_NETWORK_STATE - For network status checking
  • POST_NOTIFICATIONS - For timer notifications

๐Ÿงช Testing

Test Coverage

  • Unit Tests: ViewModel and utility function testing
  • Integration Tests: Database and API integration testing
  • UI Tests: Compose UI component testing
  • Voice Tests: Speech recognition accuracy testing

Running Tests

# Unit tests
./gradlew test

# Instrumented tests
./gradlew connectedAndroidTest

# All tests
./gradlew check

๐Ÿš€ Performance Metrics

App Performance

  • Cold Start: <2 seconds
  • Search Response: <100ms average
  • Voice Recognition: <500ms average
  • Memory Usage: <150MB typical
  • Battery Impact: Minimal with optimized background tasks

ML Model Performance

  • Model Size: 2MB
  • Inference Time: <100ms
  • Accuracy: 95%+ on test data
  • Memory Usage: <10MB during inference

๐Ÿ”ฎ Future Enhancements

Planned Features

  • Multi-language Support: Hindi and regional language support
  • Recipe Recommendations: AI-powered recipe suggestions
  • Nutritional Analysis: Calorie and nutrition tracking
  • Social Features: Recipe sharing and community
  • Offline Video: Cached cooking videos
  • Smart Shopping: AI-powered shopping list optimization

Technical Improvements

  • Model Updates: Continuous ML model improvements
  • Performance: Further optimization for low-end devices
  • Accessibility: Enhanced accessibility features
  • Testing: Expanded test coverage
  • Documentation: API documentation and developer guides

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

Code Style

  • Follow Kotlin coding conventions
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Maintain consistent formatting

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support

For support, questions, or feature requests:


๐Ÿ“ฑ Application Screenshots {#application-screenshots}

Experience the complete Zesty cooking journey through our intuitive interface:

Splash Screen

Splash

Home Screen

Home

Search Screen

Search

Search Results

Results

Recipe Ingredients Screen

Ingredients

Recipe Detail Screen 1

Recipe Detail

Recipe Detail Screen 2

Cooking Mode

Recipe Detail Screen 3

Timer

Favorites Screen

Favorites

Shopping List Screen

Shopping List


Made with โค๏ธ for cooking enthusiasts

Zesty - Your Culinary companion

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published