AI Agent Hub
Back to skills
Tencent Cloud Text to Speech icon

Tencent Cloud Text to Speech

Design & Media Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @tencent-adm/tencentcloud-tts according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem addressed

When scripts, CI jobs, or content pipelines need to turn a short text string into playable audio, the usual friction is wiring up Tencent Cloud TTS correctly: handling credentials, choosing voice parameters, selecting an audio codec, and naming the output file. Hand-rolled API calls can easily hard-code SecretId or SecretKey, or miss fields such as voice_type and codec. The TencentCloud TTS skill package narrows this to a parameterized basic synthesis flow: provide text and receive an MP3 or WAV file.

How it works and key parameters

The skill is aimed at single-pass synthesis of one text segment. Core inputs include text, the content to convert; voice_type, the voice selection, documented in the range 101001 to 101015 with a default of 101001; codec, the audio encoding, supporting mp3 and wav; and output_file, the generated audio filename, defaulting to output.mp3.

Before use, you need a Tencent Cloud account, the TTS service enabled, and API credentials. Credentials are best injected via environment variables rather than hard-coded, which keeps local debugging, server runs, and toolchain integrations consistent while reducing leak risk.

Boundaries and cautions

It fits engineering scenarios where existing text must be converted in single or scripted batches, such as generating prompts, spoken snippets, test fixtures, or content previews. Because it is positioned for basic single synthesis needs, it should not be treated as real-time streaming synthesis, long-document continuous joining, or complex audio post-processing. In practice: keep each text under about 300 characters; avoid high-frequency calls that may hit service limits; manage generated files in project directories and clean them up periodically; and consult Tencent Cloud TTS docs and API error codes when failures occur.

Use Cases

  • In CI, convert a fixed short prompt into MP3 so automated tests can play and assert the audio.
  • When scripting audio fixtures, turn text under 300 characters into WAV with a specified output file.
  • In a preview tool, convert a user's short sentence into audio using default or 101001-101015 voices.
  • While debugging playback, inject Tencent Cloud credentials via env vars and generate one MP3 for verification.

Best For

  • Automation test engineers who need CI-generated MP3 audio fixtures from short prompts.
  • Frontend or backend engineers adding short-text voice playback to content generation tools.
  • Script engineers who need to convert scripted text outputs into MP3 or WAV files.
  • Voice app engineers validating voice_type, codec, and output file behavior for Tencent Cloud TTS.