亲爱的AigcPanel用户们,
我们怀着激动的心情宣布,AigcPanel v0.5.0
版本正式发布了!这次更新不仅带来了多项性能优化,还新增了对CosyVoice2
模型的支持,让您的创作之旅更加丰富多彩!
我们深知声音在创作中的重要性,因此特别引入了CosyVoice2
模型。这款模型以其出色的语音合成能力和自然流畅的语调,赢得了众多用户的喜爱。现在,您可以在AigcPanel
中轻松使用CosyVoice2
,为您的作品增添更加生动、逼真的声音效果。
AigcPanel
是一个简单易用的一站式AI数字人系统,小白也可使用。 支持视频合成、声音合成、声音克隆,简化本地模型管理、一键导入和使用AI模型。
禁止使用本产品进行违法违规业务,使用本软件请遵守中华人民共和国法律法规。
MuseTalk、cosyvoice、cosyvoice2
2025-02-24\
新增:模型添加是否支持检测,过滤不支持的模型\
新增:模型 CosyVoice-0.5b 模型\
新增:模型 CosyVoice-300m-instruct 模型\
优化:导出文件名过滤特殊字符,文件命名失败问题\
优化:优化 Token not found 错误提示,错误显示更加清晰\
优化:模型启动和停止逻辑优化,提高启动成功率
访问 https://aigcpanel.com
下载安装包,一键安装即可\
安装完成后,打开软件,下载模型一键启动包,即可使用。
模型文件夹格式,只需要编写 config.json
和 server.js
两个文件即可。
|- 模型文件夹/\
|-|- config.json - 模型配置文件\
|-|- server.js - 模型对接文件\
|-|- xxx - 其他模型文件,推荐将模型文件放在 model 文件夹下
"name": "server-xxx", // 模型名称
"version": "0.1.0", // 模型版本
"title": "语音模型", // 模型标题
"description": "模型描述", // 模型描述
"platformName": "win", // 支持系统,win, osx, linux
"platformArch": "x86", // 支持架构,x86, arm64
"entry": "server/main", // 入口文件,一键启动包文件
"functions": [
"videoGen", // 支持视频生成
"soundTTS", // 支持语音合成
"soundClone" // 支持语音克隆
],
"settings": [ // 模型配置项,可以显示在模型配置页面
{
"name": "port",
"type": "text",
"title": "服务端口",
"default": "",
"placeholder": "留空会检测使用随机端口"
}
]
}
```const serverRuntime = {
port: 0,
}
let shellController = null
module.exports = {
ServerApi: null,
// 模型启动后的路径
_url() {
return http://localhost:${serverRuntime.port}/
},
_send(serverInfo, type, data) {
this.ServerApi.event.sendChannel(serverInfo.eventChannelName, {type, data})
},
// 模型初始化
async init(ServerApi) {
this.ServerApi = ServerApi;
},
// 模型启动
async start(serverInfo) {
console.log(‘start’, JSON.stringify(serverInfo))
this._send(serverInfo, ‘starting’, serverInfo)
let command = []
if (serverInfo.setting?.[‘port’]) {
serverRuntime.port = serverInfo.setting.port
} else if (!serverRuntime.port || !await this.ServerApi.app.isPortAvailable(serverRuntime.port)) {
serverRuntime.port = await this.ServerApi.app.availablePort(50617)
}
if (serverInfo.setting?.[‘startCommand’]) {
command.push(serverInfo.setting.startCommand)
} else {
// 这里是模型启动命令
//command.push("${serverInfo.localPath}/server/main"
)
}
shellController = await this.ServerApi.app.spawnShell(command, {
cwd: serverInfo.localPath,
env: {
AA:11,
BB:22
},
stdout: (data) => {
this.ServerApi.file.appendText(serverInfo.logFile, data)
},
stderr: (data) => {
this.ServerApi.file.appendText(serverInfo.logFile, data)
},
success: (data) => {
this._send(serverInfo, ‘success’, serverInfo)
},
error: (data, code) => {
this.ServerApi.file.appendText(serverInfo.logFile, data)
this._send(serverInfo, ‘error’, serverInfo)
},
})
},
// 模型启动检测
async ping(serverInfo) {
try {
// const res = await this.ServerApi.request(${this._url()}info
)
return true
} catch (e) {
}
return false
},
// 模型停止
async stop(serverInfo) {
this._send(serverInfo, ‘stopping’, serverInfo)
try {
shellController.stop()
shellController = null
} catch (e) {
console.log(‘stop error’, e)
}
this._send(serverInfo, ‘stopped’, serverInfo)
},
// 模型配置
async config() {
return {
“code”: 0,
“msg”: “ok”,
“data”: {
“httpUrl”: shellController ? this._url() : null,
“functions”: {
“videoGen”: {
“param”: [
{
name: “box”,
type: “inputNumber”,
title: “嘴巴张开度”,
defaultValue: -7,
placeholder: “”,
tips: ‘嘴巴张开度可以控制生成视频中嘴巴的张开程度’,
min: -9,
max: 9,
step: 1,
}
]
},
}
}
}
},
// 视频生成
async videoGen(serverInfo, data) {
console.log(‘videoGen’, serverInfo, data)
const resultData = {
// success, querying, retry
type: ‘success’,
start: 0,
end: 0,
jobId: ‘’,
data: {
filePath: null
}
}
resultData.start = Date.now()
// 发送生成命令
// …
// console.log(‘videoGen.result’, JSON.stringify(result))
resultData.end = Date.now()
resultData.data.filePath = result.data[0].value.video.path
return {
code: 0,
msg: ‘ok’,
data: resultData
}
},
}
```
electron\
vue3\
typescript\
wav2lip
仅在 node 20 测试过
npm install
npm run dev
npm run build
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号