> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax Speech 2.8 HD Sync Text-to-Speech

Convert text to speech with support for multiple voices, emotion control, speed adjustment, and more. Text length limit is less than 10,000 characters. For text longer than 3,000 characters, streaming output is recommended.

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="text" type="string" required={true}>
  The text to be synthesized into speech. Length limit is less than 10,000 characters. For text longer than 3,000 characters, streaming output is recommended. Supports paragraph breaks (newline characters), pause control (`&lt;#x#&gt;` markers), and interjection tags (such as (laughs), (coughs), etc., only supported by speech-2.8-hd/turbo).
</ParamField>

<ParamField body="stream" type="boolean" default={false}>
  Controls whether to enable streaming output. Default: false (streaming disabled).
</ParamField>

<ParamField body="voice_modify" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="pitch" type="integer">
      Pitch adjustment (deep/bright), range \[-100, 100]. Values closer to -100 produce a deeper sound; values closer to 100 produce a brighter sound.

      Range: \[-100, 100]
    </ParamField>

    <ParamField body="timbre" type="integer">
      Timbre adjustment (rich/crisp), range \[-100, 100]. Values closer to -100 produce a richer sound; values closer to 100 produce a crisper sound.

      Range: \[-100, 100]
    </ParamField>

    <ParamField body="intensity" type="integer">
      Intensity adjustment (powerful/soft), range \[-100, 100]. Values closer to -100 produce a more powerful sound; values closer to 100 produce a softer sound.

      Range: \[-100, 100]
    </ParamField>

    <ParamField body="sound_effects" type="string">
      Sound effect settings. Only one can be selected at a time. Possible values: spacious\_echo (Spacious Echo), auditorium\_echo (Auditorium Broadcast), lofi\_telephone (Telephone Distortion), robotic (Electronic Voice).

      Possible values: `spacious_echo`, `auditorium_echo`, `lofi_telephone`, `robotic`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="audio_setting" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="format" type="string" default="mp3">
      The format of the generated audio. wav is only supported in non-streaming output.

      Possible values: `mp3`, `pcm`, `flac`, `wav`
    </ParamField>

    <ParamField body="bitrate" type="integer" default={128000}>
      The bitrate of the generated audio. Options: \[32000, 64000, 128000, 256000], Default: 128000. This parameter only applies to mp3 format audio.

      Possible values: `32000`, `64000`, `128000`, `256000`
    </ParamField>

    <ParamField body="channel" type="integer" default={1}>
      The number of audio channels. Options: \[1, 2], where 1 is mono and 2 is stereo. Default: 1

      Possible values: `1`, `2`
    </ParamField>

    <ParamField body="force_cbr" type="boolean" default={false}>
      Controls constant bitrate (CBR) encoding for audio. When set to true, audio will be encoded at a constant bitrate. Note: This parameter only takes effect when streaming output is enabled and the audio format is mp3.
    </ParamField>

    <ParamField body="sample_rate" type="integer" default={32000}>
      The sample rate of the generated audio. Options: \[8000, 16000, 22050, 24000, 32000, 44100], Default: 32000

      Possible values: `8000`, `16000`, `22050`, `24000`, `32000`, `44100`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="output_format" type="string" default="hex">
  Parameter that controls the output format. Possible values: url, hex. Default: hex. This parameter only takes effect in non-streaming scenarios; streaming scenarios only support hex output. The returned URL is valid for 24 hours.

  Possible values: `url`, `hex`
</ParamField>

