360 Secure SkillHub
360 安全技能中心

tts

核心功能:将文本转换为MP3格式音频,提供两种脚本可选,分别默认使用alloy、nova语音,需配置SKILLBOSS_API_KEY。典型场景:用户请求音频消息、语音回复或语音播报内容时使用。输入为待转换文本,输出为MP3音频文件,脚本会打印文件绝对路径,可通过message工具发送给用户。

tobeyrebecca
tobeyrebecca
热度 38.08
最近更新 2026-05-11 17:45:02
分类:效率依赖:代码执行 / 第三方 API应用场景:文件转换

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add toby-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.