# aigcpanel **Repository Path**: huwei2023/aigcpanel ## Basic Information - **Project Name**: aigcpanel - **Description**: AigcPanel 是一个简单易用的一站式AI数字人系统,支持视频合成、声音合成、声音克隆,简化本地模型管理、一键导入和使用AI模型。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: https://aigcpanel.com - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 214 - **Created**: 2025-08-31 - **Last Updated**: 2026-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AIGenX !\[]\(./screenshots/cn/home.png null) !\[star]\( null) [!\[star\](https://img.shields.io/badge/WEB-aigenx.com-blue null)](https://aigenx.com) [!\[star\](https://img.shields.io/github/stars/modstart-lib/aigenx.svg null)](https://github.com/modstart-lib/aigenx) [!\[star\](https://gitee.com/modstart-lib/aigenx/badge/star.svg null)](https://gitee.com/modstart-lib/aigenx) [!\[star\](https://gitcode.com/modstart-lib/aigenx/star/badge.svg null)](https://gitcode.com/modstart-lib/aigenx) ## 软件介绍 `AIGenX` 是一个简单易用的一站式 AI 数字人系统,小白也可使用。 支持视频合成、声音合成、声音克隆,简化本地模型管理、一键导入和使用 AI 模型。 > 禁止使用本产品进行违法违规业务,使用本软件请遵守中华人民共和国法律法规。 ## 功能特性 - 支持视频数字人合成,支持视频画面和声音换口型匹配 - 支持语音合成、语音克隆、视频声音替换,多种声音参数可设置 - 支持多模型导入、一键启动、模型设置、模型日志查看 - 支持国际化,支持简体中文、英语 - 支持多种模型一键启动包 ## 模型支持 ### 声音合成 - 声音模型 [CosyVoice-300M](https://github.com/FunAudioLLM/CosyVoice) - 声音模型 [CosyVoice-300M-Instruct](https://github.com/FunAudioLLM/CosyVoice) - 声音模型 [CosyVoice2-0.5b](https://github.com/FunAudioLLM/CosyVoice) - 声音模型 [FishSpeech](https://github.com/fishaudio/fish-speech) - 声音模型 [IndexTTS](https://github.com/index-tts/index-tts) - 声音模型 [SparkTTS](https://github.com/SparkAudio/Spark-TTS) - 声音模型 [GPT-SoVITS](https://github.com/RVC-Boss/GPT-SoVITS) ### 声音识别 - 声音识别模型 [FunASR](https://github.com/modelscope/FunASR) ### 视频模型 - 视频模型 [MuseTalk](https://github.com/TMElyralab/MuseTalk) - 视频模型 [LatentSync](https://github.com/bytedance/LatentSync) - 视频模型 [Wav2Lip](https://github.com/Rudrabha/Wav2Lip) - 视频模型 [Heygem](https://github.com/duixcom/Duix.Heygem) ## 功能预览 ### 视频合成 !\[]\(./screenshots/cn/video-gen.png null) ### 我的形象 !\[]\(./screenshots/cn/video-template.png null) ### 语音克隆 !\[]\(./screenshots/cn/sound-clone.png null) ### 语音合成 !\[]\(./screenshots/cn/sound-tts.png null) ### 模型管理 !\[]\(./screenshots/cn/server.png null) ## 安装使用 ### Windows - 访问 下载 Windows 安装包,一键安装即可 安装完成后,打开软件,下载模型一键启动包,即可使用。 ## 开发与架构规范 ### 跨线程数据传递规范 为确保在 Electron IPC、Web Worker 或多线程环境中的端到端推理稳定性,跨线程数据传递需遵循以下要求: 1. **仅传递纯数据**:所有传递的对象必须是可结构化克隆(structured cloneable)的纯数据类型(如 plain object, TypedArray, ArrayBuffer, string, number 等)。 2. **避免不可克隆对象**:严禁通过 `postMessage`、`ipcRenderer.invoke` 传递含有以下内容的对象: - 函数(Functions) - Vue 的 Proxy 响应式对象或带有 getters/setters 的包装对象 - 包含循环引用的对象 - DOM 节点 - 未处理的复杂实例(如包含定时器 timer、shell controller 等运行时上下文的对象) 3. **大数据传输优化**:当需要传递大型 Tensor 或 GPU Buffer 时,应采用 SharedArrayBuffer + Atomics,或者将 Tensor 序列化为 ArrayBuffer(形状描述 + 扁平化的 TypedArray)后再进行传输,并在接收端重新构建。或者通过消息指令传递权重 ID 而非直接透传内存对象。 4. **防御式编程**:在任何可能抛出 `DataCloneError: The object could not be cloned` 异常的数据传递入口(如 `IndexTTSService.ts` 发起本地调用时),必须采用 `try/catch` 进行捕获,自动剥离不可序列化的属性(如 `runtime`, `status`),并记录友好日志以防止流程崩溃。 ### 编码要求 - **终端与日志编码**:所有控制台输出及写入本地文件的日志均强制采用 **UTF-8** 编码,彻底杜绝中文乱码问题。 - **启动脚本设置**:在 `start.bat` 等启动脚本中已显式执行 `chcp 65001` 及 `set "LANG=en_US.UTF-8"`,确保 Windows 终端环境下的正确渲染。 - **代码输出层**:在 `electron/mapi/log/index.ts` 等日志处理模块中,已接入 `iconv-lite` 对 `utf8` 字节流的强制编码支持,替换了原有的 `cp936`,保证任何非 UTF-8 字节流自动转码后写入。 ## 模型自定义接入 一个模型即是一个文件夹,至少包含 config.json 和 server.js 两个文件。 ``` |- 模型文件夹/ |-|- config.json - 模型配置文件 |-|- server.js - 模型对接文件 |-|- xxx - 其他模型文件,推荐将模型文件放在 model 文件夹下 ``` ### 简易接入 #### 简易接入 > 需要掌握 python 开发能力 首先需要将 python 环境打包到同一个目录,比如 `_aienv` ,然后可以通过 `python run.py ./config.json` 的方式运行模型。 模型运行之后,通过标准输入输出的方式运行模型,通过标准输入传递参数,通过标准输出返回结果。 ```python # 输出格式为 AIGenXRunResult[id][base64(json(data))] import json, base64 # 解析输入配置文件 config = json.loads(open(sys.argv[1], 'r').read()) modelConfig = config['modelConfig'] def printResult(key,value): global config print(f'AIGenXRunResult[{config["id"]}][' + base64.b64encode(json.dumps({key: value}).encode()).decode()+']') # 公共输出 ## 输出给前端的是否是以 CUDA 运行 printResult('UseCuda', True) ## 语音合成输出结果 printResult('url', '/path/to/result.wav') ## 语音克隆输出结果 printResult('url', '/path/to/result.wav') ## 视频对口型输出结果 printResult('url', '/path/to/result.mp4') ``` #### config.json 文件示例 ```json5 { name: "server-xxx", // 模型名称 version: "0.1.0", // 模型版本 title: "语音模型", // 模型标题 description: "模型描述", // 模型描述 deviceDescription: "设备描述", platformName: "win", // 支持系统,win, osx, linux platformArch: "x86", // 支持架构,x86, arm64 serverRequire: ">=0.5.0", // 对 AIGenX 版本的要求,如 >=0.5.0 entry: "__EasyServer__", // 固定值,不需要修改 easyServer: { // python 运行入口 entry: "./_aienv/bin/python", entryArgs: ["run.py", "${CONFIG}"], // 环境变量 envs: ["AAA=1"], }, functions: [ "videoGen", // 支持视频生成 "soundTTS", // 支持语音合成 "soundClone", // 支持语音克隆 ], settings: [ // 模型配置项,可以显示在模型配置页面 { name: "port", type: "text", title: "服务端口", default: "", placeholder: "留空会检测使用随机端口", }, ], } ``` #### 测试导入 完成两个文件的开发之后,在软件中尝试选择模型文件夹中的 config.json 导入。 ### 高级接入 > 需要掌握 js 开发能力 #### config.json 文件示例 ```json5 { name: "server-xxx", // 模型名称 version: "0.1.0", // 模型版本 title: "语音模型", // 模型标题 description: "模型描述", // 模型描述 deviceDescription: "设备描述", platformName: "win", // 支持系统,win, osx, linux platformArch: "x86", // 支持架构,x86, arm64 serverRequire: ">=0.5.0", // 对AIGenX版本的要求,如 >=0.5.0 entry: "main.exe", // 入口文件 functions: [ "videoGen", // 支持视频生成 "soundTTS", // 支持语音合成 "soundClone", // 支持语音克隆 ], settings: [ // 模型配置项,可以显示在模型配置页面 { name: "port", type: "text", title: "服务端口", default: "", placeholder: "留空会检测使用随机端口", }, ], } ``` > 添加好友请备注 AIGenX