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

# Speech-2.5-Hd-Preview - Speech 2.5 Hd Preview - gptproto

> Speech-2.5-Hd-Preview — Speech 2.5 Hd Preview (gptproto). GPTProto API reference.

Minimax's GPTProto format for the speech 2.5 hd preview API.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://gptproto.com/api/v3/minimax/speech-2.5-hd-preview" \
    -H "Authorization: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "emotion": "surprised",
    "enable_base64_output": false,
    "enable_sync_mode": false,
    "english_normalization": false,
    "pitch": 0,
    "speed": 0.9,
    "text": "Hi there! Minimax speech 2.5 now live on Gptproto! Let's try it!",
    "voice_id": "Deep_Voice_Man",
    "volume": 1,
    "language_boost": "Chinese"
  }'
  ```

  ```python Python theme={null}
  import requests
  import json

  url = "https://gptproto.com/api/v3/minimax/speech-2.5-hd-preview"
  headers = {
      "Authorization": "YOUR_API_KEY",
      "Content-Type": "application/json"
  }

  data = {
    "emotion": "surprised",
    "enable_base64_output": false,
    "enable_sync_mode": false,
    "english_normalization": false,
    "pitch": 0,
    "speed": 0.9,
    "text": "Hi there! Minimax speech 2.5 now live on Gptproto! Let's try it!",
    "voice_id": "Deep_Voice_Man",
    "volume": 1,
    "language_boost": "Chinese"
  }

  response = requests.post(url, headers=headers, json=data)
  result = response.json()
  print(json.dumps(result, indent=2))
  ```

  ```javascript JavaScript theme={null}
  const url = "https://gptproto.com/api/v3/minimax/speech-2.5-hd-preview";
  const headers = {
    "Authorization": "YOUR_API_KEY",
    "Content-Type": "application/json"
  };

  const data = {
    "emotion": "surprised",
    "enable_base64_output": false,
    "enable_sync_mode": false,
    "english_normalization": false,
    "pitch": 0,
    "speed": 0.9,
    "text": "Hi there! Minimax speech 2.5 now live on Gptproto! Let's try it!",
    "voice_id": "Deep_Voice_Man",
    "volume": 1,
    "language_boost": "Chinese"
  };

  fetch(url, {
    method: "POST",
    headers: headers,
    body: JSON.stringify(data)
  })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Error:", error));
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io/ioutil"
      "net/http"
  )

  func main() {
      url := "https://gptproto.com/api/v3/minimax/speech-2.5-hd-preview"

      payload := []byte(`{
  "emotion": "surprised",
  "enable_base64_output": false,
  "enable_sync_mode": false,
  "english_normalization": false,
  "pitch": 0,
  "speed": 0.9,
  "text": "Hi there! Minimax speech 2.5 now live on Gptproto! Let's try it!",
  "voice_id": "Deep_Voice_Man",
  "volume": 1,
  "language_boost": "Chinese"
  }`)

      req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
      req.Header.Set("Authorization", "YOUR_API_KEY")
      req.Header.Set("Content-Type", "application/json")

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      body, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>

<CodeGroup>
  ```json 401 - Invalid signature theme={null}
  {
    "error": {
      "message": "Invalid signature",
      "type": "401"
    }
  }
  ```

  ```json 403 - Insufficient balance theme={null}
  {
    "error": {
      "message": "Insufficient balance",
      "type": "403"
    }
  }
  ```

  ```json 500 - Internal server error theme={null}
  {
    "error": {
      "message": "Internal server error",
      "type": "500"
    }
  }
  ```

  ```json 503 - Content policy violation theme={null}
  {
    "error": {
      "message": "Input may not meet the guidelines. Please adjust and try again.",
      "type": "503"
    }
  }
  ```
</CodeGroup>

## Parameters

| Parameter               | Type    | Required | Default                                                     | Description                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------- | ------- | -------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `text`                  | string  | ✅ Yes    | `Hello world! This is a test of the text-to-speech system.` | Text to convert to speech. Every character is 1 token. Maximum 10000 characters. Use between words to control pause duration (0.01-99.99s).                                                                                                                                                                                                                     |
| `voice_id`              | string  | ✅ Yes    | `Wise_Woman`                                                | \* Desired voice ID. One of the following system voice IDs: Wise\_Woman, Friendly\_Person, Inspirational\_girl, Deep\_Voice\_Man, Calm\_Woman, Casual\_Guy, Lively\_Girl, Patient\_Man, Young\_Knight, Determined\_Man, Lovely\_Girl, Decent\_Boy, Imposing\_Manner, Elegant\_Man, Abbess, Sweet\_Girl\_2, Exuberant\_Girl. \* Use a voice ID you have trained. |
| `speed`                 | number  | ❌ No     | `1`                                                         | 0.50 \~ 2.00 . Speech speed. Range: 0.5-2.0, where 1.0 is normal speed.                                                                                                                                                                                                                                                                                         |
| `volume`                | number  | ❌ No     | `1`                                                         | 0.10 \~ 10.00 . Speech volume. Range: 0.1-10.0, where 1.0 is normal volume.                                                                                                                                                                                                                                                                                     |
| `pitch`                 | integer | ❌ No     | `0`                                                         | -12 \~ 12 .Speech pitch. Range: -12 to 12, where 0 is normal pitch.                                                                                                                                                                                                                                                                                             |
| `emotion`               | string  | ❌ No     | `happy`                                                     | happy, sad, angry, fearful, disgusted, surprised, neutral . The emotion of the generated speech.                                                                                                                                                                                                                                                                |
| `english_normalization` | boolean | ❌ No     | `false`                                                     | This parameter supports English text normalization, which improves performance in number-reading scenarios.                                                                                                                                                                                                                                                     |
| `sample_rate`           | integer | ❌ No     | `8000`                                                      | 8000, 16000, 22050, 24000, 32000, 44100 .Sample rate of generated sound.                                                                                                                                                                                                                                                                                        |
| `bitrate`               | integer | ❌ No     | `32000`                                                     | 32000, 64000, 128000, 256000. Bitrate of generated sound.                                                                                                                                                                                                                                                                                                       |
| `channel`               | string  | ❌ No     | `1`                                                         | 1, 2 . The number of channels of the generated audio. 1: mono, 2: stereo.                                                                                                                                                                                                                                                                                       |
| `format`                | string  | ❌ No     | `mp3`                                                       | mp3, wav, pcm, flac .Format of generated sound.                                                                                                                                                                                                                                                                                                                 |
| `language_boost`        | string  | ❌ No     | `auto`                                                      | 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, auto Enhance the ability to recognize specified languages and dialects.                                                                |
| `enable_base64_output`  | boolean | ❌ No     | `false`                                                     | If enabled, the output will be encoded into a BASE64 string instead of a URL. This property is only available through the API.                                                                                                                                                                                                                                  |
| `enable_sync_mode`      | boolean | ❌ No     | `false`                                                     | If set to true, the function will wait for the result to be generated and uploaded before returning the response. It allows you to get the result directly in the response. This property is only available through the API.                                                                                                                                    |
