calm-speech

bySamarth Choudhar

You are a senior full-stack AI engineer. Build a complete production-ready project called "AI Voice English Trainer". 📌 Project Goal: A web application where users speak English and get real-time feedback on: - Grammar - Pronunciation - Fluency - Suggestions for improvement --- 🧩 FEATURES REQUIRED: 1. Speech Input: - Capture user voice using browser (Web Speech API or MediaRecorder) - Convert speech to text 2. Grammar Correction: - Use an LLM API (OpenAI or Gemini) - Return: - Corrected sentence - Explanation of mistakes - Better alternative sentences 3. Pronunciation Feedback: - Compare spoken text vs ideal text - Provide score (0–100) - Highlight incorrect words 4. Feedback System: Return structured output: { "original_text": "", "corrected_text": "", "grammar_feedback": "", "pronunciation_score": "", "suggestions": [] } 5. Daily Practice Tracking: - Store user history (local storage or backend DB) - Show previous attempts --- đŸ–Ĩī¸ FRONTEND: - HTML, CSS (Glassmorphism UI), JavaScript - Pages: - Home - Practice Page (Record + Results) - History Page - Features: - Record button 🎤 - Live transcript - Feedback display cards - Progress UI --- âš™ī¸ BACKEND: - Python FastAPI - API endpoints: - /speech-to-text - /analyze-text - /history - Use: - OpenAI/Gemini API for grammar correction - Basic scoring logic for pronunciation --- 🧠 AI INTEGRATION: - Prompt LLM like: "Correct the grammar and explain mistakes in simple English. Suggest better alternatives." --- 📁 PROJECT STRUCTURE: frontend/ index.html style.css script.js backend/ main.py routes/ services/ requirements.txt --- ✨ EXTRA FEATURES (IMPORTANT): - Loading animation - Error handling - Clean UI - Mobile responsive --- 🚀 OUTPUT REQUIRED: 1. Full working code (frontend + backend) 2. Step-by-step setup instructions 3. API key integration guide 4. Sample test cases 5. GitHub README content --- đŸŽ¯ IMPORTANT: - Keep code beginner-friendly but clean - Use comments to explain logic - Make it deployable Now generate the full project.

No preview

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document

System Requirements Document (SRD)

Project Name: calm-speech

1. Introduction

The calm-speech project is designed to provide users with a web application that helps improve their English-speaking skills. The system offers real-time feedback on grammar, pronunciation, fluency, and suggestions for improvement. By integrating cutting-edge AI technology, the platform ensures users receive actionable insights to refine their spoken English.

This document outlines the system requirements for calm-speech, including functional and non-functional specifications, user personas, design concepts, and technical architecture.

2. System Overview

The calm-speech platform is a web-based application tailored for users in India (IN) and globally. It leverages AI-powered tools to analyze speech input and provide immediate feedback. The system also tracks user progress over time, enabling cross-device access to practice history.

Page 1 of 7

Key Features:

  • Real-time speech-to-text conversion.
  • Grammar correction with explanations and suggestions.
  • Pronunciation scoring and feedback.
  • Daily practice tracking with user login.
  • Integration with Gemini API for AI-driven analysis.

The system is designed to be intuitive, mobile-responsive, and visually engaging, ensuring users feel motivated to practice regularly.

3. Functional Requirements

As User:

  • I should be able to record my voice using the web application.
  • I should receive immediate feedback on grammar, pronunciation, and fluency after each practice session.
  • I should be able to view corrected sentences, explanations of mistakes, and suggestions for improvement.
  • I should be able to see a pronunciation score (0–100) and highlighted incorrect words.
  • I should be able to track my daily practice history and progress.
  • I should be able to log in and access my practice history across devices.

As Admin:

  • I should be able to manage user accounts and monitor system performance.
  • I should be able to view aggregated user data for insights into system usage.
Page 2 of 7

4. User Personas

Persona 1: Language Learner

Description: A user seeking to improve their spoken English for professional or personal reasons.
Goals:

  • Enhance grammar, pronunciation, and fluency.
  • Track progress over time.
    Pain Points:
  • Difficulty identifying mistakes in spoken English.
  • Lack of structured feedback.

Persona 2: Admin

Description: A system administrator responsible for maintaining the platform.
Goals:

  • Ensure smooth operation of the system.
  • Monitor user activity and system performance.
    Pain Points:
  • Managing large-scale user data efficiently.

5. Visuals Colors and Theme

Page 3 of 7

Color Palette:

The calm-speech platform will use a soothing and professional color palette to create a calm and focused environment for users:

  • Background: #F4F9F9 (Soft Mist White)
  • Surface: #D9E4DD (Gentle Green)
  • Text: #2E4057 (Deep Slate Blue)
  • Accent: #FF6F61 (Warm Coral)
  • Muted: #B0BEC5 (Soft Gray Blue)

6. Signature Design Concept

Concept: Interactive Soundwave Feedback

The homepage will feature a dynamic, interactive soundwave animation that reacts to user input. As users speak into the microphone, the soundwave will visually respond in real-time, creating an engaging and immersive experience.

Page 4 of 7

Details:

  • Animation: The soundwave will pulse and shift colors based on the tone and volume of the user's voice.
  • Transitions: Smooth transitions between sections as users scroll, with the soundwave subtly morphing into different shapes.
  • Micro-interactions: Hover effects on buttons and cards that ripple like sound vibrations.
  • Feedback Display: Results will appear as cards that "slide in" from the sides, with subtle bounce animations.

This design will make the platform feel alive and responsive, ensuring users are captivated from the moment they land on the page.

7. Non-Functional Requirements

  • Performance: The system must process speech input and provide feedback within 3 seconds.
  • Scalability: Support up to 10,000 concurrent users.
  • Security: Implement secure user authentication and data encryption.
  • Availability: Ensure 99.9% uptime.
  • Localization: Default to Indian English for grammar and pronunciation rules.

8. Tech Stack

Frontend:

  • React for Web
Page 5 of 7

Backend:

  • Python
  • FastAPI

Database:

  • MySQL (with Alembic for migrations)

AI Models:

  • Gemini 3.1 Pro for grammar correction and feedback

AI Tools:

  • Litellm for LLM Routing
  • Langchain

Orchestration:

  • Docker (local)
  • Kubernetes (server-side)

9. Assumptions and Constraints

Assumptions:

  • Users will have access to a stable internet connection.
  • The system will primarily target Indian English speakers but remain adaptable for global users.
Page 6 of 7

Constraints:

  • Real-time feedback must not exceed 3 seconds to maintain user engagement.
  • The system must comply with data privacy regulations (e.g., GDPR).

10. Glossary

  • LLM: Large Language Model, used for AI-driven text analysis.
  • Gemini API: An AI API for grammar correction and feedback.
  • Glassmorphism: A design style featuring frosted glass-like UI elements.
  • Soundwave Animation: A visual representation of audio input.
  • Alembic: A database migration tool for Python applications.
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.