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

# MiniMax Speech 2.8 HD Synchronous Speech Synthesis

Convert text to speech, with support for multiple voices, emotion control, speech rate adjustment, and more. The text length must be less than 10000 characters. If the text length is greater than 3000 characters, streaming output is recommended.

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `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 synthesize into speech. The length must be less than 10000 characters. If the text length is greater than 3000 characters, streaming output is recommended. Supports paragraph switching (line breaks), pause control (`&lt;#x#&gt;` markers), and filler/sound effect tags (such as (laughs), (coughs), etc.; supported only by speech-2.8-hd/turbo)
</ParamField>

<ParamField body="stream" type="boolean" default={false}>
  Controls whether to use streaming output. The default is false, meaning streaming is not enabled
</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 make the voice deeper; values closer to 100 make the voice brighter

      Value range: \[-100, 100]
    </ParamField>

    <ParamField body="timbre" type="integer">
      Timbre adjustment (magnetic/crisp), range \[-100, 100]. Values closer to -100 make the voice richer; values closer to 100 make the voice crisper

      Value range: \[-100, 100]
    </ParamField>

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

      Value range: \[-100, 100]
    </ParamField>

    <ParamField body="sound_effects" type="string">
      Sound effect setting. Only one can be selected per request. Available values: spacious\_echo (spacious echo), auditorium\_echo (auditorium broadcast), lofi\_telephone (telephone distortion), robotic (electronic voice)

      Available 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 supported only for non-streaming output

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

    <ParamField body="bitrate" type="integer" default={128000}>
      The bitrate of the generated audio. Available range: \[32000, 64000, 128000, 256000]. The default value is 128000. This parameter only takes effect for audio in mp3 format

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

    <ParamField body="channel" type="integer" default={1}>
      The number of channels for the generated audio. Available range: \[1, 2], where 1 is mono and 2 is stereo. The default value is 1

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

    <ParamField body="force_cbr" type="boolean" default={false}>
      Controls constant bitrate (cbr) for audio. Available values are false and true. When this parameter is set to true, audio is encoded with a constant bitrate. Note: This parameter only takes effect when the audio is set to streaming output and the audio format is mp3
    </ParamField>

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

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

<ParamField body="output_format" type="string" default="hex">
  Parameter that controls the form of the output result. Available values are url and hex. The default value is hex. This parameter only takes effect in non-streaming scenarios; streaming scenarios only support returning in hex form. The returned url is valid for 24 hours

  Available 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. The larger the value, the higher the volume. Value range: (0, 10]. The default value is 1.0

      Value range: \[0, 10]
    </ParamField>

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

      Value range: \[-12, 12]
    </ParamField>

    <ParamField body="speed" type="number" default={1}>
      The speech rate of the synthesized audio. The larger the value, the faster the speech rate. Value range: \[0.5, 2]. The default value is 1.0

      Value range: \[0.5, 2]
    </ParamField>

    <ParamField body="emotion" type="string">
      Controls the emotion of the synthesized speech. The parameter range corresponds to 8 emotions: happy (happy), sad (sad), angry (angry), fearful (fearful), disgusted (disgusted), surprised (surprised), calm (neutral), fluent (vivid), and whisper (whisper). The model will automatically match an appropriate emotion based on the input text, so manual specification is usually not required

      Available 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 a mixed voice, set the timber\_weights parameter and set this parameter to an empty value. Supports three types: system voices, cloned voices, and text-generated voices
    </ParamField>

    <ParamField body="latex_read" type="boolean" default={false}>
      Controls whether to read latex formulas aloud. The default is false. Only Chinese is supported. After this parameter is enabled, the language\_boost parameter will be set to Chinese
    </ParamField>

    <ParamField body="text_normalization" type="boolean" default={false}>
      Whether to enable Chinese and English text normalization. Enabling it can improve performance in numeric reading scenarios, but will slightly increase latency. The default value is 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. The default value is false. This parameter only takes effect for non-streaming synthesis
</ParamField>

<ParamField body="language_boost" type="string">
  Whether to enhance recognition capability for specified low-resource languages and dialects. The default value is null. It can be set to auto to let the model determine automatically

  Available 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}>
      Sets whether the last chunk contains the concatenated speech hex data. The default value is false, meaning the last chunk contains the complete concatenated speech hex data
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="timber_weights" type="object[]">
  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 filled in together with voice\_id. Available value range: \[1, 100]. Supports mixing up to 4 voices. The higher the proportion of a single voice, the more similar the synthesized voice will be to that voice

      Value range: \[1, 100]
    </ParamField>

    <ParamField body="voice_id" type="string" required={true}>
      The voice ID for the synthesized audio. Must be filled in together with the weight parameter. Supports three types: 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. The default value is false. This parameter is only valid in non-streaming output scenarios, and only for the speech-2.6-hd, speech-2.6-turbo, speech-01-turbo, and speech-01-hd models
</ParamField>

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

<ParamField body="pronunciation_dict" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="tone" type="string[]">
      Defines phonetic annotations or pronunciation replacement rules corresponding to text or symbols that require special annotation. In Chinese text, tones are represented by numbers: first tone is 1, second tone is 2, third tone is 3, fourth tone is 4, and neutral tone is 5. Example: \["燕少飞/(yan4)(shao3)(fei1)", "omg/oh my god"]
    </ParamField>
  </Expandable>
</ParamField>

## Response Information

<ResponseField name="data" type="object" required={false}>
  The returned synthesis data object. It may be null, so a non-null check is required
</ResponseField>

<ResponseField name="trace_id" type="string" required={false}>
  The id of this session, used to help locate issues during consultation/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>
