跳转到主要内容
Translation Process for MDX Documentation Okay, here’s the workflow. I’ve got this English MDX documentation to translate into Simplified Chinese. My focus is going to be translating all the text content, making sure to hit all the headings, paragraphs, lists, and even those card titles and descriptions. I need to be very careful, though. Rule number one is to not touch code blocks, inline code snippets, URLs, API endpoints, variable names, component names (like <Card> or <ParamField>), or parameter names. These should remain in English. Structurally, I’m keeping everything identical to the original MDX format, maintaining all markdown syntax, line breaks, and spacing as they are. And, of course, I’m going to leave common technical terms like “API,” “SDK,” and “token” in English - we’re being professional and technical here. My output will be only the translated content. Let’s start with the frontmatter: “title: “Create Speech"" becomes “title: “创建语音"". “openapi: “POST /v1/audio/speech"" remains untouched. “description: “Generates audio from the input text"" translates to “description: “根据输入文本生成音频"". Now, onto the headings. ”## Request Body” becomes ”## 请求体”. The ParamFields section needs attention. “model: TTS model: tts-1 (standard) or tts-1-hd (higher quality).” translates to “TTS 模型:tts-1(标准)或 tts-1-hd(高质量)。” Similarly, “input: The text to generate audio for. Maximum 4096 characters.” becomes “要生成音频的文本。最大长度为 4096 个字符。”, and so on. The ”## Response” heading translates to ”## 响应”, and “Returns the audio file in the requested format.” becomes “返回所请求格式的音频文件。” I’ll leave the request example code block as is. The heading ”## Voice Samples” becomes ”## 音色示例”. For the table, “Voice” becomes “音色”, and “Description” becomes “描述”. I’ll continue, translating each entry as appropriate. Finally, I need to double-check my work against the rules. Did I translate tts-1? No, because it’s in backticks. Did I translate model? No, because it’s a parameter name. Excellent. I also made sure to keep “API,” “TTS” in English, and I’ve ensured the MDX structure is perfectly preserved. The translation is complete.

title: “创建语音” openapi: “POST /v1/audio/speech” description: “根据输入文本生成音频”

请求体

model
string
默认值:"tts-1"
TTS 模型:tts-1(标准)或 tts-1-hd(高质量)。
input
string
必填
要生成音频的文本。最大长度为 4096 个字符。
voice
string
必填
使用的音色:alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse
response_format
string
默认值:"mp3"
音频格式:mp3, opus, aac, flac, wav, pcm
speed
number
默认值:"1.0"
音频语速(0.25 到 4.0)。

响应

返回所请求格式的音频文件。
curl -X POST "https://api.lemondata.cc/v1/audio/speech" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1-hd",
    "voice": "nova",
    "input": "Hello, welcome to LemonData!"
  }' \
  --output speech.mp3

音色示例

音色描述
alloy中性,平衡
ash冷静,沉稳
ballad悦耳,富有表现力
coral温暖,诱人
echo温暖,谈话式
fable富有表现力,叙述式
nova友好,清晰
onyx深沉,权威
sage睿智,深思熟虑
shimmer柔和,温柔
verse动态,多才多艺