Skip to main content

cqqz_agent

cqqz 数字人 Python 控制 SDK。从 ICT 数字人 SDK 的 ict_agent 中拆出数字人相关代码独立成包,接口与原包对应模块保持一致。

SDK 是 Unity 的控制客户端,不是独立的数字人渲染程序,也不包含 Python 端大模型推理服务。

包含的模块

模块 用途
cqqz_agent.core WebSocket 连接、SDK 版本校验、请求与响应等待
cqqz_agent.DigitalHuman DigtalHuman 类:人物外观、动作、语音、直播、消防路线
cqqz_agent.Public 场景进入、截图、相机、公共音频、场景元素、PDF 投屏
cqqz_agent.Document PDF 逐页转 PNG(依赖 PyMuPDF,仅 PDF 投屏时用到)

不包含 Robot、UAV、Math 等与数字人无关的模块。

安装

方式一:把 cqqz_agent 文件夹放到脚本同目录,直接 import cqqz_agent。

方式二:在本目录执行安装(推荐使用目标环境自己的虚拟环境):

python -m pip install .

数字人基础功能只依赖 websocket-client;使用 PDF 投屏时再安装 PyMuPDF (或用 python -m pip install .[document])。dist/ 目录下的 wheel 可在目标机器离线安装:

python -m pip install dist\cqqz_agent-1.0.0-py3-none-any.whl
python -m pip install PyMuPDF

使用

from cqqz_agent import Public
from cqqz_agent.DigitalHuman import DigtalHuman

if not Public.enter_scene("数字人舞台"):
    raise SystemExit("进入场景失败")

human = DigtalHuman().init_human("Female")
human.set_name("小美")
human.play_text_content("大家好,我是数字人小美。")
  • 首次导入 cqqz_agent.DigitalHuman 或 cqqz_agent.Public 就会连接 Unity 并初始化场景,导入前请先启动 Unity 并确认 10088 端口可用。

  • 默认地址为 ws://127.0.0.1:10088/cxx。Python 与 Unity 不在同一台电脑时,在导入前设置环境变量:

    set ICT_UNITY_WS=ws://192.168.0.192:10088/cxx
    
  • 类名 DigtalHuman 沿用了原 SDK 的拼写;DigitalHuman 是其别名,二者相同。

  • 只运行一个控制脚本,不要求也不支持多个 Python 客户端同时控制。

  • 在普通 .py 脚本主线程中顺序调用,不要放在已运行事件循环的 Notebook / 异步服务里。

与 ict_agent 的对应关系

原导入 新导入
from ict_agent.DigitalHuman import DigtalHuman from cqqz_agent.DigitalHuman import DigtalHuman
from ict_agent import Public from cqqz_agent import Public
from ict_agent.Public import audio from cqqz_agent.Public import audio

命令行接口与返回值规则不变,详见原 SDK 的《ICT 数字人 Python 使用手册》。

Metadata

Release files for cqqz-agent 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cqqz-agent 1.0.0
File Size Uploaded Provenance Actions
cqqz_agent-1.0.0.tar.gz 11.4 kB Without provenance Details for cqqz_agent-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cqqz-agent 1.0.0
File Interpreter ABI Platform Actions
cqqz_agent-1.0.0-py3-none-any.whl Python 3 none any Details for cqqz_agent-1.0.0-py3-none-any.whl

Total release size: 22.9 kB

Release files / cqqz_agent-1.0.0.tar.gz

Download URL cqqz_agent-1.0.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
da710ab9952ec67b0688ac07ff86aabaefa4b2514bc1c57d39f260817e1f5377
BLAKE2b-256 checksum
How to use checksums
73ce8163b1f159170c1c9236bf19adab89bc55cb38b440f18095f6800d3d088f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.10

Release files / cqqz_agent-1.0.0-py3-none-any.whl

Download URL cqqz_agent-1.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bb02775f442c11ca8315c14731f7149367e7d32718beea0a61f15d7926f4788
BLAKE2b-256 checksum
How to use checksums
d4e9e91062f5f5d17c66c2f7b36f84a151c9a01350a3052e3a866ba1fa0133d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.10

Security for cqqz-agent 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page