In this tutorial, we'll set up the project step by step, starting with the basics.
适合的用途#
Toast 读英语,就像同事在给您讲解一个流程。它没有播音员的修饰,正是这份朴素让观众能把长教程看到最后。
这种声线经得起长度。促销类音色是为三十秒写的,Toast 则为真正做出一样东西所需的二十分钟而设计。
实际应用#
通过 API 调用#
voice 字段直接填写上方的音色 ID。请求中的其他参数均为 Paxa TTS Flash 的默认值。
- 模型
- Paxa TTS Flash
- 每次请求
- 5,000 个字符
- 费率
- 每 1,000 个字符 10 积分
- 免费积分
- 100 积分,约合 11 分钟语音
curl -X POST https://api.paxalabs.com/v1/tts \ -H "Authorization: Bearer $PAXA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "In this tutorial, we'\''ll set up the project step by step, starting with the basics.", "voice": "toast", "model": "paxa-tts-flash-v1" }' \ --output toast.mp3
import { writeFile } from "node:fs/promises"; const response = await fetch("https://api.paxalabs.com/v1/tts", { method: "POST", headers: { Authorization: `Bearer ${process.env.PAXA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ text: "In this tutorial, we'll set up the project step by step, starting with the basics.", voice: "toast", model: "paxa-tts-flash-v1", }), }); if (!response.ok) throw new Error(`TTS failed: ${response.status}`); await writeFile("toast.mp3", Buffer.from(await response.arrayBuffer()));
import os import requests response = requests.post( "https://api.paxalabs.com/v1/tts", headers={"Authorization": f"Bearer {os.environ['PAXA_API_KEY']}"}, json={ "text": "In this tutorial, we'll set up the project step by step, starting with the basics.", "voice": "toast", "model": "paxa-tts-flash-v1", }, ) response.raise_for_status() with open("toast.mp3", "wb") as f: f.write(response.content)
常见问题#
它适合长视频吗?
它就是为这种长度设计的。这种声线足够朴素,二十分钟都跟得下去,促销式的读法两分钟就会让人听腻。
它能读泰语吗?
能读,但带外国口音,因为这个音色是围绕英语设计的。泰语教程更适合 Foi Thong 或 Kaprao,两者都能读泰语句子里的英语术语。
它如何处理代码和技术术语?
技术英语会按书写原样读出。音色读的就是您发送的文本,所以按您希望听到的样子来写术语,是最可靠的做法。
听它朗读您自己的文字 新账户自带 100 免费积分。打开控制台,这个音色已为您选好。
免费开始