File size: 2,472 Bytes
c96a2ae
 
 
 
 
 
 
 
 
 
 
 
c91b159
 
0ace4b0
c91b159
 
 
 
0ace4b0
 
 
 
c91b159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0ace4b0
c91b159
 
 
 
 
 
 
 
 
 
 
 
 
0ace4b0
c91b159
 
 
 
0ace4b0
c91b159
0ace4b0
c91b159
 
 
0ace4b0
c91b159
0ace4b0
c91b159
 
 
 
 
 
0ace4b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c91b159
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
title: CASL 2 - Speech Therapy Assessment Tool
emoji: 🎤
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.23.3
app_file: app_main.py
pinned: false
---


# CASL Voice Bot

A speech pathology assistant using OpenAI's voice API for assessment based on the CASL-2 framework. This application helps speech-language pathologists (SLPs) assess students' speaking abilities.

## Features

- Voice-to-voice interaction with AI speech pathologist
- CASL-2 framework assessment
- Real-time assessment tracking
- Session recording and saving
- Custom note-taking for SLPs
- Gradio web interface for easy sharing and use in school settings

## CASL-2 Assessment Areas

The AI speech pathologist assesses students in these key areas:

1. **Lexical/Semantic Skills**: Vocabulary knowledge, word meanings, and contextual word use
2. **Syntactic Skills**: Grammar and sentence structure understanding
3. **Supralinguistic Skills**: Higher-level language skills beyond literal meanings
4. **Pragmatic Skills**: Language use in social contexts (less emphasis for younger students)

## Setup Instructions

### Prerequisites

- Python 3.8+
- OpenAI API key with access to GPT-4o and TTS models

### Installation

1. Clone the repository:
   ```
   git clone https://github.com/yourusername/CASLVoiceBot.git
   cd CASLVoiceBot
   ```

2. Create a virtual environment and install dependencies:
   ```
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   pip install -r requirements.txt
   ```

3. Set up environment variables:
   ```
   cp .env.example .env
   ```
   Then edit `.env` to add your OpenAI API key.

### Running the Application

1. Start the application:
   ```
   python app_ui.py
   ```

2. Access the application through the URL provided in the terminal.

## Usage

1. Optionally enter a Student ID to track sessions
2. Select your preferred AI voice
3. Click "Start Session" to begin a speech assessment
4. Wait for the AI to introduce itself, then speak when prompted
5. View real-time assessment in the interface
6. SLPs can add notes throughout the session
7. Save the session when finished
8. Click "Stop Session" to end

## Deployment on Hugging Face Spaces

1. Create a new Space on Hugging Face with the Gradio SDK
2. Upload the repository contents to the Space
3. Add your OPENAI_API_KEY as a secret in the Space settings
4. The application will automatically run using app_ui.py

## License

[MIT License](LICENSE)