Rechercher

PythonReactSEOPDF
OpenClaw

voice-tts

语音处理技能 - 完整的语音输入输出解决方案。功能:(1) 语音识别 ASR - 将用户语音转录为文字(使用 Whisper)(2) 语音合成 TTS - 将文字转换为语音(使用 Edge TTS)。触发场景:用户发送语音消息、主动要求"用语音读..."、"语音回复"等。支持平台:Telegram、Discord、WhatsApp、飞书/Lark。确保每次语音回复都同时发送文字和语音。

believe33440 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install believe3344/voice-tts

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

⚠️ 安装后请将 scripts/ 目录下的 .txt 文件名后缀去掉(去掉 .txt)才能正常使用!

Voice 语音处理技能

完整的语音输入输出解决方案,同时支持语音识别(ASR)和语音合成(TTS)。

功能概述

方向 技术 说明
语音→文字 Whisper (本地) 用户发语音时自动转录
文字→语音 Edge TTS 生成语音回复

安装依赖

# 必须安装的包
pip install edge-tts whisper torch click

# 如果没有 ffmpeg(音频处理需要)
# macOS: brew install ffmpeg
# Ubuntu: sudo apt install ffmpeg

OpenClaw 配置

要在 OpenClaw 中使用语音识别,需要修改 openclaw.json:

{
  "tools": {
    "media": {
      "audio": {
        "enabled": true,
        "models": [
          {
            "type": "cli",
            "command": "python3",
            "args": [
              "{{SkillPath}}/voice-tts/scripts/whisper",
              "--model",
              "base",
              "{{MediaPath}}"
            ]
          }
        ]
      }
    }
  }
}

说明:

  • {{SkillPath}} 会自动替换为 skill 安装路径
  • --model base 可以改为 turbo 等其他模型
  • 修改后执行 openclaw gateway restart 重启生效

触发场景

场景一:用户发送语音消息(ASR)

当用户发送语音消息时:

  1. 系统会自动转录为文字(transcript)
  2. 你需要理解用户意图并回复
  3. 用语音+文字回复用户
场景二:用户主动要求语音回复(TTS)

当用户说以下话术时:

  • "用语音读..."
  • "语音回复"
  • "读给我听"
  • "说出来"
  • "text to speech"
  • "TTS"
  • "飞书语音"
  • 或任何明确要求语音输出的请求

脚本说明

Skill 自带两个脚本:

1. 语音识别 - whisper

位置:{{SkillPath}}/scripts/whisper

# 基本用法
python3 {{SkillPath}}/scripts/whisper audio.mp3

# 指定模型(默认 base)
python3 {{SkillPath}}/scripts/whisper audio.mp3 --model turbo

# 输出 JSON(带语言检测)
python3 {{SkillPath}}/scripts/whisper audio.mp3 --json

# 带时间戳
python3 {{SkillPath}}/scripts/whisper audio.mp3 --timestamps

可用模型:

模型 大小 速度 精度
tiny 39M 最快 ...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/believe3344/voice-tts
Version
—
Commit
a4dc0ada033fbf396877077400aa679167a79338
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
> ⚠️ 安装后请将 scripts/ 目录下的 .txt 文件名后缀去掉(去掉 .txt)才能正常使用!

# Voice 语音处理技能

完整的语音输入输出解决方案,同时支持语音识别(ASR)和语音合成(TTS)。

## 功能概述

| 方向 | 技术 | 说明 |
|------|------|------|
| 语音→文字 | Whisper (本地) | 用户发语音时自动转录 |
| 文字→语音 | Edge TTS | 生成语音回复 |

## 安装依赖

```bash
# 必须安装的包
pip install edge-tts whisper torch click

# 如果没有 ffmpeg(音频处理需要)
# macOS: brew install ffmpeg
# Ubuntu: sudo apt install ffmpeg
```

## OpenClaw 配置

要在 OpenClaw 中使用语音识别,需要修改 `openclaw.json`:

```json
{
  "tools": {
    "media": {
      "audio": {
        "enabled": true,
        "models": [
          {
            "type": "cli",
            "command": "python3",
            "args": [
              "{{SkillPath}}/voice-tts/scripts/whisper",
              "--model",
              "base",
              "{{MediaPath}}"
            ]
          }
        ]
      }
    }
  }
}
```

**说明**:
- `{{SkillPath}}` 会自动替换为 skill 安装路径
- `--model base` 可以改为 `turbo` 等其他模型
- 修改后执行 `openclaw gateway restart` 重启生效

## 触发场景

### 场景一:用户发送语音消息(ASR)

当用户发送**语音消息**时:
1. 系统会自动转录为文字(transcript)
2. 你需要理解用户意图并回复
3. **用语音+文字回复**用户

### 场景二:用户主动要求语音回复(TTS)

当用户说以下话术时:
- "用语音读..."
- "语音回复"
- "读给我听"
- "说出来"
- "text to speech"
- "TTS"
- "飞书语音"
- 或任何明确要求语音输出的请求

## 脚本说明

Skill 自带两个脚本:

### 1. 语音识别 - whisper

位置:`{{SkillPath}}/scripts/whisper`

```bash
# 基本用法
python3 {{SkillPath}}/scripts/whisper audio.mp3

# 指定模型(默认 base)
python3 {{SkillPath}}/scripts/whisper audio.mp3 --model turbo

# 输出 JSON(带语言检测)
python3 {{SkillPath}}/scripts/whisper audio.mp3 --json

# 带时间戳
python3 {{SkillPath}}/scripts/whisper audio.mp3 --timestamps
```

**可用模型**:

| 模型 | 大小 | 速度 | 精度 |
|------|------|------|------|
| tiny | 39M | 最快 |...

Skills associés

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.