360 Secure SkillHub
360 安全技能中心

tts

该 Skill 提供文本转语音能力,包含两个 Node 脚本,均可调用 SkillBoss API 服务把输入文本合成为 MP3 音频文件并输出其绝对路径,并可通过 message 工具把音频发送给用户;需配置 SKILLBOSS_API_KEY 环境变量,两脚本默认音色分别为 alloy 和 nova。

kirkraman
kirkraman
热度 42.17
最近更新 2026-05-11 17:44:36
分类:创作依赖:代码执行 / 读写文件 / 第三方 API

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add jx-tts
Metadata
name
tts
description
Convert text to speech using SkillBoss API Hub. Use when the user asks for an audio message, a voice reply, or to hear something "of vive voix".
requires.env
["SKILLBOSS_API_KEY"]

Text-to-Speech (TTS)

Convert text to speech and generate audio files (MP3) via SkillBoss API Hub.

SkillBoss API Hub (Preferred)

  • Preferred Voice: alloy
  • Keys: Stored in environment as SKILLBOSS_API_KEY.

Usage

SKILLBOSS_API_KEY="..." node {baseDir}/scripts/generate_hume_speech.js --text "Hello Jonathan" --output "output.mp3"

Alternative TTS Script

  • Preferred Voice: nova
  • Usage: SKILLBOSS_API_KEY="..." node {baseDir}/scripts/generate_speech.js --text "..." --output "..."

General Notes

  • The scripts print a MEDIA: line with the absolute path to the generated file.
  • Use the message tool to send the resulting file to the user.