2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill day253-volcengine-ai-audio-tts- _meta.json312 B
- SKILL.md3.6 KB
Overview
This skill provides text-to-speech generation using Volcengine (ByteDance) speech services. It wraps the online one-shot HTTP TTS API (openspeech.bytedance.com) and saves audio files, request payloads, and response metadata for verification. Use it to produce narration, multi-language output, or to troubleshoot TTS parameters and credentials.
How this skill works
The skill sends a single HTTP request to Volcengine's TTS endpoint with a JSON payload that includes text, voice_type, encoding, sample rate, and prosody controls. It validates environment variables for app_id, token, and cluster, generates a unique reqid per request, stores the API response and the produced audio locally, and returns a normalized tts.generate response (audio_path, sample_rate, format, duration_ms, code). The script uses Python requests and saves logs and evidence under a configurable output directory.
When to use it
- You need narration or voice output for apps, videos, or accessibility features.
- You want multi-language TTS with selectable voices and adjustable speed/volume/pitch.
- You need a reproducible test to validate credentials, cluster, and voice configuration.
- You must archive requests, responses, and generated audio for compliance or QA.
- You are debugging 429 rate limits or tuning chunking for long texts.
Best practices
- Set VOLCENGINE_TTS_APP_ID, VOLCENGINE_TTS_TOKEN, and VOLCENGINE_TTS_CLUSTER in the environment or a .env file before running.
- Keep text chunks under the recommended byte limit (≤1024 bytes) or split long content and synthesize in segments.
- Use a UUID-based reqid for each request to ensure traceability and idempotency.
- Start with a minimal verification request to confirm credentials and voice/cluster mapping.
- Respect rate limits: back off or reduce concurrency on 429 responses and log retries.
Example use cases
- Generate a single MP3 narration for a short onboarding video using voice_type BV700_streaming.
- Produce multi-language prompts for an IVR system by iterating language and voice_type parameters.
- Validate a new Volcengine token and cluster by running a minimal test request and inspecting saved metadata.
- Create a dataset of audio samples by batching short texts and storing audio_path and response details.
- Adjust speed_ratio, pitch_ratio, and volume_ratio to tune a synthesized voice for accessibility needs.
FAQ
Set VOLCENGINE_TTS_APP_ID, VOLCENGINE_TTS_TOKEN (used as Bearer token), and VOLCENGINE_TTS_CLUSTER before running the script.
How do I handle long text inputs?
Split long texts into chunks within the recommended byte limit and synthesize them sequentially, or use Volcengine's asynchronous long-text API if available.