1. pom文件中加入下面配置,访问国内镜像源
6. 企业知识库项目kmatrix
2. 小智开源ai项目:部署
3. 小智web端启动:xiaozhi-esp32-web
4. 小智配置一下可以忽略:参照官方配置即可
5. 小智MQTT 网关部署教程:部署文档
7. 支付策略:新增了汇付支付
8. 本机IP 192.168.3.173
9. 火山引擎的豆包 TTS:测试版本仅支持 2 个并发
10. asr模型 变tts模型 才能听到
传入的声音,使用asr模型将声音转为文本。再将文本使用TTS模型转换为语音。
详细内容如下:
2. 小智开源ai项目:部署
本地源码运行全模块:
部署文档https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/Deployment_all.md#方式二本地源码运行全模块
2.1 将下载的小智项目(xiaozhi-esp32-server-main),你需要把加压文件名改成 xiaozhi-esp32-server
2.2 先安装windows版的 Anaconda。
启动conda:搜索Anaconda prompt--》管理员运行
创建xioazhi环境:conda create -n xiaozhi-esp32-server python=3.10 -y
激活xioazhi环境:conda activate xiaozhi-esp32-server
2.3 安装libopus
下载libopus_v1.4_msvc17.zip: https://github.com/ShiftMediaProject/opus/releases
解压后放到系统目录:\Lib\site-packages下面全部放
最终是这个目录:D:\ProgramData\Anaconda3的安装目录\envs\your_env\Lib\site-packages\libopus_v1.4_msvc17\bin\x64\
2.4 安装FFmpeg
下载网页: https://github.com/GyanD/codexffmpeg/releases/tag/2026-02-26-git-6695528af6
查找full的文件下载:ffmpeg-2026-02-26-git-6695528af6-full_build.zip
win下载后解压出:bin/ffmpeg.exe
将ffmpeg.exe放入win系统path环境变量即可。
3. 小智web端启动:xiaozhi-esp32-web
npm install
npm run serve
4. 小智配置:以下可以忽略,参照官方配置即可
1. 登录web智控台
顶部菜单找到参数管理--》编码:server.ota--》输入你的OTA接口
http://192.168.3.173:8002/xiaozhi/ota/
顶部菜单找到参数管理--》编码:server.websocket-->输入你的Websocket接口
ws://192.168.3.173:8000/xiaozhi/v1/
5. 小智MQTT 网关部署教程:部署文档: https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md
如果你是源码部署,你的mqtt-websocket地址是:
ws://192.168.3.173:8000/xiaozhi/v1/?from=mqtt_gateway
6. 企业知识库项目kmatrix:
领导提供的版本: https://gitee.com/kyxxjs/kmatrix-service https://gitee.com/kyxxjs/kmatrix-web
官方开源的专业版: https://gitee.com/kyxxjs/km_community
onnx Runtime(ort)windows深度学习模型部署:
下载地址:https://github.com/microsoft/onnxruntime/releases/tag/v1.24.3
点击此文件下载:onnxruntime-win-x64-1.24.3.zip
如果是conda环境:将解压包放到此目录下 D:\xxx\Anaconda\envs\xiaozhi-esp32-server\Lib\site-packages
将目录(D:\xxx\onnxruntime-win-x64-1.24.3\) 配置到环境变量path目录
***onnx还是无法使用(安装后既可以使用),需要安装 Visual C++ 可再发行运行库:下载页面 https://learn.microsoft.com/zh-cn/cpp/windows/latest-supported-vc-redist 下载文件: vc_redist.x64.exe
创建项目环境:conda create -n base1 python=3.10 -y // python必须3.7以上版本
激活环境: conda activate base1
安装ONNX :没有搭建成功
下载模型(没下成功):https://rapidai.github.io/RapidOCRDocs/main/blog/2024/04/12/已有onnx模型下载/
// 在conda中安装ONNX:pip install onnx
powerShell下执行: pip install onnxruntime
//手动下载ONNX: https://github.com/microsoft/onnxruntime/releases
项目配置:文件:pom.xml 里 <profiles.active>sample</profiles.active>将dev改为sample
部署pg库:
docker pull postgres:16
docker run --name postgres -e POSTGRES_PASSWORD=password -d -p 5432:5432 postgres:16
链接pg库,创建database kmatrix
部署es:(不用装也能启动)
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:8.9.0
kmatrix web项目:
pnpm i
pnpm run build
pnpm dev:admin 在跟目录启动项目
pnpm dev:chat
7. 支付策略:新增了汇付支付。策略对象使用ReflectUtil.newInstance出对应对象(不是从spring中获取)
提交订单:PayOrderServiceImpl.submitOrder--》
通过渠道id获取client:channelService.getPayClient(channel.getId())
PayChannelServiceImpl.getPayClient():查询配置表pay_channel字段config,获取支付配置参数如:appid、secretKey、配置对象类class名字,所有的接口配置参数都放到这个表的config字段。
-->PayClientFactoryImpl.createOrUpdatePayClient : 将client对象缓存到map里面。//***
-->PayClientFactoryImpl.createPayClient:new client对象(client对象是调支付post接口) // ***
AbstractPayClient.unifiedOrder //支付抽象类,提交订单抽象方法
AbstractPayClient.parseOrderNotify //支付抽象类,支付回调抽象方法
AbstractPayClient.unifiedRefund //支付抽象类,退款抽象方法
AbstractHuifuPayClient 抽象client,主要是初始化方法:doInit、回调接口实现、退款接口实现
HuifuPayClient继承了AbstractHuifuPayClient:主要是:构造方法、下单接口实现
支付配置表pay_channel.config:字段config值如下
{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientConfig","serverUrl":"https://openapi-sandbox.dl.alipaydev.com/gateway.do","appId":"2","signType":"RSA2","mode":1,"privateKey":"1","alipayPublicKey":"2","appCertContent":"","alipayPublicCertContent":"","rootCertContent":"","encryptType":"","encryptKey":""}
{"@class":"cn.iocoder.yudao.framework.pay.core.client.impl.huifu.HuifuPayConfig","name":"huifu-conf","host":"https://uatacquire.cloudpnr.com","appId":"20000","accessCode":"998822e76540cff183b5d9e3172a311f","secretKey":"fr7zlr7enm8nbc68mgv4zcdbaw1ci4o8hjpd8w656d9opzj6tf7du01vb2l7cz0acp4gsrpuu39arw0vmzgqv9mctwllkjvder14orsl72czetc295ue3ix0oddzaajeap4gstpz3e9rjun18nsphr0a746zmxurw16fc4aqjrhuq4l2gk2adk8sj3shdv3mvt5ose0i8uq67kbo1jxgbdt9ynw5nncs3k881jl7oihs5dc1fput3tvp4djw5m4bac9velhis5xv4hbjd4hwm2o5927akerxpk5t8aj2gwv6hnysuv35slw5q7ekomr72xob3ry7h6hbcegn8sxz5ps6rebdo2o1n8d1cr2pk6xlfdoldkv5r4flc289smu04jxlqevf9iuqksscq7ut06yq4ztidfucx5p6r986ls5s12tcrhcwcz7rcexwl3rkwsto9vc69c2oeh8ca1fx0wtk9cos4f5gvlfmpjjyla93lv6an9tnj0v45m2mdx15"}
汇付支付:参数HuifuPayConfig对象,存放公共参数:appId、accessCode、secretKey、host、name
1. pom文件中加入下面配置,访问国内镜像源
<!-- 使用 huawei / aliyun 的 Maven 源,提升下载速度 -->
<repositories>
<repository>
<id>huaweicloud</id>
<name>huawei</name>
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
</repository>
<repository>
<id>aliyunmaven</id>
<name>aliyun</name>
<url>https://maven.aliyun.com/repository/public</url>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
工作笔记,支付策略模式,小智ai项目搭建,pom文件加入配置,访问国内镜像2026年3月12日
于 2026-03-12 11:05:36 首次发布
sensevoice-small-轻量级多任务语音模型的 ONNX 量化版WebUI V1.0
文本生成
语音识别
SenseVoiceSmall
端侧应用:手机 / 平板 / 嵌入式设备的离线语音助手、实时字幕。 边缘计算:无 GPU 服务器的语音转写、客服质检、会议纪要。 隐私敏感场景:医疗 / 金融等需本地处理语音数据的业务。 低资源环境:带宽有限或算力不足的设备与场景。
您可能感兴趣的与本文相关的镜像
sensevoice-small-轻量级多任务语音模型的 ONNX 量化版WebUI V1.0
文本生成
语音识别
SenseVoiceSmall
端侧应用:手机 / 平板 / 嵌入式设备的离线语音助手、实时字幕。 边缘计算:无 GPU 服务器的语音转写、客服质检、会议纪要。 隐私敏感场景:医疗 / 金融等需本地处理语音数据的业务。 低资源环境:带宽有限或算力不足的设备与场景。

541

被折叠的 条评论
为什么被折叠?



