# MiniMax Speech 2.6 [HD]

> Generate speech from text prompts and different voices using the MiniMax Speech-2.6 HD model, which leverages advanced AI techniques to create high-quality text-to-speech.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/minimax/speech-2.6-hd`
- **Model ID**: `fal-ai/minimax/speech-2.6-hd`
- **Category**: text-to-speech
- **Kind**: inference
**Tags**: text-to-speech



## Pricing

- **Price**: $0.1 per 1000 characters

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`voice_setting`** (`VoiceSetting`, _optional_):
  Voice configuration settings

- **`audio_setting`** (`AudioSetting`, _optional_):
  Audio configuration settings

- **`language_boost`** (`Enum`, _optional_):
  Enhance recognition of specified languages and dialects
  - Options: `"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"`, `"Slovak"`, `"Swedish"`, `"Croatian"`, `"Hungarian"`, `"Norwegian"`, `"Slovenian"`, `"Catalan"`, `"Nynorsk"`, `"Afrikaans"`, `"auto"`

- **`output_format`** (`OutputFormatEnum`, _optional_):
  Format of the output content (non-streaming only) Default value: `"hex"`
  - Default: `"hex"`
  - Options: `"url"`, `"hex"`

- **`pronunciation_dict`** (`PronunciationDict`, _optional_):
  Custom pronunciation dictionary for text replacement

- **`prompt`** (`string`, _required_):
  Text to convert to speech. Paragraph breaks should be marked with newline characters. **NOTE**: You can customize speech pauses by adding markers in the form `<#x#>`, where `x` is the pause duration in seconds. Valid range: `[0.01, 99.99]`, up to two decimal places. Pause markers must be placed between speakable text segments and cannot be used consecutively.
  - Examples: "Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal!"

- **`normalization_setting`** (`LoudnessNormalizationSetting`, _optional_):
  Loudness normalization settings for the audio



**Required Parameters Example**:

```json
{
  "prompt": "Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal!"
}
```

**Full Example**:

```json
{
  "output_format": "hex",
  "prompt": "Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal!"
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated audio file
  - Examples: {"url":"https://storage.googleapis.com/falserverless/example_outputs/minimax-speech-26/speech_26_hd_out.mp3"}

- **`duration_ms`** (`integer`, _required_):
  Duration of the audio in milliseconds



**Example Response**:

```json
{
  "audio": {
    "url": "https://storage.googleapis.com/falserverless/example_outputs/minimax-speech-26/speech_26_hd_out.mp3"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/minimax/speech-2.6-hd \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal!"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/minimax/speech-2.6-hd",
    arguments={
        "prompt": "Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal!"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/minimax/speech-2.6-hd", {
  input: {
    prompt: "Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal!"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/minimax/speech-2.6-hd)
- [API Documentation](https://fal.ai/models/fal-ai/minimax/speech-2.6-hd/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/minimax/speech-2.6-hd)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
