1. Project Overview
The Social Worker Assistant is a portable smart terminal, based on STM32F407 microcontroller + ESP8266 WiFi module, equipped with an OLED screen, microphone, and small speaker, enabling intelligent Q&A and information services between frontline social workers and residents.
Its biggest highlight is the support for dual-mode operation:
-
Cloud Mode: When connected to the internet, it calls large language models (such as GPT, Wenxin Yiyan, etc.) to achieve high-quality Q&A.
-
Local Mode: When there is no network, it relies on lightweight local models (such as TinyLlama) to provide basic Q&A and voice interaction.
This design ensures that social workers can continuously provide services to residents regardless of the network environment.
2. Hardware Design
Core Hardware Configuration:
-
Main Control Chip: STM32F407 — a high-performance ARM Cortex-M4 processor, ensuring stable control and task scheduling.
-
Communication Module: ESP8266 — a low-cost WiFi module, connecting to the cloud large model API.
-
Interaction Interface: OLED display (for showing text responses), microphone (for voice input), small speaker (for voice output).
-
Power Supply Solution: Built-in lithium battery + USB charging module, ensuring portability.
This hardware solution is cost-effective yet meets the demands of intelligent Q&A, making it very suitable for large-scale deployment.
3. Software Architecture
The software adopts a modular architecture, with core functions as follows:
Voice Recognition Module:
-
Local: PocketSphinx / Whisper.cpp
-
Cloud: Call API services
Model Invocation Module:
-
Cloud: Initiate requests to GPT/Wenxin Yiyan/Tongyi Qianwen, etc. via ESP8266
-
Local: Run lightweight models (TinyLlama, GGML quantized version)
Text Processing Module: Converts the model’s output into concise responses.
Speech Synthesis Module: Uses lightweight TTS to broadcast results to residents.
User Interface: OLED displays text answers, and the small speaker broadcasts results.
Software Pseudocode Example:
// Initialize modules
init_STM32();
init_ESP8266();
init_OLED();
init_Microphone();
init_Speaker();
while (1) {
char* input = record_voice(); // Record and convert to text
if (wifi_connected()) {
char* response = query_cloud_LLM(input); // Cloud large model
display_OLED(response);
play_TTS(response);
} else {
char response = run_local_model(input); // Local lightweight model
display_OLED(response);
play_TTS(response);
}
}
4. Application Scenarios
1. Community Visits
During community visits, residents may raise questions about medical, educational, and social security policies. The assistant can quickly provide answers, even without internet access, offering basic guidance.
2. Consultation for Migrant Workers
Migrant workers are often unfamiliar with policies; social workers can use the assistant terminal to help them answer questions about residence permits, medical insurance, and children’s education, improving service efficiency.
3. Services for Vulnerable Groups
Senior citizens and people with disabilities may find it difficult to access policy information online. Social workers can provide them with a convenient information access channel through the voice assistant.
5. Project Advantages
-
Low Cost: Based on common development boards and open-source solutions, the overall hardware cost is much lower than that of commercial smart terminals.
-
Dual-Mode Operation: Compatible with both cloud and local modes, ensuring continuous availability.
-
High Social Value: Provides convenience for community residents, especially vulnerable groups, enhancing the efficiency of social work.
-
Strong Scalability: Future integration with cameras for image recognition; or adding multilingual support to serve more groups.
6. Future Prospects
The Social Worker Assistant is just one form of implementing embedded large models. In the future, it can:
-
Integrate with community service center databases to achieve personalized Q&A.
-
Expand to applications in education, healthcare, and elderly care.
-
Create a complete “Social Worker AI Assistant Matrix” to form a smart community service ecosystem.