← 返回 Skills 市场
scikkk

Language Tutor

作者 scikkk · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
373
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install language-tutor
功能描述
Create language learning audio with SenseAudio TTS, including pronunciation drills, bilingual lessons, slowed speech practice, and dialogue exercises. Use wh...
使用说明 (SKILL.md)

SenseAudio Language Tutor

Create interactive language-learning audio with official SenseAudio TTS endpoints and parameters.

What This Skill Does

  • Generate pronunciation examples in supported voices
  • Create bilingual vocabulary and sentence practice audio
  • Produce slowed-speed listening drills for learners
  • Build short dialogue exercises with repetition pauses
  • Export lesson audio files and companion study notes

Credential and Dependency Rules

  • Read the API key from SENSEAUDIO_API_KEY.
  • Send auth only as Authorization: Bearer \x3CAPI_KEY>.
  • Do not place API keys in query parameters, logs, or saved examples.
  • If Python helpers are used, this skill expects python3, requests, and pydub.
  • pydub may also require a local audio backend such as ffmpeg; if unavailable, prefer writing individual audio files instead of merging them.

Official TTS Constraints

Use the official SenseAudio TTS rules summarized below:

  • HTTP endpoint: POST https://api.senseaudio.cn/v1/t2a_v2
  • Model: SenseAudio-TTS-1.0
  • Max text length: 10000 characters
  • voice_setting.voice_id is required
  • voice_setting.speed range: 0.5-2.0
  • Optional audio format values: mp3, wav, pcm, flac
  • Optional sample rates: 8000, 16000, 22050, 24000, 32000, 44100
  • Optional MP3 bitrates: 32000, 64000, 128000, 256000
  • Optional channels: 1 or 2

Recommended Workflow

  1. Prepare lesson content:
  • Split vocabulary, example sentences, and dialogues into short chunks.
  • Keep each API call comfortably below the 10000 character limit.
  1. Build minimal TTS requests:
  • Send model, text, stream, and voice_setting.voice_id.
  • Add speed, pitch, vol, and audio_setting only when needed.
  1. Decode and save audio safely:
  • HTTP responses return hex-encoded audio in data.audio; decode before saving.
  • Keep filenames deterministic and avoid exposing secrets in paths or logs.
  1. Compose lessons carefully:
  • If pydub and an audio backend are available, merge clips and insert silence.
  • Otherwise, emit per-word or per-sentence clips and a manifest/Markdown study guide.
  1. Handle failures and traceability:
  • Check HTTP status and provider error payloads before decoding audio.
  • Record trace_id only for troubleshooting and avoid showing it unless needed.

Minimal Helper

import binascii
import os

import requests

API_KEY = os.environ["SENSEAUDIO_API_KEY"]
API_URL = "https://api.senseaudio.cn/v1/t2a_v2"


def generate_tts(text, voice_id="male_0004_a", speed=1.0, stream=False):
    payload = {
        "model": "SenseAudio-TTS-1.0",
        "text": text,
        "stream": stream,
        "voice_setting": {
            "voice_id": voice_id,
            "speed": speed,
        },
        "audio_setting": {
            "format": "mp3",
            "sample_rate": 32000,
            "bitrate": 128000,
            "channel": 2,
        },
    }
    response = requests.post(
        API_URL,
        headers={
            "Authorization": f"Bearer {API_KEY}",
            "Content-Type": "application/json",
        },
        json=payload,
        timeout=60,
    )
    response.raise_for_status()
    data = response.json()
    audio_hex = data["data"]["audio"]
    return binascii.unhexlify(audio_hex), data.get("trace_id")

Patterns

Vocabulary Drill

  • Generate one clip for the target word
  • Generate one clip for an example sentence
  • Optionally generate a slower clip at speed=0.8
  • Save clips separately or merge with pauses

Bilingual Lesson

  • Alternate source phrase and translated phrase
  • Use short pauses (1000-2000ms) between clips
  • Consider different voice_id values for source and translation when helpful

Dialogue Practice

  • Create one clip per line of dialogue
  • Insert repetition pauses after each line
  • Prefer shorter turns for easier debugging and regeneration

Output Options

  • Individual MP3 clips for words, sentences, or dialogue turns
  • Merged lesson audio if local audio tooling is available
  • Markdown study guide with transcript, translation, and file manifest

Safety Notes

  • Do not hardcode credentials.
  • Do not claim unsupported language-selection parameters for TTS unless the official docs add them.
  • Avoid assuming raw bytes can be passed directly to pydub.AudioSegment; decode and load through a supported container format.
安全使用建议
This skill is coherent: it will use your SENSEAUDIO_API_KEY to call SenseAudio's TTS API and needs python3 plus the requests and pydub libraries. Before installing, consider: (1) only provide an API key with minimal scope and rotate or revoke it if needed; (2) run the skill in an isolated environment (container or limited VM) to limit blast radius of network calls; (3) if you need merged audio, install ffmpeg from a trustworthy source since pydub relies on it; and (4) monitor API usage for unexpected requests. If you do not trust the SenseAudio endpoint or do not want networked TTS calls, do not provide the API key.
功能分析
Type: OpenClaw Skill Name: language-tutor Version: 1.0.2 The skill is a legitimate integration for the SenseAudio TTS service (api.senseaudio.cn) designed for language learning. The Python helper and SKILL.md instructions correctly handle API authentication via environment variables, use standard libraries (requests, pydub), and follow the documented API workflow without any signs of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description match the declared needs: python3, requests, pydub, and SENSEAUDIO_API_KEY are appropriate for generating and post-processing TTS audio from SenseAudio.
Instruction Scope
SKILL.md stays on‑topic (calls the documented SenseAudio endpoint, uses Authorization: Bearer <API_KEY>, decodes hex audio, merges clips optionally). One minor note: pydub often requires an external audio backend (ffmpeg) which is mentioned but not listed as a required binary; if you expect merged audio output, ensure ffmpeg or another backend is available in the runtime environment.
Install Mechanism
Declared installs are PyPI packages (requests, pydub) via the 'uv' installer — standard for Python dependencies and proportionate for the functionality. No downloads from arbitrary URLs or extract/install of remote archives are present.
Credentials
Only a single credential (SENSEAUDIO_API_KEY) is required and is the primary credential; no unrelated or additional secrets are requested.
Persistence & Privilege
The skill is not always-enabled, does not request system-wide configuration changes, and is instruction-only so it does not demand elevated persistence or privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install language-tutor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /language-tutor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
No user-facing changes in this release. - Version bump with no detected file or documentation changes.
v1.0.1
No significant code or content changes detected in this version. - No file changes were detected for version 1.0.1. - No new features, fixes, or documentation updates are present. - Functionality and instructions remain the same as previous release.
v1.0.0
- Initial release of senseaudio-language-tutor. - Generate language learning audio with adjustable speed and native pronunciation. - Supports vocabulary practice, example sentences, dialogues, and bilingual content. - Includes features for spaced repetition, pronunciation drills, and fill-in-the-blank exercises. - Requires SENSEAUDIO_API_KEY for API access.
元数据
Slug language-tutor
版本 1.0.2
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

Language Tutor 是什么?

Create language learning audio with SenseAudio TTS, including pronunciation drills, bilingual lessons, slowed speech practice, and dialogue exercises. Use wh... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 373 次。

如何安装 Language Tutor?

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

Language Tutor 是免费的吗?

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

Language Tutor 支持哪些平台?

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

谁开发了 Language Tutor?

由 scikkk(@scikkk)开发并维护,当前版本 v1.0.2。

💬 留言讨论