# device_server **Repository Path**: largebigsuper/device_server ## Basic Information - **Project Name**: device_server - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-14 - **Last Updated**: 2025-07-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Async IoT Backend 一个支持设备注册、WebSocket 实时通信、用户登录、指令控制的异步后端系统。 ## 模块功能 - 用户注册/登录(JWT) - 设备注册与信息查询 - WebSocket 长连接通信(含 token 鉴权) - MySQL 数据持久化 - Redis 缓存支持 - 容器化部署 ## 启动方式 ```bash uvicorn app.main:app --reload ``` ## proto生成 ```bash python -m grpc_tools.protoc -I=app/proto --python_out=app/proto app/proto/messages.proto ``` socket发送的字节流 前后增加标志位 audio可能被分配在多个message中 audio 应该也要出一个组装解决方案 ## 相关文档 [asr文档](https://help.aliyun.com/zh/model-studio/paraformer-real-time-speech-recognition-python-api?spm=a2c4g.11186623.help-menu-2400256.d_2_5_3_0_1.69872c4dynsIRA) [tts文档](https://help.aliyun.com/zh/model-studio/cosyvoice-python-api?spm=a2c4g.11186623.0.i7#d6bc1f133f871) [llm文档](https://help.aliyun.com/zh/model-studio/use-qwen-by-calling-api?spm=a2c4g.11186623.help-menu-2400256.d_2_1_0.3585289eeOxQpe) 现在要进行改造一下主要的作用是 主要流程: 1. 一个设备的ws接收到音频流 2. 发送给asr进行识别文字 3. asr识别结果发送给llm 4. llm输出结果发送给tts 5. tt合成语音发送给ws