|
1 | 1 | # 🎓 Smart Classroom |
2 | | -The Smart Classroom project is a modular, extensible framework designed to process and summarize educational content using advanced AI models. It supports transcription, summarization, and future capabilities like video understanding and real-time analysis. |
3 | 2 |
|
4 | | -## This project provides: |
| 3 | +The **Smart Classroom** project is a modular, extensible framework designed to process and summarize educational content using advanced AI models. It supports transcription, summarization, and future capabilities like video understanding and real-time analysis. |
5 | 4 |
|
6 | | -### 🔊 Audio file processing and transcription (e.g., Whisper, Paraformer) |
7 | | -### 🧠 Summarization using powerful LLMs (e.g., Qwen, LLaMA) |
8 | | -### 📦 Plug-and-play architecture for integrating new ASR and LLM models |
9 | | -### ⚙️ API-first design ready for frontend integration |
10 | | -### 🛠️ Ready-to-extend for real-time streaming, diarization, translation, and video analysis |
11 | | -The goal is to transform raw classroom recordings into concise, structured summaries for students, educators, and learning platforms. |
| 5 | +The main features are as follows: |
12 | 6 |
|
13 | | ---- |
14 | | -### 💻 System Requirements |
| 7 | +• Audio transcription with ASR models (e.g., Whisper, Paraformer) |
| 8 | +• Summarization using powerful LLMs (e.g., Qwen, LLaMA) |
| 9 | +• Plug-and-play architecture for integrating new ASR and LLM models |
| 10 | +• API-first design ready for frontend integration |
| 11 | +• Extensible roadmap for real-time streaming, diarization, translation, and video analysis |
15 | 12 |
|
16 | | -- **OS:** Windows 11 |
17 | | -- **Processor:** Intel® Core Ultra Series 1 (with integrated GPU support) |
18 | | -- **Memory:** 32 GB RAM (minimum recommended) |
19 | | -- **Storage:** At least 50 GB free (for models and logs) |
20 | | -- **GPU/Accelerator:** Intel® iGPU (Intel® Core Ultra Series 1, Arc GPU, or higher) for summarization acceleration |
21 | | -- **Python:** 3.12 |
22 | | -- **Node.js:** v18+ (for frontend) |
23 | | ---- |
24 | | -### 🧩 Supported Models |
25 | 13 |
|
26 | | -#### 🔊 ASR (Automatic Speech Recognition) |
27 | | -- **Whisper (all models supported)** |
28 | | - - Recommended: `whisper-small` or lower for CPU efficiency |
29 | | - - Runs on **CPU** (Whisper is CPU-centric) |
30 | | -- **FunASR (Paraformer)** |
31 | | - - Recommended for **Chinese transcription** (`paraformer-zh`) |
32 | | -- ✅ Supports transcription of audio files up to 45 minutes in mp3 and wav formats |
| 14 | +## Get Started |
33 | 15 |
|
34 | | -#### 🧠 Summarization (LLMs) |
35 | | -- **Qwen Models (OpenVINO / IPEX)** |
36 | | - - ✅ `Qwen2.0-7B-Instruct` |
37 | | - - ✅ `Qwen2.5-7B-Instruct` |
38 | | -- 💡 Summarization supports up to 7,500 tokens (≈ 45 minutes of audio) on GPU |
| 16 | +To see the system requirements and other installations, see the following guides: |
39 | 17 |
|
40 | | -#### ⚖️ Supported Weight Formats |
41 | | -- **int8** → Recommended for lower-end CPUs (fast + efficient) |
42 | | -- **fp16** → Recommended for higher-end systems (better accuracy, GPU acceleration) |
43 | | -- **int4** → Supported, but may reduce accuracy (use only if memory-constrained) |
| 18 | +- [System Requirements](./docs/user-guide/system-requirements.md): Check the hardware and software requirements for deploying the application. |
| 19 | +- [Get Started](./docs/user-guide/get-started.md): Follow step-by-step instructions to set up the application. |
44 | 20 |
|
45 | | -💡 Run summarization on **GPU** (Intel® iGPU / Arc GPU) for faster performance. |
| 21 | +## How It Works |
46 | 22 |
|
47 | | ---- |
| 23 | +The basic architecture follows a modular pipeline designed for efficient audio summarisation. It begins with **audio preprocessing**, where FFMPEG chunks input audio into smaller segments for optimal handling. These segments are processed by an **ASR transcriber** (e.g., Whisper or Paraformer) to convert speech into text. Finally, an **LLM summariser** (such as Qwen or Llama), optimised through frameworks like OpenVINO IR, Llama.cpp, or IPEX, generates concise summaries, which are delivered via the **output handler** for downstream use. |
48 | 24 |
|
49 | | -### ✅ 1. **Install Dependencies** |
| 25 | + |
50 | 26 |
|
51 | | -**a. Install [FFmpeg](https://ffmpeg.org/download.html)** (required for audio processing): |
52 | | -- Download from [https://ffmpeg.org/download.html](https://ffmpeg.org/download.html), and add the `ffmpeg/bin` folder to your system `PATH`. |
53 | | ---- |
| 27 | +## Learn More |
54 | 28 |
|
55 | | -**Run your shell with admin privileges before starting the application** |
56 | | - |
57 | | -**b. Clone Repository:** |
58 | | - |
59 | | -```bash |
60 | | - git clone --no-checkout https://github.com/open-edge-platform/edge-ai-suites.git |
61 | | - cd edge-ai-suites |
62 | | - git sparse-checkout init --cone |
63 | | - git sparse-checkout set education-ai-suite |
64 | | - git checkout |
65 | | - cd education-ai-suite |
66 | | -``` |
67 | | ---- |
68 | | - |
69 | | -**c. Install Python dependencies** |
70 | | - |
71 | | -It’s recommended to create a **dedicated Python virtual environment** for the base dependencies. |
72 | | - |
73 | | -```bash |
74 | | -python -m venv smartclassroom |
75 | | -smartclassroom\Scripts\activate |
76 | | - |
77 | | -cd smart-classroom |
78 | | -python.exe -m pip install --upgrade pip |
79 | | -pip install --upgrade -r requirements.txt |
80 | | -pip install py-cpuinfo |
81 | | -``` |
82 | | ---- |
83 | | - |
84 | | - |
85 | | -**d. [Optional] Create Python Venv for Ipex Based Summarizer** |
86 | | - |
87 | | -If you plan to use IPEX, create a separate virtual environment. |
88 | | - |
89 | | -**Note: `smartclassroom_ipex` should only be used with FunAsr and Ipex related models (Specified in 2nd section). Don't configure Openvino related models in `smartclassroom_ipex`** |
90 | | - |
91 | | -```bash |
92 | | -python -m venv smartclassroom_ipex |
93 | | -smartclassroom_ipex\Scripts\activate |
94 | | - |
95 | | -python.exe -m pip install --upgrade pip |
96 | | -cd smart-classroom |
97 | | -pip install --upgrade -r requirements.txt |
98 | | -pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu |
99 | | -``` |
100 | | -> 💡 *Use `smartclassroom` if you don’t need IPEX. Use `smartclassroom_ipex` if you want IPEX summarization.* |
101 | | -
|
102 | | ---- |
103 | | -### ⚙️ 2. Configuration |
104 | | - |
105 | | -#### a. Default Configuration |
106 | | - |
107 | | -By default, the project uses Whisper for transcription and OpenVINO-based Qwen models for summarization.You can modify these settings in the configuration file (`smart-classroom/config.yaml`): |
108 | | - |
109 | | -```bash |
110 | | -asr: |
111 | | - provider: openvino # Supported: openvino, openai, funasr |
112 | | - name: whisper-tiny # Options: whisper-tiny, whisper-small, paraformer-zh etc. |
113 | | - device: CPU # Whisper currently supports only CPU |
114 | | - temperature: 0.0 |
115 | | - |
116 | | -summarizer: |
117 | | - provider: openvino # Options: openvino or ipex |
118 | | - name: Qwen/Qwen2-7B-Instruct # Examples: Qwen/Qwen1.5-7B-Chat, Qwen/Qwen2-7B-Instruct, Qwen/Qwen2.5-7B-Instruct |
119 | | - device: GPU # Options: GPU or CPU |
120 | | - weight_format: int8 # Supported: fp16, fp32, int4, int8 |
121 | | - max_new_tokens: 1024 # Maximum tokens to generate in summaries |
122 | | -``` |
123 | | -#### b. Chinese Audio Transcription |
124 | | - |
125 | | -For Chinese audio transcription, switch to funASR with Paraformer in your config (`smart-classroom/config.yaml`): |
126 | | -```bash |
127 | | -asr: |
128 | | - provider: funasr |
129 | | - name: paraformer-zh |
130 | | -``` |
131 | | - |
132 | | -#### c. IPEX-based Summarization |
133 | | - |
134 | | -To use IPEX for summarization, ensure: |
135 | | -- IPEX-LLM is installed. |
136 | | -- The environment for IPEX is activated. |
137 | | -- The configuration (`smart-classroom/config.yaml`) is updated as shown below: |
138 | | - |
139 | | -```bash |
140 | | -summarizer: |
141 | | - provider: ipex |
142 | | -``` |
143 | | - |
144 | | -**Important: After updating the configuration, reload the application for changes to take effect.** |
145 | | - |
146 | | ---- |
147 | | - |
148 | | -### ✅ 3. **Run the Application** |
149 | | -Activate the environment before running the application: |
150 | | - |
151 | | -```bash |
152 | | -smartclassroom\Scripts\activate # or smartclassroom_ipex |
153 | | -``` |
154 | | -Run the backend: |
155 | | -```bash |
156 | | -python main.py |
157 | | -``` |
158 | | - |
159 | | -- Bring Up Frontend: |
160 | | -```bash |
161 | | -cd ui |
162 | | -npm install |
163 | | -npm run dev -- --host 0.0.0.0 --port 5173 |
164 | | -``` |
165 | | - |
166 | | -> ℹ️ Open a second (new) Command Prompt / terminal window for the frontend. The backend terminal stays busy serving requests. |
167 | | -
|
168 | | -💡 Tips: You should see backend logs similar to this: |
169 | | - |
170 | | -``` |
171 | | -pipeline initialized |
172 | | -[INFO] __main__: App started, Starting Server... |
173 | | -INFO: Started server process [21616] |
174 | | -INFO: Waiting for application startup. |
175 | | -INFO: Application startup complete. |
176 | | -INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) |
177 | | -``` |
178 | | - |
179 | | -This means your pipeline server has started successfully and is ready to accept requests. |
180 | | - |
181 | | ---- |
182 | | - |
183 | | -### 🖥️ 4. Access the UI |
184 | | - |
185 | | -After starting the frontend you can open the Smart Classroom UI in a browser: |
186 | | - |
187 | | -Local machine: |
188 | | -- http://localhost:5173 |
189 | | -- http://127.0.0.1:5173 |
190 | | - |
191 | | -From another device on the same network (replace <HOST_IP> with your computer’s IP): |
192 | | -- http://<HOST_IP>:5173 |
193 | | - |
194 | | -Find your IP (Windows PowerShell): |
195 | | -``` |
196 | | -ipconfig |
197 | | -``` |
198 | | -Use the IPv4 Address from your active network adapter. |
199 | | - |
200 | | -If you changed the port, adjust the URL accordingly. |
201 | | - |
202 | | ---- |
203 | | - |
204 | | -### 🔍 6. Troubleshooting (Focused) |
205 | | - |
206 | | -- Frontend not opening: Ensure you ran npm run dev in a second terminal after starting python main.py. |
207 | | -- Backend not ready: Wait until Uvicorn shows "Application startup complete" and listening on port 8000. |
208 | | -- URL fails from another device: Confirm you used --host 0.0.0.0 and replace <HOST_IP> correctly. |
209 | | -- Nothing at localhost:5173: Check that the frontend terminal shows Vite server running and no port conflict. |
210 | | -- Firewall blocks access: Allow inbound on ports 5173 (frontend) and 8000 (backend) on Windows. |
211 | | -- Auto reload not happening: Refresh manually if backend was restarted after initial UI load. |
212 | | -- If you encounter the error “Port for tensor name cache_position was not found.” in the backend, it indicates the models were not configured as per the instructions in the README. To fix the issue, run: |
213 | | - ```bash |
214 | | - pip install --upgrade -r requirements.txt |
215 | | - ``` |
216 | | - Then delete the models directory from `edge-ai-suites/education-ai-suite/smart-classroom/models` and try again. |
217 | | -- If you face a tokenizer load issue like this: |
218 | | - ``` bash |
219 | | - Either openvino_tokenizer.xml was not provided or it was not loaded correctly. Tokenizer::encode is not available |
220 | | - ``` |
221 | | - Delete the models folder from `edge-ai-suites/education-ai-suite/smart-classroom/models` and try again. |
| 29 | +• [Release Notes](./docs/user-guide/release-notes.md) |
0 commit comments