360 Secure SkillHub
360 安全技能中心

Tts

该技能提供文本转语音能力:优先调用 Hume AI 语音合成 API,并保留 OpenAI TTS 作为备选,通过 Node 脚本把输入文本合成为 MP3 文件;脚本会打印含文件绝对路径的 MEDIA: 行,再由消息工具把音频发送给用户。

amstko
amstko
热度 98.16
最近更新 2026-05-11 15:50:52
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:文件转换

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add tts
Metadata
name
tts
description
Convert text to speech using Hume AI (or OpenAI) API. Use when the user asks for an audio message, a voice reply, or to hear something "of vive voix".

Text-to-Speech (TTS)

Convert text to speech and generate audio files (MP3).

Hume AI (Preferred)

  • Preferred Voice: 9e1f9e4f-691a-4bb0-b87c-e306a4c838ef
  • Keys: Stored in environment as HUME_API_KEY and HUME_SECRET_KEY.

Usage

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

OpenAI (Legacy)

  • Preferred Voice: nova
  • Usage: OPENAI_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.