Xpersona
F

funasr-punctuation-restore

CLAWHUB · Unverified

当用户想要**给文本恢复标点**、**ASR 转录结果加标点**、**无标点文本加标点**、**转录文本整理标点**、**批量给文件或目录加标点**时自动触发。 使用 FunASR ct-punc 模型,为一段文本、单个记事本文件(.txt)、或整个目录一键恢复中文/英文标点符号。 支持直接输入文本、单个文件路径、或整个文件夹路径(目录模式会自动在同级创建 _punctuated 镜像目录,原文件/目录不变)。 【重要约束】只处理文本标点恢复,不处理音频转录、翻译或其他 NLP 任务。 常见触发口语(越多越好): - “帮我给这段文本加标点” - “把这个转录结果恢复标点” - “ASR Skill: funasr-punctuation-restore Owner: wangminrui2022 Summary: 当用户想要**给文本恢复标点**、**ASR 转录结果加标点**、**无标点文本加标点**、**转录文本整理标点**、**批量给文件或目录加标点**时自动触发。 使用 FunASR ct-punc 模型,为一段文本、单个记事本文件(.txt)、或整个目录一键恢复中文/英文标点符号。 支持直接输入文本、单个文件路径、或整个文件夹路径(目录模式会自动在同级创建 _punctuated 镜像目录,原文件/目录不变)。 【重要约束】只处理文本标点恢复,不处理音频转录、翻译或其他 NLP 任务。 常见触发口语(越多越好): - “帮我给这段文本加标点” - “把这个转录结果恢复标点” - “ASR Tags: latest:1.0.8 Version history: v1.0.8 | 2026-07-03T1

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17de4avhxep6e2yxdr6snee9h83v08q:funasr-punctuation-restore
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wangminrui2022-funasr-punctuation-restore/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

32,287 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: Funasr-Punctuation-Restore
description: |
  当用户想要**给文本恢复标点**、**ASR 转录结果加标点**、**无标点文本加标点**、**转录文本整理标点**、**批量给文件或目录加标点**时自动触发。
  使用 FunASR ct-punc 模型,为一段文本、单个记事本文件(.txt)、或整个目录一键恢复中文/英文标点符号。
  支持直接输入文本、单个文件路径、或整个文件夹路径(目录模式会自动在同级创建 _punctuated 镜像目录,原文件/目录不变)。
  
  【重要约束】只处理文本标点恢复,不处理音频转录、翻译或其他 NLP 任务。
  
  常见触发口语(越多越好):
  - “帮我给这段文本加标点”
  - “把这个转录结果恢复标点”
  - “ASR 文本加标点”
  - “这段话没有标点,帮我整理一下”
  - “给这个 txt 文件加标点”
  - “批量给文件夹里的所有文本文件加标点”
  - “恢复这个文本的标点符号”
  - “FunASR 加标点”
  - “把这个无标点文本变正常”
metadata:
  openclaw:
    requires:
      bins:
        - python
    user-invocable: true
---

# Funasr-Punctuation-Restore

**功能**:使用 FunASR ct-punc 模型一键恢复标点(支持文本/文件/目录)。目录模式会在同级创建结构完全一致的 `_punctuated` 镜像目录(原目录不变)。支持 GPU 加速 + 自动清理显存。

### 触发时机(Triggers)
- 用户提供一段没有标点或标点不全的文本,要求“加标点”“恢复标点”“整理标点”。
- 用户提供 .txt 文件路径或整个文件夹,要求批量处理。
- 常用于 ASR(语音转文字)后的后处理场景。
- 支持直接粘贴文本、单个文件、或整个目录。

### 支持的模型(推荐顺序)
1. **punc_ct-transformer_cn-en-common-vocab471067-large** → 基于 Transformer 的中英文混合文本标点恢复模型,适合 ASR 结果自动加标点。

### 参数提取指南
当决定调用此技能时,请从用户上下文中提取以下参数:
1. **`--text "<文本内容>"`** (如果用户直接提供了文本)
2. **`--file "<文件路径>"`** (如果用户提供了单个 .txt 文件路径)
3. **`--dir "<目录路径>"`** (如果用户提供了文件夹路径,会批量处理)

