← 返回 Skills 市场
xiaocaijic

ecommerce-voice-cs

作者 曹广雨 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
255
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install ecommerce-voice-cs
功能描述
电商 AI 语音技能。用于在 OpenClaw 或类似技能宿主中,按不同触发词独立启用两套互不干扰的能力:(1) 售后客服模式,将售后文本咨询按预设退款规则生成客服回复并输出 TTS 音频;(2) 电话推销模式,按产品名称、功能、优势和优惠范围生成推销话术并输出 TTS 音频。适用于需要模式切换、配置确认、音色选...
使用说明 (SKILL.md)

Ecommerce Voice CS

实现一个最小可集成的电商售后语音客服 skill。

Trigger

识别触发词:

  • 我需要你现在当一个客服机器人
  • 我需要你现在当一个推销员

这两个模式必须完全独立运行,不能共享会话状态、配置或业务逻辑。用户触发哪个模式,就只进入哪个模式。

售后模式

收到售后触发词后,不要立刻进入客服模式。先收集并确认这些配置:

  • api_key(可选;若未设置环境变量 SENSEAUDIO_API_KEY 时再提供)
  • refund_policy
  • unboxing_allowed
  • shipping_fee_by
  • audio_output_path
  • voice_id(可选,默认 child_0001_b

配置收集完整后,先给用户一份确认摘要。只有用户明确回复“确认进入”,才正式进入售后模式。

进入售后模式后,每次处理客户消息时都必须:

  1. 先生成文本客服回复
  2. 再生成 TTS 音频文件
  3. 在文本结尾附上“TTS 已生成成功,文件已保存到:\x3Cpath>

电话推销模式

收到推销触发词后,不要立刻进入推销模式。先收集并确认这些配置:

  • api_key(可选;若未设置环境变量 SENSEAUDIO_API_KEY 时再提供)
  • audio_output_path
  • product_name
  • product_features
  • product_advantages
  • discount_range
  • voice_id(可选,默认 child_0001_b

配置收集完整后,先给用户一份确认摘要。只有用户明确回复“开始”或确认进入,才正式进入电话推销模式。

进入电话推销模式后,每次处理客户消息时都必须:

  1. 先生成电话推销文本话术
  2. 再生成 TTS 音频文件
  3. 在文本结尾附上“TTS 已生成成功,文件已保存到:\x3Cpath>

Runtime Inputs

调用方应提供这些字段:

  • session_id: 会话标识。多轮配置和客服模式都依赖同一个 session_id
  • message: 用户输入文本
  • api_key: SenseAudio API Key,可选;优先通过环境变量 SENSEAUDIO_API_KEY 提供,未设置时再由调用方传入
  • voice_id: 已确认可用的 SenseAudio voice_id
  • refund_policy: 退款政策文本
  • unboxing_allowed: 是否支持拆封退货
  • shipping_fee_by: 运费承担方
  • audio_output_path: 音频输出目录
  • product_name: 电话推销产品名称
  • product_features: 电话推销产品功能
  • product_advantages: 电话推销产品优势
  • discount_range: 电话推销可优惠范围
  • audio_format: 可选,默认 .mp3

Playback Protocol

当 skill 成功生成音频时,返回结果除 audio_file 外,还会带一个 playback 字段,供宿主直接播放:

{
  "playback": {
    "action": "play_audio",
    "auto_play": true,
    "source_type": "local_file",
    "path": "tts_output\\cs_reply_20260315_210818.mp3",
    "format": "mp3",
    "mime_type": "audio/mpeg",
    "retain_file": true
  }
}

宿主约定:

  • playback 不为 nullplayback.action == "play_audio" 时,立即播放 playback.path
  • 播放完成后不要删除文件,因为 retain_file 固定为 true
  • 如果宿主不支持自动播放,至少保留 audio_fileplayback.path 供后续手动播放

Confirmed Voice IDs

只使用这 3 个已确认可用的 voice_id:

  • child_0001_b
  • male_0004_a
  • male_0018_a

如果调用方未指定 voice_id,默认使用 child_0001_b

Files

  • helper.py: 对外调用入口,包含售后模式和电话推销模式两套独立状态机
  • src/ecommerce_voice_cs/: 底层实现,包括状态管理、规则引擎、SenseAudio TTS 适配层

Notes

  • 当前仅接入公开可验证的 SenseAudio TTS 接口
  • 音色克隆上传接口未公开时,不实现 upload_sample 真正上传;直接使用现有 voice_id
  • TTS 接口文档:https://senseaudio.cn/docs/voice_api
安全使用建议
This skill appears to implement the advertised TTS customer-service and sales modes, but review the following before installing or running it: - Confirm API key handling: the code uses SENSEAUDIO_API_KEY (and optionally SENSEAUDIO_CLONE_API_URL). The registry metadata does not declare required env vars — ensure you provide a key only if you trust the SenseAudio integration and avoid supplying high-privilege or reused secrets. - Inspect and remove any accidental secret samples from the repo (.session_state files include a placeholder 'k'). Do not use repository sample tokens in production. - The skill writes session state to .session_state and writes/retains audio files to disk. Decide where audio should be stored, and periodically clean retained files to avoid disk growth. If your host automatically plays returned local files, consider disabling autoplay or validating file contents/paths before playback. - There is an apparent bug/unimplemented or truncated code path in src/ecommerce_voice_cs/voice.py (the TTS response parsing ends with an invalid/unfinished bytes conversion). Test the skill in a sandbox and run the code (or request an updated/fixed version) before relying on it in production. - If you do not trust the skill's source (homepage unknown, source unknown), run it in a restricted environment or container, and avoid exposing credentials from your primary environment. If you want to proceed, ask the publisher to correct the metadata (declare SENSEAUDIO_API_KEY) and to fix the TTS parsing bug.
功能分析
Type: OpenClaw Skill Name: ecommerce-voice-cs Version: 1.0.1 The skill bundle implements a legitimate ecommerce voice assistant with two modes (After-sales and Telemarketing) using the SenseAudio TTS API. The code demonstrates good security practices, such as sanitizing session IDs in `helper.py` to prevent path traversal when saving state files. While it uses unicode-escaped strings for Chinese UI prompts, these decode to standard functional phrases and do not hide malicious logic. The handling of API keys and file outputs is consistent with the stated purpose of generating and playing TTS audio.
能力评估
Purpose & Capability
The skill's code implements the advertised after-sales and sales TTS flows and calls a SenseAudio TTS endpoint, which is consistent with the description. However, registry metadata lists no required environment variables or primary credential while both SKILL.md and the code rely on an environment API key (SENSEAUDIO_API_KEY). This metadata omission is an incoherence and should be corrected or explained.
Instruction Scope
The SKILL.md runtime instructions map closely to what the code does: mode triggers, configuration collection, confirmation steps, generation of text replies and TTS output, and returning a playback block. The instructions do not request unrelated host data or other secrets beyond the SenseAudio API key and optional clone URL.
Install Mechanism
No install spec is provided (instruction-only install), which means nothing is downloaded or executed during install. The package contains source files that will run when invoked, but there is no external installer or remote executable download to review.
Credentials
The code expects and uses SENSEAUDIO_API_KEY and an optional SENSEAUDIO_CLONE_API_URL; those are reasonable for a TTS integration. However the registry metadata did not declare required env vars or a primary credential, creating an information gap. Session state files in the repository contain a placeholder API key value ('k'), which suggests sample secrets are present in the tree — avoid reusing such tokens and check for accidental secret commits.
Persistence & Privilege
The skill writes persistent state to a .session_state directory and writes/retains TTS audio files to disk (audio_output_path). SKILL.md and helper.py instruct hosts to autoplay returned local files and to retain them (retain_file=true). This behavior is expected for a TTS skill but increases surface area: files accumulate on disk and an autoplay contract could cause unintended playback of files created by the skill. always is false and the skill does not request elevated system privileges, but hosts should be aware of file persistence and autoplay implications.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ecommerce-voice-cs
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ecommerce-voice-cs 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added playback protocol: skill now returns a structured playback field for direct host-side audio play and file management. - Audio config made more flexible: both api_key and audio_format are now optional and may default to environment variable and mp3, respectively. - Configuration prompts updated—api_key input is only required if not set in environment. - Documentation improved with clear runtime input requirements and playback behavior for host integration. - Removed deprecated temp scripts and files, streamlined session state management.
v1.0.0
Initial release of ecommerce-voice-cs skill for voice-based e-commerce customer service and telemarketing. - Supports two fully isolated modes: after-sales customer service and phone sales, triggered by specific keywords. - Collects and confirms configuration parameters before entering each mode, with explicit user confirmation required. - Processes each customer query by generating a text response/script and a TTS audio file, returning the file path. - Only uses confirmed SenseAudio voice_id options, with sensible defaults. - Includes clear session and state management, ready for integration into OpenClaw or similar platforms.
元数据
Slug ecommerce-voice-cs
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

ecommerce-voice-cs 是什么?

电商 AI 语音技能。用于在 OpenClaw 或类似技能宿主中,按不同触发词独立启用两套互不干扰的能力:(1) 售后客服模式,将售后文本咨询按预设退款规则生成客服回复并输出 TTS 音频;(2) 电话推销模式,按产品名称、功能、优势和优惠范围生成推销话术并输出 TTS 音频。适用于需要模式切换、配置确认、音色选... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 255 次。

如何安装 ecommerce-voice-cs?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ecommerce-voice-cs」即可一键安装,无需额外配置。

ecommerce-voice-cs 是免费的吗?

是的,ecommerce-voice-cs 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ecommerce-voice-cs 支持哪些平台?

ecommerce-voice-cs 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ecommerce-voice-cs?

由 曹广雨(@xiaocaijic)开发并维护,当前版本 v1.0.1。

💬 留言讨论