cat-translator

Bidirectional cat vocal translation and behavior interpretation: classifies cat vocalizations into coarse emotion/intent categories and synthesizes cat sounds for playback, and answers questions about cat behavior (including posture, movements, tail position, sleeping posture, facial expressions, etc.), based on a distilled knowledge base from the “Cat Language Encyclopedia.” Runs entirely locally with zero token usage, offline, and does not call any cloud LLMs. This skill is for entertainment and behavioral reference: cat meows do not map reliably to sentence-level semantics, so the capability is “coarse emotion/intent classification + cat sound synthesis,” not literal sentence-by-sentence translation. Supports the workflow “feed a cat-language book -> distill into a cat-sound knowledge ontology -> inject into the classifier” (the “book” is text; the injection provides label schemes, acoustic priors, and usage guidance to tune rules, not labeled audio training samples).

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "cat-translator" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-92ee5ec3c76d77c85756e92f81625e5a1f8afe393e3eb4401b2db150a4573e1e. Verify the upstream source and version against https://skillhub.cn/skills/user_1793b15c/cat-translator-publish before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Bidirectional cat vocal translation and behavior interpretation: classifies cat vocalizations into coarse emotion/intent categories and synthesizes cat sounds for playback, and answers questions about cat behavior (including posture, movements, tail position, sleeping posture, facial expressions, etc.), based on a distilled knowledge base from the “Cat Language Encyclopedia.” Runs entirely locally with zero token usage, offline, and does not call any cloud LLMs. This skill is for entertainment and behavioral reference: cat meows do not map reliably to sentence-level semantics, so the capability is “coarse emotion/intent classification + cat sound synthesis,” not literal sentence-by-sentence translation. Supports the workflow “feed a cat-language book -> distill into a cat-sound knowledge ontology -> inject into the classifier” (the “book” is text; the injection provides label schemes, acoustic priors, and usage guidance to tune rules, not labeled audio training samples).

0 Downloads

Introduction source: third_party · user_1793b15c · 1.2.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: cat-translator
version: 1.2.0
description: |
  猫咪语音双向翻译 + 行为解读:把猫叫声识别成人类可读的情绪/意图,把人类意图转成猫声播放,
  还能回答猫的行为问题(姿态/动作/尾巴/睡姿/面部表情,基于《猫语大辞典》蒸馏知识库)。
  纯本地运行、零 token、不联网、不调用任何云端大模型。当用户想"听懂自家猫在叫什么"、
  "把话说给猫听"、问"猫为什么踩奶/尾巴竖起来什么意思/翻肚皮能摸吗"等行为问题,
  或做猫语/宠物语音相关实验或演示时使用。
  关键前提(必须向用户说明):猫的喵叫没有稳定语义映射,本 skill 做的是
  「情绪/意图粗分类 + 猫声合成播放」,属娱乐与行为参考,非逐句语义翻译。
  支持「喂猫语书 -> 蒸馏成猫声知识本体 -> 注入分类器」工作流,书是文字不是音频,
  注入的是标签体系/声学先验/建议,用于升级规则,而非带标签的音频训练样本。
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep

Cat Translator - 猫咪语音双向翻译

把猫叫声翻译成人话、把人话翻译成猫声的本地引擎。不联网、不烧 token、零边际成本。

什么时候用

  • 用户想"听懂猫在叫什么" / "我的猫是不是饿了/害怕了"
  • 用户想"对猫说句话" / 生成猫声给猫听
  • 用户问猫的行为问题:"猫为什么踩奶 / 尾巴竖起来什么意思 / 翻肚皮能摸吗 / 猫叹气是有烦恼吗 / 上厕所时叫正常吗" —— 用 cat_behavior.py ask 查行为知识库回答
  • 做宠物语音相关的演示、实验、原型
  • 用户想验证"本地零 token 能否做猫语翻译"这类可行性
  • 用户想"把猫语书喂进来"获取猫声知识 / 训练先验

重要前提(务必先告诉用户)

猫的喵叫主要是对人类演化的叫声,对其他猫几乎不用于交流,不存在跨猫通用的稳定语义词典。 因此任何"猫语翻译"做到的都是粗粒度情绪/意图分类 + 猫声播放,不是逐句翻译。 本 skill 的输出应标注为「娱乐与行为参考」,不要宣称医疗/诊断/科学级翻译。

