Skip to content

A real-time multilingual translator designed for healthcare settings. This web app converts voice input into accurate medical transcriptions using AI-enhanced speech recognition, then instantly translates and speaks the output in the selected language. Built for accessibility, speed, and clarity—bridging communic

Notifications You must be signed in to change notification settings

SYD-Taha/GenAi_Healthcare_translation

Repository files navigation

🌍 Healthcare Translator

A browser-based multilingual speech translator designed for healthcare professionals and patients. This app improves voice transcription accuracy (especially for medical terms) using GenAI processing, and translates speech in real time using Microsoft Azure Translator.

🚀 Features

  • 🎙️ Voice input via Web Speech API
  • 🤖 GenAI-powered transcript enhancement (via OpenRouter & GPT-3.5)
  • 🌐 Real-time translation using Azure Text Translator API
  • 🗣️ Text-to-Speech output in the translated language
  • 🌍 Supports global language selection (source & target)
  • 💬 Clear user interface with visual transcript and translated output

🧠 Tech Stack

  • React + Vite – Fast frontend
  • Web Speech API – Voice recognition and output
  • Microsoft Azure Translator – Real-time language translation
  • OpenRouter + GPT-3.5 – GenAI transcript enhancement
  • Vercel – Hosting and deployment

🛠️ Setup & Development

1. Clone the repository

git clone https://github.com/SYD-Taha/GenAi_Healthcare_translation.git
cd GenAi_Healthcare_translation

2. Install dependencies

npm install

3. Configure Environment Variables

Create a .env file in the root folder (DO NOT push this to GitHub):

VITE_TRANSLATOR_KEY=your_azure_key
VITE_TRANSLATOR_REGION=your_azure_region
VITE_TRANSLATOR_ENDPOINT=https://api.cognitive.microsofttranslator.com
VITE_OPENROUTER_API_KEY=your_openrouter_key
VITE_MODEL=gpt-3.5-turbo

Important: Prefix all public-facing variables with VITE_ to make them available in your React app.


🧪 Running Locally

npm run dev

Open your browser and navigate to:

http://localhost:5173

🌐 Deploying to Vercel

  1. Push your code to GitHub (excluding .env)
  2. Connect the repo to Vercel
  3. Add the same .env variables through Vercel's Project Settings > Environment Variables
  4. Vercel will inject them securely during build & runtime

📝 Example Medical Phrase (For Testing)

“The patient is experiencing acute myocardial infarction and requires immediate angioplasty.”

Try speaking or typing this to see GenAI enhancement and accurate translation!


📁 Project Structure

src/
│
├── components/
│   ├── SpeechInput.jsx
│   ├── TranslationBox.jsx
│   └── OutputSpeech.jsx
│
├── App.jsx
├── main.jsx
├── App.css
└── index.html

📦 Dependencies

  • react, vite
  • react-speech-recognition
  • openrouter
  • text-to-speech-js (or Web Speech API)
  • dotenv (local only)

🔒 Security & Best Practices

  • .env is in .gitignore — never commit secrets
  • GitHub Push Protection is active to prevent secrets from leaking
  • Use Vercel environment variables instead of storing secrets in code

📄 License

MIT License — use freely, but attribution appreciated.


🙌 Acknowledgements

About

A real-time multilingual translator designed for healthcare settings. This web app converts voice input into accurate medical transcriptions using AI-enhanced speech recognition, then instantly translates and speaks the output in the selected language. Built for accessibility, speed, and clarity—bridging communic

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published