### 执行步骤
1. **解析输入**:识别用户是提供了文本、单个文件,还是整个目录。
2. **默认目标**:若未指定输出路径,默认在输入同级创建 `[原文件名]_punctuated.txt` 或 `_punctuated` 目录(原文件/目录保持不变)。
3. **调用命令**:使用以下兼容性命令启动脚本(优先 python3,失败则 python)。脚本会自动创建虚拟环境、检测 GPU 并安装对应版本。

   ```bash
   (python3 scripts/punctuation_restore.py (--text "<文本内容>" | --file "<文件路径>" | --dir "<目录路径>")) || (python scripts/punctuation_restore.py (--text "<文本内容>" | --file "<文件路径>" | --dir "<目录路径>"))

README.md

# FunASR 标点恢复 - OpenClaw 技能

[![OpenClaw Skill](https://img.shields.io/badge/OpenClaw-Skill-blue)](https://clawhub.ai)
[![Python](https://img.shields.io/badge/Python-3.8%2B-blue)](https://www.python.org)
[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)

**一句话功能**:使用 FunASR 官方 ct-punc 模型,为**一段文本、单个记事本文件、或整个目录**一键恢复标点符号。

**目录模式亮点**:输入目录 `D:\my_notes` → 自动在同级生成 `my_notes_punctuated`,**结构 100% 一致**,文件名不变,原目录完全不修改!

## ✨ 特性一览
- ✅ 支持纯文本 / 单文件 / 目录三种模式
- ✅ **目录镜像输出**(同级 `_punctuated` 文件夹,结构+文件名完全一致)
- ✅ GPU 自动加速 + 推理后自动清理显存(防内存泄漏)
- ✅ 模型永久缓存到 `./models/damo/punc_ct-transformer_cn-en-common-vocab471067-large`
- ✅ 下载失败时自动弹出超友好手动下载指南
- ✅ 跨平台(Windows/Linux/macOS)

### **在 OpenClaw 聊天中**

你可以直接对你的 Agent 说:

帮我给这段文本加标点:今天天气很好我们去公园玩吧

把这个转录文件加标点:"F:\命理学-音频-干声-文本\猴哥说易\月支月令如何看一个人事业!_20260322_131438.txt"

给整个文件夹里的笔记加标点:"F:\命理学-音频-干声-切片-文本\猴哥说易"

/Funasr-Punctuation-Restore --text "你好今天怎么样" (斜杠命令强制触发)

## **🚀 快速安装 & 使用**

```bash
# 1. 使用普通方式安装到 OpenClaw 技能目录
安装 funasr-punctuation-restore 技能

# 2. 测试三种模式
python scripts/punctuation_restore.py --text "测试文本恢复标点"
python scripts/punctuation_restore.py --file "F:\命理学-音频-干声-文本\猴哥说易\月支月令如何看一个人事业!_20260322_131438.txt"
python scripts/punctuation_restore.py --dir "F:\命理学-音频-干声-文本"

_meta.json

{
  "ownerId": "kn77473086ppakmtqf0e4myp8981mhjd",
  "slug": "funasr-punctuation-restore",
  "version": "1.0.8",
  "publishedAt": 1783087125546
}

skill-card.md

## Description:

Restores Chinese and English punctuation for pasted text, a single .txt file, or a directory of text files using the FunASR ct-punc model.

This skill is ready for commercial/non-commercial use.

## Publisher:

[wangminrui2022](https://clawhub.ai/user/wangminrui2022)

### License/Terms of Use:

MIT-0

## Use Case:

External users and agent operators use this skill to clean up ASR transcripts or unpunctuated text by adding punctuation to direct text input, one text file, or every .txt file in a directory while preserving the original input.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill downloads and installs Python packages at runtime, including unpinned packages.

Mitigation: Run it in an isolated environment and review dependency installation behavior before normal use.

Risk: The skill creates persistent local artifacts such as a virtual environment, cached model files, logs, and punctuated output files.

Mitigation: Use a workspace without sensitive credentials, review output and log locations, and avoid confidential text until logging behavior is addressed.

Risk: The scanner notes unrelated audio dependencies and import-time package repair logic for a punctuation-only skill.

Mitigation: Review or remove the unrelated dependencies and package repair logic before deployment.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/wangminrui2022/skills/funasr-punctuation-restore)
- [FunASR ct-punc ModelScope model](https://modelscope.cn/models/damo/punc_ct-transformer_cn-en-common-vocab471067-large)

## Skill Output:

**Output Type(s):** [text, files, shell commands, guidance]

**Output Format:** [Plain text output, UTF-8 .txt files, and Markdown command guidance]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Directory mode writes a sibling _punctuated directory and file mode writes a _punctuated.txt output without modifying the original input.]

## Skill Version(s):

1.0.8 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to funasr-punctuation-restore and adjacent AI workflows.