三种模式

A. 猫叫 -> 人话(分类)

提取声学特征(基频/音高轮廓/能量/过零率/呼噜包络调制),用启发式分类器映射到意图档位 (打招呼、饥饿、求关注、警觉/害怕、愉悦/呼噜、烦躁/警告、发情/求偶、疼痛/不适 等)。 每档附「给主人的建议回应」与启发性置信度。启动时若同目录有 cat_kb.json(书蒸馏产出), 会自动合并书的标签体系/情境/声学先验。

B. 人话 -> 猫声(合成)

把人类意图(吃饭/玩/别怕/打招呼/停下/警告/求关注)通过纯信号合成(基频滑移 + 共振峰着色 + 振幅包络) 生成猫叫 wav,无需任何外部音频素材。呼噜用低频振幅调制合成。

C. 行为问答(基于《猫语大辞典》蒸馏知识库)

覆盖 面部表情 / 姿势 / 尾巴 / 睡姿 / 动作 / 预备知识 六大板块(41 条,100% 书籍还原)。 本地关键词检索 cat_behavior_kb.json 直接作答,零 token。

python cat_behavior.py ask "猫为什么踩奶"
python cat_behavior.py ask "尾巴竖起来朝我走过来什么意思"
python cat_behavior.py ask "上厕所的时候一直叫"      # 会命中生病警示条目
python cat_behavior.py list                           # 列出全部条目
python cat_behavior.py list --category 尾巴

全部 41 条均来自《猫语大辞典》原书正文蒸馏(src=book),行为库已达 100% 书籍还原, 无 src=toc 通识条目残留(v1.2.0 起,原 17 条 toc 通识条目已用原书原文逐条校准覆盖)。 Agent 回答用户行为问题时应优先调用此引擎而非凭通用知识作答,并转述条目的「表现/含义/建议」。

使用方法

引擎脚本:cat_translate.py(依赖 numpy / scipy / soundfile;首次使用需 pip install numpy scipy soundfile,WorkBuddy 受管环境装进 venv 即可)。

# 猫叫 -> 人话:丢一个猫叫录音(wav/flac/ogg/mp3 均可)
python cat_translate.py classify <猫叫音频路径>

# 人话 -> 猫声:给意图关键词,生成 wav
python cat_translate.py speak 吃饭 --out cat_sound.wav
python cat_translate.py speak 别怕 --out comfort.wav

# 列出可用意图
python cat_translate.py list

# 自检:合成一段猫叫并回读分类,验证双向闭环
python cat_translate.py demo

# 用内置真实猫叫样本试跑(cat_eat.wav 随 skill 分发,开箱即用,可作回归测试)
python cat_translate.py classify cat_eat.wav

注意:运行需在 skill 目录下(cd <skill目录> 后执行),否则 import cat_translate 会找不到模块。

喂书蒸馏工作流(把猫语书变成训练/标注知识)

关键前提:书是文字不是音频。喂书得到的是「猫声知识 / 标签体系 / 声学先验」, 用于升级分类器规则;不是带标签的音频训练样本。真实带标签音频仍需另行采集 (自家猫录音 / 公开数据集如米兰大学 cat call 数据集)。

步骤:

# 1) 抽取书的正文并分块(PDF/txt/md 均可,纯本地零 token)
python distill_book.py extract 你的猫语书.pdf --out book_chunks.json

# 2) 由 Agent / 本地模型 按抽取提示词读取分块,产出知识库 JSON
python distill_book.py prompt --out extraction_prompt.txt              # 声学先验 -> cat_kb.json
python distill_book.py prompt --mode behavior --out behavior_prompt.txt # 行为知识 -> cat_behavior_kb.json
#    (把 book_chunks.json 的分块填进提示词,让模型只输出符合 schema 的 JSON)

# 3) 之后 cat_translate.py 启动时自动加载 cat_kb.json,合并进分类器规则
python cat_translate.py classify 猫叫.wav   # 已注入书的标签体系/情境/声学先验

cat_kb.json schema(distill_book.py 的抽取提示词会按此产出):

{
  "source": "书名/作者",
  "vocalizations": [
    {"type": "饥饿", "label": "饥饿", "advice": "检查粮水",
     "acoustic": {"f0_range": [500, 900], "duration_range": [0.3, 1.2],
                  "contour": "rising", "timbre": "短促", "rhythm": "repeated"},
     "context": "饭点、食盆空", "example": "短促中高音重复喵"}
  ]
}

注入规则(补充而非替代):原档位的建议保留,书提供的「情境」追加;书里出现的新档位直接增补。

准确度与局限(诚实说明)

  • 分类器当前为启发式 v0:基于声学特征与「档位原型」的相似度打分,置信度经校准——清晰档位上限约 0.80, 分档接近时按差距压低并标「不确定」。属粗分类,输出仅供娱乐与行为参考。
  • 最大误差来源:纯规则分类器对相似音高/音色的喵叫易混淆(如"求关注"与"饥饿")。
  • 书能补什么、不能补什么:书(猫语书)补的是标签体系、情境线索、声学先验,即"怎么标注"和"特征大概长啥样"; 它补不了"带标签的音频样本"本身。要训出真模型,仍需把书当标注指南,去录/找真实猫叫音频。

升级路径(做成 skill 而非小程序的真正优势)

在 skill 环境里可自由跑真实 ML。把 cat_kb.json 当作标注指南 + 声学先验,结合真实猫叫录音:

  1. 用书的声学描述给录音打软标签(半监督);
  2. 训练微型分类器(sklearn 随机森林 / TFLite / ONNX),把 classify() 替换为模型推理;
  3. 全程本地、零 token。extract_features() 已输出结构化特征向量,可直接接训练。

训练模型(可选增强,已实装)

已合并两个公开数据集训练纯 numpy KNN 增强模型(train_model.py,不依赖 sklearn,规避离线环境):

  • CatMeows(米兰大学 / Zenodo 4008297,440 段 wav,3 类情境:待食/梳毛/隔离)
  • CatSound 样本包(Pandeya & Lee / Zenodo 4724180,CAT_SOUND_DB_SAMPLES.zip,10 类 × 5 条 mp3)

模型文件 model.pkl 随 skill 分发,classify 启动时自动懒加载。 当前覆盖 8 个档位:饥饿 / 愉悦·呼噜 / 警觉·害怕 / 警告 / 发情 / 疼痛 / 叹气·放松 / 超音波呼唤。 求关注、打招呼无公开标注数据,永远走启发式 + 书先验。

诚实的精度(5 折交叉验证,k=7):

  • 整体准确率约 0.54。类别严重不均衡(警觉 221 条 vs 新档位各 5 条), 新增 5 档目前样本太少,KNN 投票几乎赢不了——主要靠启发式+书先验兜底,模型仅作印证。
  • 警觉/害怕(隔离)依旧分得最开;饥饿、愉悦/呼噜与其重叠较大。

增强模式(CAT_MODEL_BOOST 环境变量,默认 safe):

  • safe(默认):模型只能「印证」启发式 top1,绝不 override —— 模型永远不比纯启发式更差,只在两者一致时抬升置信度。推荐日常用。
  • aggressive:允许模型覆盖启发式,仅供实验。
  • off:完全不用模型,退回纯启发式。

想让新档位真正靠模型识别:下载 CatSound 完整版(每类约 300 条,Google Drive 链接在 Zenodo 4724180 页面),解压后整个类目文件夹放进 catsound/(wav/mp3 均可,允许套一层), 重跑 python train_model.py 即自动合并重训。

本地语音 App(B 方案:麦克风 + 扬声器闭环)

引擎原生是「文件进 / 文件出」。要真「对猫说话、听猫回话」,需一层音频 I/O 胶水—— 必须跑在你自己的 Windows(有麦克风、有声卡),不能跑在 WorkBuddy 沙箱(沙箱无音频设备、无外网装不了依赖)。

本 skill 附两个胶水脚本(详见 VOICE_APP.md):

  • record.py:麦克风录音 → wav(sounddevice + soundfile)
  • voice_loop.py:双向语音闭环主程序
    • 1 录猫叫 → classify → 屏幕解读 + 中文 TTS 播报(pyttsx3)
    • 2 录人话 → 离线 ASR(vosk)→ resolve_intent → 合成猫声 → winsound 播放
    • 3 试听内置猫声(不用麦克风,确认播放链路通)
cd <skill目录>
pip install sounddevice soundfile vosk pyttsx3   # 仅本机 Windows 需要
python voice_loop.py
  • 无 vosk 也能跑:模式 2 识别不出时自动回退「打字模式」;无 pyttsx3 则只打印文字。
  • 只有 sounddevice 是录音必需;其余均可降级。
  • 语音输入(人话→猫声)靠关键词匹配,说「吃饭 / 过来 / 别怕 / 停下 / 打招呼 / 玩 / 求关注」等最稳。

文件结构

cat-translator-skill/
├── SKILL.md            # 本文件
├── cat_translate.py    # 引擎:特征提取 + 启发式分类 + 猫声合成 + 自动加载 cat_kb.json
├── cat_eat.wav         # 内置真实猫叫样本(classify 试跑 / 回归测试用,随 skill 分发)
├── knowledge.py        # 猫声知识本体:加载/合并 cat_kb.json(由书蒸馏)
├── cat_behavior.py     # 行为问答引擎:姿态/动作/尾巴/睡姿/表情(零 token 本地检索)
├── cat_behavior_kb.json # 行为知识库(《猫语大辞典》蒸馏,41 条六大板块)
├── distill_book.py     # 猫语书 -> 知识库(--mode vocal 声学 / --mode behavior 行为)
├── train_model.py      # (可选增强)CatMeows/CatSound -> 纯 numpy KNN 模型
├── model.pkl           # 训练产出(KNN 权重;缺则 classify 退回纯启发式)
├── record.py           # (B 方案)麦克风录音 -> wav(仅本机 Windows 运行)
├── voice_loop.py       # (B 方案)双向语音 App 主程序(录猫叫/录人话/试听)
├── VOICE_APP.md        # 本机运行指南(依赖 / vosk 模型 / 局限)
├── requirements.txt    # 依赖:numpy / scipy / soundfile
└── cat_kb.json         # (喂书后由蒸馏产出;缺失则分类器用内置档位)

设计要点(给想改的人)

  • extract_features(y, sr):返回 dict,含 f0_mean / f0_slope_norm / f0_contour_var / zcr / centroid / purr_mod 等。
  • feature_vector(feats):返回定长 8 维结构化向量(顺序固定),供后续 sklearn / TFLite / ONNX 训练升级直接接入—— 把 classify() 里的 similarity() 替换为模型推理即可,特征接口已留好。
  • get_categories():意图档位与建议;启动时会合并 cat_kb.json(书蒸馏)。
  • similarity(feats, cat):原型相似度打分(基频中点高斯 + 时长高斯 + 轮廓码匹配),置信度在 classify() 内校准。
  • knowledge.py:load_kb / merge_into_categories / kb_priors,负责书的注入。
  • INTENTS / synth_cat_sound():人->猫的意图参数与合成。合成用宽带电通+高频滚降着色, 刻意保留源基频周期(窄带共振峰会污染自相关基频估计)。
  • resolve_intent():把自由文本关键词映射到意图(中英文均可)。
  • distill_book.py:书的抽取与分块;蒸馏推理(把分块变 cat_kb.json)由 Agent/本地模型完成,保证零 token 抽取。

Current listing version

1.2.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value68/100

Highlights

  • 提供猫叫情绪分类、人话转猫声合成、行为问答三大完整功能闭环
  • 明确说明娱乐与行为参考用途,避免误导用户
  • 支持本地运行、零 token 消耗,具备差异化实用价值
Trigger Precision92/100

Highlights

  • 触发场景描述清晰完整,覆盖多种用户意图变体
  • 边界明确,无与其他 Skill 重叠风险
Structure and Standards95/100

Areas to improve

  • 文档结构冗余 Reported severity: Minor

    description 内容在顶层 frontmatter 和 skill_body 内重复出现

    Recommendation: 建议保留一处,避免维护不一致

  • 文档过长 Reported severity: Minor

    SKILL.md 约 480 行,内容密集

    Recommendation: 建议将部分章节(如本地语音 App、训练模型)拆分为独立文档并通过链接引用

Highlights

  • Phase 划分清晰,含三种模式详细说明
  • 提供完整端到端使用示例和文件结构说明
  • frontmatter 完整,符合规范
Execution Reliability88/100

Highlights

  • 依赖明确,提供 pip 安装指引
  • 异常处理完善(模型缺失回退、语音组件降级)
  • 提供内置测试样本 cat_eat.wav 用于回归验证
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 72, 182

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.