rtc-voice-chat/Server
2025-06-23 20:49:20 +08:00
..
scenes feat: Simplify the code & remove useless components. 2025-06-23 20:49:20 +08:00
.npmrc feat: Open source the rtc aigc demo 2024-10-25 22:14:46 +08:00
app.js feat: Simplify the code & remove useless components. 2025-06-23 20:49:20 +08:00
nodemon.json feat: upgrade sdk version && refactor configuration 2025-06-19 20:00:02 +08:00
package.json feat: Simplify the code & remove useless components. 2025-06-23 20:49:20 +08:00
README.md feat: Simplify the code & remove useless components. 2025-06-23 20:49:20 +08:00
token.js feat: upgrade sdk version && refactor configuration 2025-06-19 20:00:02 +08:00
util.js feat: Simplify the code & remove useless components. 2025-06-23 20:49:20 +08:00
yarn.lock feat: Simplify the code & remove useless components. 2025-06-23 20:49:20 +08:00

Node Server

启动命令

yarn

yarn dev

使用须知

Node 服务启动时会自动读取 Server/scenes 下的所有文件作为可用的场景, 并通过接口 API 返回相关信息。

因此,您需要:

  1. Server/scenes 目录下参考其它 JSON 的格式, 自定义创建一个 xxxx.json 文件,用于描述您的场景,其中 xxxx 为场景名称。
  2. 确保您的 .json 文件符合模版定义(可参考 Custom.json), 大小写敏感。
  3. 新增场景 JSON 后须重启 Node 服务,保证场景信息被正常读取。
  4. JSON 文件中, 若 RTCConfig.RoomIdRTCConfig.UserIdRTCConfig.Token 其中之一未填写, Node 服务将自动生成对应的值以保证对话可以正常启动。

相关参数获取

注意

  • 相关错误会通过服务端接口返回。
  • Node 服务会根据您配置的 VoiceChat 中是否存在视觉模型相关的配置返回相关信息给前端页面, 从而控制相关 UI 是否展示。
  • 使用时请留意相关服务已开通。