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.
- 🎙️ 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
- 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
git clone https://github.com/SYD-Taha/GenAi_Healthcare_translation.git
cd GenAi_Healthcare_translation
npm install
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.
npm run dev
Open your browser and navigate to:
http://localhost:5173
- Push your code to GitHub (excluding
.env
) - Connect the repo to Vercel
- Add the same
.env
variables through Vercel's Project Settings > Environment Variables - Vercel will inject them securely during build & runtime
“The patient is experiencing acute myocardial infarction and requires immediate angioplasty.”
Try speaking or typing this to see GenAI enhancement and accurate translation!
src/
│
├── components/
│ ├── SpeechInput.jsx
│ ├── TranslationBox.jsx
│ └── OutputSpeech.jsx
│
├── App.jsx
├── main.jsx
├── App.css
└── index.html
react
,vite
react-speech-recognition
openrouter
text-to-speech-js
(or Web Speech API)dotenv
(local only)
.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
MIT License — use freely, but attribution appreciated.