Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VoiceScribe

A Flutter-based speech-to-text application with AI-powered chat functionality using Google's Gemini API.

Features

  • Speech Recognition - Convert speech to text using device microphone
  • AI Chat - Get intelligent responses from Gemini AI
  • TTS (Text-to-Speech) - Listen to AI responses
  • History Management - Save and manage chat sessions with Hive
  • Dark/Light Theme - Theme switching support
  • Copy & Share - Easy sharing of responses

Project Structure

lib/
├── core/
│   ├── constants/        # App constants
│   ├── providers/       # Riverpod providers (theme)
│   ├── router/        # Navigation routing
│   └── theme/        # App theming
├── data/
│   ├── models/         # Data models (Hive)
│   └── repositories/   # Data repositories
├── domain/
│   └── services/       # Business services
│       ├── permission_service.dart
│       ├── speech_service.dart
│       └── export_service.dart
├── features/
│   └── chat/
│       ├── domain/
│       │   ├── controllers/   # Riverpod controllers
│       │   ├── entities/    # Chat message entity
│       │   └── states/     # State classes
│       └── presentation/
│           ├── controllers/ # Speech controller
│           ├── screens/   # App screens
│           └── widgets/    # Reusable widgets
└── main.dart

Environment Setup

This project uses flutter_dotenv to manage API keys securely.

  1. Create a .env file in the project root:

    GEMINI_API_KEY=your_api_key_here
    
  2. Add .env to .gitignore to prevent committing your API key.

Getting Started

Prerequisites

  • Flutter SDK 3.10+
  • Dart SDK 3.10+
  • Android SDK / Xcode (for iOS)

Installation

# Install dependencies
flutter pub get

# Run the app
flutter run

Building

Android:

flutter build apk --release

iOS:

flutter build ios --release

Key Classes

Layer Class Description
Domain ChatController Manages chat state and AI interactions
Domain HistoryController Manages chat history
Domain ChatMessage Chat message entity
Domain HistoryState History list state
Presentation ChatScreen Main chat interface
Presentation HistoryDrawer Side drawer with chat history
Presentation ChatMessageBubble Message display widget
Presentation ResponseActions Action buttons (speak, copy, share)
Presentation MessageComposer Text input area

Usage

  1. Start Chat: Tap the + button in app bar to start a new session
  2. Speak: Tap the microphone button and speak
  3. Send: Tap the send button (➕ rotated 45°)
  4. Listen: Tap the speaker icon on AI responses
  5. Copy: Tap the copy icon to copy to clipboard
  6. Share: Tap the share icon to share
  7. History: Open the drawer to view past sessions

Dependencies

  • speech_to_text - Speech recognition
  • flutter_riverpod - State management
  • hive / hive_flutter - Local storage
  • google_generative_ai - Gemini AI integration
  • flutter_tts - Text-to-speech
  • flutter_markdown - Markdown rendering
  • share_plus - Share functionality
  • permission_handler - Runtime permissions

License

MIT License

About

Flutter speech-to-text app with Gemini AI chat, text-to-speech, and local chat history.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages