Logo Lanfrica

AchrafLarbi/MiniProjet_NLP

Domain:

natural language processinghealthcare

Record type:

software
Creator:
Ach
Host:
MEDTalk-Dz is a pioneering system designed to facilitate preliminary medical diagnosis by converting spoken Algerian dialect into symptom data and predicting diseases using a neural network. # Medical Symptom Detection from Speech A natural language processing project that extracts medical symptoms from speech input, supporting Arabic language detection and translation. ## Project Overview This project creates an end-to-end pipeline that: 1. Records audio input from users 2. Transcribes speech to text (supporting Arabic) 3. Translates the content to English (if needed) 4. Extracts medical symptoms from the transcribed text 5. Organizes the symptoms into a structured format ## Features - **Audio Recording**: Capture voice input directly through the application - **Multilingual Support**: Works with Arabic speech input - **Speech-to-Text Conversion**: Uses ElevenLabs API for accurate transcription - **Translation**: Converts Arabic dialect text to English - **Symptom Extraction**: Identifies medical symptoms from the processed text - **Structured Output**: Returns symptoms in a clean, organized format ## Technologies Used - **Python**: Core programming language - **SoundDevice & SciPy**: Audio recording and processing - **ElevenLabs API**: Speech-to-text transcription - **OpenRouter API**: Access to GPT-3.5 Turbo for translation and symptom extraction - **Regular Expressions**: Cleanup and formatting of extracted symptoms ## Installation 1. Clone this repository 2. Install required packages: ```bash pip install sounddevice scipy python-dotenv elevenlabs openai ``` 3. Create a `.env` file with your API keys: ``` ELEVENLABS_API_KEY=your_elevenlabs_api_key ``` ## Usage The project is implemented as a Jupyter notebook (speech_to_text.ipynb) that can be run step by step: 1. **Record Audio**: - The system records audio input for a predefined duration (default: 10 seconds) - Audio is saved as 'output.wav' 2. **Transcribe Speech**: - The ElevenLabs API converts the audio to text - Supports Arabic language with word-level timestamps 3. **Translate Content** (if in Arabic): - Translates the transcribed text from Arabic dialect to English - Uses GPT …