Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
基于 DEEP_AUDIT_REPORT.md 修复 2 CRITICAL + 4 HIGH + 1 MEDIUM 问题: - C1: PromptOnly 技能集成 LLM 调用 — 定义 LlmCompleter trait, 通过 LlmDriverAdapter 桥接 zclaw_runtime::LlmDriver, PromptOnlySkill.execute() 现在调用 LLM 生成内容 - C2: 反思引擎空记忆 bug — 新增 query_memories_for_reflection() 从 VikingStorage 查询真实记忆传入 reflect() - H7: Agent Store 接口适配 — KernelClient 添加 listClones/createClone/ deleteClone/updateClone 方法,映射到 agent_* 命令 - H8: Hand 审批检查 — hand_execute 执行前检查 needs_approval, 需审批返回 pending_approval 状态 - M1: 幽灵命令注册 — 注册 hand_get/hand_run_status/hand_run_list 三个 Tauri 桩命令 - H1/H2: SpeechHand/TwitterHand 添加 demo 标签 - H5: 归档过时 VERIFICATION_REPORT 文档更新: DEEP_AUDIT_REPORT.md 标记修复状态,README.md 更新 关键指标和变更历史。整体完成度从 ~50% 提升至 ~58%。
128 lines
2.6 KiB
TOML
128 lines
2.6 KiB
TOML
# Speech Hand - 语音合成能力包
|
|
#
|
|
# ZCLAW Hand 配置
|
|
# 提供文本转语音 (TTS) 能力,支持多种语音和语言
|
|
|
|
[hand]
|
|
name = "speech"
|
|
version = "1.0.0"
|
|
description = "语音合成能力包 - 将文本转换为自然语音输出"
|
|
author = "ZCLAW Team"
|
|
|
|
type = "media"
|
|
requires_approval = false
|
|
timeout = 120
|
|
max_concurrent = 3
|
|
|
|
tags = ["speech", "tts", "voice", "audio", "education", "accessibility", "demo"]
|
|
|
|
[hand.config]
|
|
# TTS 提供商: browser, azure, openai, elevenlabs, local
|
|
provider = "browser"
|
|
|
|
# 默认语音
|
|
default_voice = "default"
|
|
|
|
# 默认语速 (0.5 - 2.0)
|
|
default_rate = 1.0
|
|
|
|
# 默认音调 (0.5 - 2.0)
|
|
default_pitch = 1.0
|
|
|
|
# 默认音量 (0 - 1.0)
|
|
default_volume = 1.0
|
|
|
|
# 语言代码
|
|
default_language = "zh-CN"
|
|
|
|
# 是否缓存音频
|
|
cache_audio = true
|
|
|
|
# Azure TTS 配置 (如果 provider = "azure")
|
|
[hand.config.azure]
|
|
# voice_name = "zh-CN-XiaoxiaoNeural"
|
|
# region = "eastasia"
|
|
|
|
# OpenAI TTS 配置 (如果 provider = "openai")
|
|
[hand.config.openai]
|
|
# model = "tts-1"
|
|
# voice = "alloy"
|
|
|
|
# 浏览器 TTS 配置 (如果 provider = "browser")
|
|
[hand.config.browser]
|
|
# 使用系统默认语音
|
|
use_system_voice = true
|
|
# 语音名称映射
|
|
voice_mapping = { "zh-CN" = "Microsoft Huihui", "en-US" = "Microsoft David" }
|
|
|
|
[hand.triggers]
|
|
manual = true
|
|
schedule = false
|
|
webhook = false
|
|
|
|
[[hand.triggers.events]]
|
|
type = "chat.intent"
|
|
pattern = "朗读|念|说|播放语音|speak|read|say|tts"
|
|
priority = 5
|
|
|
|
[hand.permissions]
|
|
requires = [
|
|
"speech.synthesize",
|
|
"speech.play",
|
|
"speech.stop"
|
|
]
|
|
|
|
roles = ["operator.read"]
|
|
|
|
[hand.rate_limit]
|
|
max_requests = 100
|
|
window_seconds = 3600
|
|
|
|
[hand.audit]
|
|
log_inputs = true
|
|
log_outputs = false # 音频不记录
|
|
retention_days = 3
|
|
|
|
# 语音动作定义
|
|
[[hand.actions]]
|
|
id = "speak"
|
|
name = "朗读文本"
|
|
description = "将文本转换为语音并播放"
|
|
params = { text = "string", voice = "string?", rate = "number?", pitch = "number?" }
|
|
|
|
[[hand.actions]]
|
|
id = "speak_ssml"
|
|
name = "朗读 SSML"
|
|
description = "使用 SSML 标记朗读文本(支持更精细控制)"
|
|
params = { ssml = "string", voice = "string?" }
|
|
|
|
[[hand.actions]]
|
|
id = "pause"
|
|
name = "暂停播放"
|
|
description = "暂停当前语音播放"
|
|
params = {}
|
|
|
|
[[hand.actions]]
|
|
id = "resume"
|
|
name = "继续播放"
|
|
description = "继续暂停的语音播放"
|
|
params = {}
|
|
|
|
[[hand.actions]]
|
|
id = "stop"
|
|
name = "停止播放"
|
|
description = "停止当前语音播放"
|
|
params = {}
|
|
|
|
[[hand.actions]]
|
|
id = "list_voices"
|
|
name = "列出可用语音"
|
|
description = "获取可用的语音列表"
|
|
params = { language = "string?" }
|
|
|
|
[[hand.actions]]
|
|
id = "set_voice"
|
|
name = "设置默认语音"
|
|
description = "更改默认语音设置"
|
|
params = { voice = "string", language = "string?" }
|