deotalandAi/.trae/documents/调用小智服务获取音色列表并打印.md

23 lines
486 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. 首先将XiaozhiServer类集成到utils/src/index.js中
2. 然后在AddAgent.vue中从@deotaland/utils导入XiaozhiServer
3. 最后调用getTtsList()方法并打印结果
具体修改步骤:
1. 修改utils/src/index.js
* 导入XiaozhiServer类
* 将XiaozhiServer添加到deotalandUtils对象中
* 将XiaozhiServer添加到命名导出列表
2. 修改AddAgent.vue
* 从@deotaland/utils导入XiaozhiServer
* 创建XiaozhiServer实例
* 在onMounted