Search

PythonReactSEOPDF
OpenClaw

volcengine-agent-tts-to-tos

Combined agent that synthesizes speech via Volcengine TTS, uploads the audio to TOS, and returns a presigned temporary URL. Use when users need a shareable audio link from text input.

day2530 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install day253/day253-volcengine-agent-tts-to-tos

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Category: agent

TTS → TOS → Presigned URL Agent

一步完成:文本 → 语音合成 → 上传对象存储 → 生成临时访问链接。

Workflow

┌──────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  输入文本  │ ──▶ │  TTS 语音合成  │ ──▶ │  上传到 TOS   │ ──▶ │ 生成预签名 URL │
└──────────┘     └──────────────┘     └──────────────┘     └──────────────┘
                   audio bytes           tos://bucket/key       https://...
  1. 调用火山引擎 TTS HTTP API 合成音频(mp3/wav)
  2. 将音频上传到指定 TOS 桶
  3. 生成带有效期的预签名 URL
  4. 输出完整结果(本地路径 + TOS 路径 + 临时链接)

Prerequisites

  • pip install requests tos
  • TTS 环境变量:VOLCENGINE_TTS_APP_ID, VOLCENGINE_TTS_TOKEN, VOLCENGINE_TTS_CLUSTER
  • TOS 环境变量:VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY, VOLCENGINE_TOS_ENDPOINT, VOLCENGINE_TOS_REGION

Quick start

# 基本用法:文本 + 目标桶
python agents/tts-to-tos/scripts/tts_to_tos.py \
  --text "你好,这是一段测试语音" \
  --bucket my-bucket

# 完整参数
python agents/tts-to-tos/scripts/tts_to_tos.py \
  --text "欢迎使用火山引擎语音合成服务" \
  --voice-type BV700_streaming \
  --encoding mp3 \
  --bucket my-bucket \
  --key-prefix audio/tts/ \
  --expires 7200 \
  --print-json

Parameters

参数 必填 默认值 说明
--text ✓ 要合成的文本
--bucket ✓ TOS 目标桶名
--voice-type BV700_streaming 音色
--encoding mp3 音频格式 mp3/wav/pcm
--speed-ratio 1.0 语速 [0.2, 3]
--volume-ratio 1.0 音量 [0.1, 3]
--pitch-ratio 1.0 音高 [0.1, 3]
--language 语言,如 cn
--key-prefix tts/ TOS 对象键前缀
--expires 3600 预签名 URL 有效期(秒)
--keep-local false 保留本地临时音频文件
--print-json false 输出 JSON 格式结果

Output

{
  "text": "你好,这是一段测试语音",
  "voice_type": "BV700_streaming",
  "duration_ms": "2...

Source information

Source
github
Repository
openclaw/skills
Path
skills/day253/day253-volcengine-agent-tts-to-tos
Version
—
Commit
f6ea342c057be4b67c70cfe73ef8b0db438b4d09
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
Category: agent

# TTS → TOS → Presigned URL Agent

一步完成:文本 → 语音合成 → 上传对象存储 → 生成临时访问链接。

## Workflow

```
┌──────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  输入文本  │ ──▶ │  TTS 语音合成  │ ──▶ │  上传到 TOS   │ ──▶ │ 生成预签名 URL │
└──────────┘     └──────────────┘     └──────────────┘     └──────────────┘
                   audio bytes           tos://bucket/key       https://...
```

1. 调用火山引擎 TTS HTTP API 合成音频(mp3/wav)
2. 将音频上传到指定 TOS 桶
3. 生成带有效期的预签名 URL
4. 输出完整结果(本地路径 + TOS 路径 + 临时链接)

## Prerequisites

- `pip install requests tos`
- TTS 环境变量:`VOLCENGINE_TTS_APP_ID`, `VOLCENGINE_TTS_TOKEN`, `VOLCENGINE_TTS_CLUSTER`
- TOS 环境变量:`VOLCENGINE_ACCESS_KEY`, `VOLCENGINE_SECRET_KEY`, `VOLCENGINE_TOS_ENDPOINT`, `VOLCENGINE_TOS_REGION`

## Quick start

```bash
# 基本用法:文本 + 目标桶
python agents/tts-to-tos/scripts/tts_to_tos.py \
  --text "你好,这是一段测试语音" \
  --bucket my-bucket

# 完整参数
python agents/tts-to-tos/scripts/tts_to_tos.py \
  --text "欢迎使用火山引擎语音合成服务" \
  --voice-type BV700_streaming \
  --encoding mp3 \
  --bucket my-bucket \
  --key-prefix audio/tts/ \
  --expires 7200 \
  --print-json
```

## Parameters

| 参数 | 必填 | 默认值 | 说明 |
|------|------|--------|------|
| `--text` | ✓ | | 要合成的文本 |
| `--bucket` | ✓ | | TOS 目标桶名 |
| `--voice-type` | | `BV700_streaming` | 音色 |
| `--encoding` | | `mp3` | 音频格式 mp3/wav/pcm |
| `--speed-ratio` | | `1.0` | 语速 [0.2, 3] |
| `--volume-ratio` | | `1.0` | 音量 [0.1, 3] |
| `--pitch-ratio` | | `1.0` | 音高 [0.1, 3] |
| `--language` | | | 语言,如 `cn` |
| `--key-prefix` | | `tts/` | TOS 对象键前缀 |
| `--expires` | | `3600` | 预签名 URL 有效期(秒) |
| `--keep-local` | | `false` | 保留本地临时音频文件 |
| `--print-json` | | `false` | 输出 JSON 格式结果 |

## Output

```json
{
  "text": "你好,这是一段测试语音",
  "voice_type": "BV700_streaming",
  "duration_ms": "2...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

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.