<ParamField body="voice_setting" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="vol" type="number" default={1}>
      The volume of the synthesized audio. Higher values result in louder volume. Range (0, 10], Default: 1.0

      Range: \[0, 10]
    </ParamField>

    <ParamField body="pitch" type="integer" default={0}>
      The pitch of the synthesized audio. Range \[-12, 12], Default: 0, where 0 outputs the original voice.

      Range: \[-12, 12]
    </ParamField>

    <ParamField body="speed" type="number" default={1}>
      The speech rate of the synthesized audio. Higher values result in faster speech. Range \[0.5, 2], Default: 1.0

      Range: \[0.5, 2]
    </ParamField>

    <ParamField body="emotion" type="string">
      Controls the emotion of the synthesized speech. Corresponds to 9 emotions: happy, sad, angry, fearful, disgusted, surprised, neutral (calm), vivid (fluent), whisper. The model automatically matches appropriate emotions based on input text; manual specification is generally unnecessary.

      Possible values: `happy`, `sad`, `angry`, `fearful`, `disgusted`, `surprised`, `calm`, `fluent`, `whisper`
    </ParamField>

    <ParamField body="voice_id" type="string" required={true}>
      The voice ID for the synthesized audio. To set mixed voices, use the timber\_weights parameter and set this parameter to an empty value. Supports system voices, cloned voices, and text-generated voices.
    </ParamField>

    <ParamField body="latex_read" type="boolean" default={false}>
      Controls whether to read LaTeX formulas aloud. Default: false. Only supports Chinese; when enabled, the language\_boost parameter will be set to Chinese.
    </ParamField>

    <ParamField body="text_normalization" type="boolean" default={false}>
      Enables Chinese and English text normalization. When enabled, it can improve performance in number reading scenarios but slightly increases latency. Default: false.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="aigc_watermark" type="boolean" default={false}>
  Controls whether to add an audio rhythm identifier at the end of the synthesized audio. Default: false. This parameter only applies to non-streaming synthesis.
</ParamField>

<ParamField body="language_boost" type="string">
  Whether to enhance recognition of specified minority languages and dialects. Default: null. Can be set to auto to let the model automatically determine the language type.

  Possible values: `Chinese`, `Chinese,Yue`, `English`, `Arabic`, `Russian`, `Spanish`, `French`, `Portuguese`, `German`, `Turkish`, `Dutch`, `Ukrainian`, `Vietnamese`, `Indonesian`, `Japanese`, `Italian`, `Korean`, `Thai`, `Polish`, `Romanian`, `Greek`, `Czech`, `Finnish`, `Hindi`, `Bulgarian`, `Danish`, `Hebrew`, `Malay`, `Persian`, `Slovak`, `Swedish`, `Croatian`, `Filipino`, `Hungarian`, `Norwegian`, `Slovenian`, `Catalan`, `Nynorsk`, `Tamil`, `Afrikaans`, `auto`
</ParamField>

<ParamField body="stream_options" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="exclude_aggregated_audio" type="boolean" default={false}>
      Controls whether the last chunk includes the concatenated speech hex data. Default: false, meaning the last chunk contains the complete concatenated speech hex data.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="timber_weights" type="array">
  Mixed voice settings. Supports mixing up to 4 voices.

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="weight" type="integer" required={true}>
      The weight of each voice in the synthesized audio. Must be provided together with voice\_id. Range: \[1, 100]. Supports mixing up to 4 voices. A higher proportion for a single voice results in greater similarity to that voice.

      Range: \[1, 100]
    </ParamField>

    <ParamField body="voice_id" type="string" required={true}>
      The voice ID for the synthesized audio. Must be provided together with the weight parameter. Supports system voices, cloned voices, and text-generated voices.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="subtitle_enable" type="boolean" default={false}>
  Controls whether to enable the subtitle service. Default: false. This parameter is only effective in non-streaming output scenarios and only applies to speech-2.6-hd, speech-2.6-turbo, speech-02-turbo, speech-02-hd, speech-01-turbo, speech-01-hd models.
</ParamField>

<ParamField body="continuous_sound" type="boolean" default={false}>
  Enable this parameter to make clause transitions more natural. Only supported for speech-2.8-hd and speech-2.8-turbo models.
</ParamField>

<ParamField body="pronunciation_dict" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="tone" type="array">
      Define pronunciation annotation or replacement rules for characters or symbols that require special marking. In Chinese text, tones are represented by numbers: 1st tone is 1, 2nd tone is 2, 3rd tone is 3, 4th tone is 4, neutral tone is 5. Example: \["omg/oh my god"]
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="data" type="object" required={false}>
  The returned synthesis data object. May be null; null-check is required.
</ResponseField>

<ResponseField name="trace_id" type="string" required={false}>
  The session ID for this request, used to help locate issues during inquiries or feedback.
</ResponseField>

<ResponseField name="base_resp" type="object" required={false}>
  The status code and details of this request.
</ResponseField>

<ResponseField name="extra_info" type="object" required={false}>
  Additional information about the audio.
</ResponseField>
