with one click
tts
调用火山引擎文字转语音API,将文本转换为语音。在需要为视频配音或生成音频文件时使用此skill。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
调用火山引擎文字转语音API,将文本转换为语音。在需要为视频配音或生成音频文件时使用此skill。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Best practices for Remotion - Video creation in React
| name | tts |
| description | 调用火山引擎文字转语音API,将文本转换为语音。在需要为视频配音或生成音频文件时使用此skill。 |
此Skill用于调用火山引擎的文字转语音API,将文本转换为高质量的语音文件。适用于为Remotion视频或其他项目生成配音。
在使用前,请设置以下环境变量: 环境变量获取地址: https://console.volcengine.com/speech/service/10007
# Windows PowerShell
$env:VOLC_APPID = "你的APP_ID"
$env:VOLC_ACCESS_KEY_ID = "你的ACCESS_KEY"
也可以直接在命令行中传递凭据:
python tts.py --appid "你的APP_ID" --access_token "你的ACCESS_KEY" --text "你好世界"
首次使用前需要安装依赖:
python tts.py --install-deps
将以下脚本文件放置在项目中(已包含在此skill的scripts目录下):
protocols.py - 协议定义tts.py - 主脚本# 基本使用(使用环境变量中的凭据)
python scripts/tts.py --text "你好,世界!" --output output.wav
# 指定语音类型
python scripts/tts.py --text "你好" --voice_type "BV700_V2_streaming" --output hello.wav
# 完整参数示例
python scripts/tts.py \
--appid "your-app-id" \
--access_token "your-access-token" \
--text "这是一段测试文本" \
--voice_type "BV700_V2_streaming" \
--encoding "wav" \
--output audio.wav
import asyncio
from scripts.tts import VolcEngineTTS
async def main():
tts = VolcEngineTTS(
appid="your-app-id",
access_token="your-access-token"
)
success, message = await tts.synthesize(
text="你好,这是一段测试语音",
output_file="output.wav",
voice_type="BV700_V2_streaming"
)
print(message)
asyncio.run(main())
| 参数 | 说明 | 默认值 |
|---|---|---|
--text | 要转换的文本(必需) | - |
--output | 输出文件路径 | output.wav |
--voice_type | 语音类型 | BV700_V2_streaming |
--encoding | 音频编码格式 | wav |
--appid | 火山引擎APP ID | 环境变量VOLC_APPID |
--access_token | 访问令牌 | 环境变量VOLC_ACCESS_KEY_ID |
--cluster | 集群名称 | 自动识别 |
常用语音类型:
BV700_V2_streaming - 标准女声zh_female_qingxin - 清新女声zh_male_jingpin - 精品男声更多语音类型请参考火山引擎官方文档。
生成的音频文件可以直接在Remotion项目中使用:
import { Audio } from "remotion";
export const MyVideo = () => {
return (
<div>
<Audio src="path/to/audio.wav" />
{/* 其他视频内容 */}
</div>
);
};