AI-Powered Medical Prescription Translation with Text-to-Speech
NeuroGrid ScriptSense is an advanced Streamlit-based web application that leverages DigitalOcean Gradient AI (Llama 3.3 70B) to accurately translate medical prescriptions into 27+ Indian languages. This innovative tool bridges language barriers in healthcare, ensuring patients and healthcare providers can communicate effectively regardless of their native language.
- Translate medical prescriptions into 27+ Indian languages
- Supports: Hindi, Bengali, Telugu, Marathi, Tamil, Urdu, Gujarati, Malayalam, Kannada, Punjabi, and many more
- Preserves medical terminology and dosage accuracy
- Convert translated prescriptions to audio format
- Play audio directly in the browser
- Download audio as MP3 files
- Supports all Indian languages with native pronunciation
- Perfect for patients with reading difficulties or visual impairments
- User-friendly interface for patient details and medication information
- Support for multiple medications per prescription
- Fields for diagnosis, treatment details, and follow-up appointments
- Download translated prescriptions as text files
- Professional formatting for medical documentation
- DigitalOcean Gradient AI - Serverless inference
- Llama 3.3 70B Instruct Model - State-of-the-art translation quality
- Fast and accurate translations
- Medical terminology preservation
- Audio playback for visually impaired patients
- Multiple download formats (text and audio)
- Clear, professional layout
- Mobile-responsive design
- Python 3.10 or higher
- DigitalOcean Gradient AI Model Access Key
- Clone the repository:
git clone https://github.com/preethamresearch/hacktoctober.git
cd hacktoctober- Install dependencies:
pip install -r requirements.txt-
Configure API Key:
- Get your Model Access Key from DigitalOcean Console
- Open
main.pyand update line 13:
GRADIENT_MODEL_ACCESS_KEY = "your_actual_api_key_here"
-
Run the application:
streamlit run main.py- Access the app:
- Open your browser to: http://localhost:8501
- Fill in patient name, ID, and age
- Add doctor's name and contact information
- Enter diagnosis details
- Specify the number of medications
- For each medication, enter:
- Medication name
- Dosage instructions
- Frequency (e.g., "Twice daily")
- Duration (e.g., "7 days")
- Add known allergies (if any)
- Include special notes or instructions
- Select target language from 27+ options
- Click "Translate" button
- View the translated prescription
- ๐ Listen to audio: Click play on the audio player
- ๐ฅ Download text: Click "Download Translated Prescription"
- ๐ฅ Download audio: Click "Download Audio (MP3)"
Full Text-to-Speech support for:
- Hindi (เคนเคฟเคจเฅเคฆเฅ)
- Bengali (เฆฌเฆพเฆเฆฒเฆพ)
- Telugu (เฐคเฑเฐฒเฑเฐเฑ)
- Marathi (เคฎเคฐเคพเค เฅ)
- Tamil (เฎคเฎฎเฎฟเฎดเฏ)
- Urdu (ุงุฑุฏู)
- Gujarati (เชเซเชเชฐเชพเชคเซ)
- Malayalam (เดฎเดฒเดฏเดพเดณเด)
- Kannada (เฒเฒจเณเฒจเฒก)
- Punjabi (เจชเฉฐเจเจพเจฌเฉ)
- Assamese (เฆ เฆธเฆฎเงเฆฏเฆผเฆพ)
- Odia (เฌเฌกเฌผเฌฟเฌ)
- Sindhi (ุณฺูู)
And 14+ more regional languages!
- DigitalOcean Gradient AI - Serverless inference platform
- Llama 3.3 70B Instruct - Advanced language model
- Google Text-to-Speech (gTTS) - Audio generation
- Streamlit - Interactive web application
- Python 3.10+ - Core programming language
- Pandas - Data manipulation
- NumPy - Numerical operations
- Requests - HTTP requests
- Base64 - File encoding
- BytesIO - Audio processing
NeuroGrid-ScriptSense/
โโโ main.py # Main application
โโโ requirements.txt # Python dependencies
โโโ README.md # Project documentation
โโโ SETUP.md # Setup guide
โโโ MIGRATION_GUIDE.md # Gradient AI migration guide
โโโ TTS_FEATURE_GUIDE.md # Text-to-Speech documentation
โโโ QUICK_START.md # Quick start guide
โโโ QUICK_REFERENCE.md # Command reference
โโโ check_env.py # Environment verification
โโโ run_app.bat # Windows batch script
โโโ run_app.ps1 # PowerShell script
โโโ .gitignore # Git ignore rules
โโโ .env.example # Environment variable template
โโโ Screen/ # Screenshots and diagrams
โโโ medical-prescription-blockdiagram.png
โโโ img-*.png
โ
Communicate with patients in their native language
โ
Reduce medication errors due to language barriers
โ
Provide audio instructions for better understanding
โ
Generate professional multilingual documentation
โ
Understand prescriptions in native language
โ
Listen to audio version if unable to read
โ
Share prescriptions with family/caregivers
โ
Better medication compliance
โ
Verify prescriptions in multiple languages
โ
Communicate dosage instructions clearly
โ
Reduce dispensing errors
- Setup Guide - Detailed installation instructions
- TTS Feature Guide - Text-to-Speech documentation
- Migration Guide - Gradient AI migration from Gemini
- Quick Reference - Command cheat sheet
- Quick Start - Getting started guide
- โ No data storage - Translations generated on-demand
- โ Local processing - Audio created in memory
- โ No cloud upload - Patient data stays secure
- โ API key protection - Environment variable support
.env files (already in .gitignore).
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Internet required for both translation and audio generation
- API rate limits may apply based on your Gradient AI plan
- Some regional languages use Hindi TTS as fallback
- Audio quality depends on translation accuracy
- โ Migrated from Google Gemini to DigitalOcean Gradient AI
- โ Added Text-to-Speech functionality
- โ Rebranded to NeuroGrid ScriptSense
- โ Added audio download feature
- โ Improved error handling
- โ Enhanced documentation
- Initial release with Gemini AI
- Basic translation functionality
- Multi-language support
Patient Name: John Doe
Age: 45
Diagnosis: Hypertension
Medication 1:
Name: Amlodipine 5mg
Dosage: One tablet
Frequency: Once daily
Duration: 30 days
[Translated to Hindi, Tamil, Telugu, etc.]
[Audio playback available]
[Download as text and MP3]
For issues, questions, or suggestions:
- Issues: GitHub Issues
- Documentation: Check the
/docsfolder - Email: preetham.s@benisontech.com
This project is licensed under the MIT License - see the LICENSE file for details.
- DigitalOcean Gradient AI - For providing the AI infrastructure
- Google Text-to-Speech - For audio generation capabilities
- Streamlit - For the excellent web framework
- Open Source Community - For continuous support
If you find this project helpful, please give it a โญ on GitHub!
Built with โค๏ธ by NeuroGrid
Powered by DigitalOcean Gradient AI & Llama 3.3 70B
ยฉ 2025 NeuroGrid. All rights reserved.
You can find a sample translated prescription here.






