Advanced Speech & Text Translation App

A comprehensive web application for speech-to-speech and text-to-speech translation supporting 100+ languages including regional Indian languages like Telugu, Marathi, Tamil, Hindi, and more.

Features

  • Speech-to-Speech Translation: Speak in one language and hear the translation in another
  • Speech Recognition: Convert speech to text in real-time with support for regional languages
  • Text-to-Speech: High-quality audio playback with native pronunciation
  • Text Translation: Traditional text input with translation
  • Regional Language Support: Extensive support for Indian languages (Telugu, Marathi, Tamil, Hindi, Bengali, Gujarati, Kannada, Malayalam, Punjabi, Urdu, etc.)
  • Language Detection: Automatic detection of spoken and written language
  • Voice Selection: Multiple voice options for different languages and accents
  • Real-time Processing: Live speech recognition and instant translation
  • Offline Capability: Basic functionality works without internet (browser-dependent)

Project Structure

├── backend/
│   ├── index.ts             # Main Hono server with translation API
│   └── README.md
├── frontend/
│   ├── components/
│   │   ├── App.tsx          # Main translation interface
│   │   ├── SpeechRecognition.tsx  # Speech recognition component
│   │   ├── VoiceSelector.tsx      # Voice selection component
│   │   └── LanguageSelector.tsx   # Language selection component
│   ├── index.html           # Main HTML template
│   ├── index.tsx            # Frontend entry point
│   ├── style.css            # Custom styles
│   └── README.md
├── shared/
│   ├── types.ts             # Shared TypeScript types
│   ├── languages.ts         # Comprehensive language definitions
│   └── README.md
└── README.md

API Endpoints

  • GET / - Serves the main application
  • POST /api/translate - Translates text between languages
  • GET /api/languages - Returns list of supported languages with speech capabilities
  • GET /api/voices - Returns available voices for text-to-speech

Usage

  1. Text Translation: Enter text and select languages for traditional translation
  2. Speech Input: Click the microphone to speak in your chosen language
  3. Speech Output: Use speaker icons to hear translations with native pronunciation
  4. Voice Selection: Choose from multiple voices and accents for each language
  5. Regional Languages: Full support for Indian regional languages with proper pronunciation

Supported Regional Languages

Indian Languages

  • Telugu (తెలుగు) - Native script and pronunciation
  • Marathi (मराठी) - Devanagari script support
  • Hindi (हिन्दी) - Multiple dialects and accents
  • Tamil (தமிழ்) - Tamil script with proper pronunciation
  • Bengali (বাংলা) - Bengali script support
  • Gujarati (ગુજરાતી) - Gujarati script
  • Kannada (ಕನ್ನಡ) - Kannada script
  • Malayalam (മലയാളം) - Malayalam script
  • Punjabi (ਪੰਜਾਬੀ) - Gurmukhi script
  • Urdu (اردو) - Arabic script
  • Odia (ଓଡ଼ିଆ) - Odia script
  • Assamese (অসমীয়া) - Assamese script

Other Regional Languages

  • Arabic dialects (Egyptian, Gulf, Levantine)
  • Chinese variants (Mandarin, Cantonese)
  • Spanish variants (Latin American, European)
  • Portuguese (Brazilian, European)
  • French (Metropolitan, Canadian)
  • English (US, UK, Australian, Indian)

Technologies

  • Backend: Hono framework with TypeScript
  • Frontend: React with TypeScript
  • Translation: Google Translate API
  • Text-to-Speech: Web Speech API
  • Styling: TailwindCSS