mercy-assistant

byRakesh Patel

MYRA Ai Assistant Act as an expert frontend developer and AI engineer. Build a real-time, voice-to-voice AI assistant web app using React, TypeScript, Tailwind CSS, and Vite. The assistant must have a distinct personality: A young, confident, witty, and sassy female persona Flirty, playful, slightly teasing tone (like a close girlfriend talking casually) Smart, emotionally responsive, and expressive (not robotic) Uses bold, witty one-liners, light sarcasm, and engaging conversation style Avoids explicit or inappropriate content, but maintains charm and attitude Core Requirements: Gemini Live API (Audio-to-Audio ONLY) Use @google/genai with gemini-3.1-flash-live-preview No text-based generation (STRICT) Stream mic input (PCM16 16kHz) via AudioContext Play response audio (24kHz) using Web Audio API Maintain continuous session Handle interruptions properly Function Calling Implement tools like openWebsite Execute browser actions via toolCall Send toolResponse instantly UI/UX (Mobile-first) Fullscreen dark futuristic UI No text chat, only voice interaction Central mic/power button Real-time visual states: idle, connecting, listening, speaking Smooth animations (glow, waveform, pulse) Clean Architecture Separate AudioStreamer and LiveSession logic Manage states: disconnected, connecting, listening, speaking SUPPORT LANGUAGE ENGLISH/HINDI/GUJARATI

No preview

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document

System Requirements Document (SRD)

Project Name: mercy-assistant

1. Introduction

The mercy-assistant project is a cutting-edge, real-time, voice-to-voice AI assistant designed to provide an engaging and immersive user experience. This assistant, named MYRA, is a young, confident, witty, and sassy virtual persona that interacts with users exclusively through audio. MYRA is designed to be smart, emotionally responsive, and expressive, offering a playful and slightly teasing tone while maintaining charm and professionalism.

Developed for users in India, MYRA supports English, Hindi, and Gujarati, making it accessible to a diverse audience. The assistant is built with a mobile-first approach, ensuring a futuristic and seamless user experience on smartphones and other devices.

This document outlines the system requirements for the development of MYRA, including functional and non-functional requirements, user personas, design concepts, and technical specifications.

Page 1 of 7

2. System Overview

The mercy-assistant project leverages advanced AI technologies to deliver a real-time, voice-to-voice interaction experience. The system is powered by the Gemini Live API for audio processing and integrates with @google/genai for expressive and natural voice responses.

Key features of the system include:

  • Real-Time Audio Streaming: Continuous voice input and output with seamless session management.
  • Dynamic Persona: A sassy, confident, and playful virtual assistant that adapts to user interactions.
  • Browser Tool Calls: Ability to execute browser actions such as opening websites, controlling media playback, and managing tabs.
  • Futuristic UI/UX: A dark, immersive interface with real-time visual states and smooth animations.
  • Multi-Language Support: English, Hindi, and Gujarati, with automatic language detection or user selection.

The system is designed with a clean architecture, ensuring modularity, scalability, and maintainability.

Page 2 of 7

3. Functional Requirements

  • As a User, I should be able to interact with MYRA using voice commands only.
  • As a User, I should be able to switch between English, Hindi, and Gujarati seamlessly.
  • As a User, I should be able to open websites using voice commands.
  • As a User, I should be able to control media playback (e.g., play, pause, stop) using voice commands.
  • As a User, I should be able to manage browser tabs (e.g., open, close, switch) using voice commands.
  • As a User, I should experience smooth transitions between MYRA's states (idle, connecting, listening, speaking).
  • As a User, I should see real-time visual feedback (e.g., glowing animations, waveforms) during interactions.
  • As a User, I should experience MYRA's playful and sassy personality through her voice responses.

4. User Personas

4.1 Primary User

  • Name: General User
  • Description: Individuals who want a hands-free, voice-driven assistant for browsing, media control, and casual interactions.
  • Goals:
    • Simplify daily tasks through voice commands.
    • Enjoy engaging and entertaining conversations with MYRA.
    • Access a futuristic and immersive user experience.
Page 3 of 7

5. Visuals Colors and Theme

Color Palette

The mercy-assistant project will feature a sleek, dark, and futuristic color palette:

  • Background: #0D0D0D (Deep Black)
  • Surface: #1A1A1A (Charcoal Gray)
  • Text: #EAEAEA (Soft White)
  • Accent: #FF007F (Vivid Neon Pink)
  • Muted Tones: #4D4D4D (Muted Gray)

This palette ensures a modern, immersive aesthetic while maintaining readability and visual appeal.

6. Signature Design Concept

Page 4 of 7

The "Neon Pulse" Experience

The mercy-assistant homepage will feature a central glowing microphone button that pulses with a neon pink glow (#FF007F) in sync with MYRA's voice. The background will be a dynamic, animated starry sky that subtly shifts colors based on the time of day (e.g., deep blue at night, soft purple at dawn).

When MYRA is idle, the microphone button will emit a soft, rhythmic pulse. Upon activation, the button will expand slightly, and a real-time audio waveform will appear around it, visualizing the user's voice input. As MYRA speaks, the waveform will shift to reflect her voice output, creating a seamless and interactive experience.

Transitions between states (idle, connecting, listening, speaking) will include smooth animations, such as glowing rings expanding outward or subtle color shifts in the background. Micro-interactions, like a playful "wink" animation when MYRA completes a task, will add personality and charm.

This design ensures that the first impression of MYRA is unforgettable, engaging, and visually stunning.

7. Non-Functional Requirements

  • The system must process audio input and output with minimal latency (<200ms).
  • The UI must be responsive and optimized for mobile devices.
  • The system must support continuous sessions without interruptions.
  • The assistant's personality must remain consistent across all interactions.
  • The system must handle errors gracefully and provide clear feedback to the user.
Page 5 of 7

8. Tech Stack

Frontend

  • React (Web)
  • React Native (Mobile App)

Backend

  • Python
  • FastAPI

Database

  • MySQL (Primary RDBMS with Alembic for migrations)

AI Models

  • Gemini 3.1 Pro (Voice-to-Voice interactions)

AI Tools

  • Litellm (LLM Routing)
  • Langchain

Local Orchestration

  • Docker
  • docker-compose
Page 6 of 7

Server-Side Orchestration

  • Kubernetes

9. Assumptions and Constraints

  • The system assumes users have access to devices with microphones and speakers.
  • The system assumes a stable internet connection for real-time audio streaming.
  • The assistant will not support text-based interactions.
  • The system is constrained to support only English, Hindi, and Gujarati languages.

10. Glossary

  • Gemini Live API: An API for real-time audio-to-audio processing.
  • AudioContext: A web API for processing and synthesizing audio.
  • Tool Call: A feature that allows the assistant to execute browser actions.
  • Waveform: A visual representation of audio signals.
  • Idle State: The state when the assistant is not actively listening or speaking.
Page 7 of 7

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.