--- title: CASL 2 - Speech Therapy Assessment Tool emoji: 🎤 colorFrom: blue colorTo: purple sdk: gradio sdk_version: "3.50.0" app_file: app.py pinned: false --- # CASL 2 - Speech Therapy Assessment Tool An interactive tool for speech therapists to assess and treat speech disorders. CASL 2 combines professional speech therapy assessment with AI-powered feedback, making it easier for therapists to conduct evaluations and track progress. ## Features ### 1. Conversation Assistant - Natural voice-based conversation with an AI assistant - Get information about speech therapy techniques and assessment methods - Guidance on using the assessment tools - Full conversation history tracking ### 2. Articulation Assessment - Evaluate speech sound production in various positions (initial, medial, final) - Visual prompts with images for each target word - Real-time recording and transcription - Automatic analysis of pronunciation accuracy - AI-powered feedback for each word - Progress tracking through the assessment ### 3. Language Assessment - Evaluate receptive and expressive language skills - Test vocabulary, following directions, and sentence formation - Record responses and get professional feedback - Structured assessment format with varied task types ## Setup ### Hugging Face API Token This app requires a Hugging Face API token to access LLM services. To set it up: 1. Create an account on [Hugging Face](https://huggingface.co/) 2. Generate an API token in your [settings page](https://huggingface.co/settings/tokens) 3. When deploying to Hugging Face Spaces: - Go to Settings > Repository Secrets - Add a secret with the key `HF_API_TOKEN` and your token as the value ### Local Development To run this application locally: 1. Install the required dependencies: ```bash pip install -r requirements.txt ``` 2. Set your Hugging Face API token: ```bash export HF_API_TOKEN="your-token-here" ``` 3. Run the application: ```bash python app.py ``` 4. Open the URL shown in the terminal (typically http://127.0.0.1:7860) ## How to Use ### Conversation Mode 1. Select the "Conversation Assistant" tab 2. Click "Start Conversation" to begin 3. Record your speech using the microphone 4. The AI will respond with voice and text 5. Continue the conversation naturally ### Articulation Assessment 1. Select the "Articulation Assessment" tab 2. Click "Start Assessment" to begin 3. View the current word and associated image 4. Ask the patient to pronounce the displayed word 5. Record their response using the microphone 6. Review the AI analysis and feedback 7. Use the navigation buttons to move between words 8. Complete all words in the assessment ### Language Assessment 1. Select the "Language Assessment" tab 2. Click "Start Assessment" to begin 3. Present the current task to the patient 4. Record their response using the microphone 5. Review the AI analysis and feedback 6. Use the navigation buttons to move between tasks 7. Complete all tasks in the assessment ## Technical Details This app combines several technologies: - Gradio's UI components and audio capabilities - Google's Speech Recognition API for transcription - Hugging Face's LLM API (Llama-2-7b-chat-hf model) - gTTS (Google Text-to-Speech) for voice synthesis - Simple speech analysis for assessment purposes - Modern web interface with responsive design ## For Therapists CASL 2 is designed to supplement professional speech therapy assessment, not replace it. The tool provides an engaging interface for patient interaction and helps therapists with: 1. Recording and documenting patient responses 2. Initial screening of speech patterns 3. Tracking progress over time 4. Engaging patients with interactive exercises 5. Providing consistent, supportive feedback Always combine the tool's analysis with your professional judgment.