llms.txt
MiniMax Speech-02 HD
Generate speech from text prompts and different voices using the MiniMax Speech-02 HD model, which leverages advanced AI techniques to create high-quality text-to-speech.
Overview
- Endpoint:
https://fal.run/fal-ai/minimax-tts/text-to-speech - Model ID:
fal-ai/minimax-tts/text-to-speech - Category: text-to-speech
- Kind: inference
- Tags: speech
Pricing
- Price: $0.1 per 1000 characters
For more details, see 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:
text(string, required): Text to convert to speech (max 5000 characters)- Examples: "Hello world! This is a test of the text-to-speech system."
voice_setting(VoiceSetting, optional): Voice configuration settingsaudio_setting(AudioSetting, optional): Audio configuration settingslanguage_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", "auto"
pronunciation_dict(PronunciationDict, optional): Custom pronunciation dictionary for text replacement
Required Parameters Example:
{
"text": "Hello world! This is a test of the text-to-speech system."
}
Output Schema
The API returns the following output format:
audio(File, required): The generated audio file- Examples: {"url":"https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"}
duration_ms(integer, required): Duration of the audio in milliseconds
Example Response:
{
"audio": {
"url": "https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"
}
}
Usage Examples
cURL
curl --request POST \
--url https://fal.run/fal-ai/minimax-tts/text-to-speech \
--header "Authorization: Key $FAL_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "Hello world! This is a test of the text-to-speech system."
}'
Python
Ensure you have the Python client installed:
pip install fal-client
Then use the API client to make requests:
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-tts/text-to-speech",
arguments={
"text": "Hello world! This is a test of the text-to-speech system."
},
with_logs=True,
on_queue_update=on_queue_update,
)
print(result)
JavaScript
Ensure you have the JavaScript client installed:
npm install --save @fal-ai/client
Then use the API client to make requests:
import { fal } from "@fal-ai/client";
const result = await fal.subscribe("fal-ai/minimax-tts/text-to-speech", {
input: {
text: "Hello world! This is a test of the text-to-speech system."
},
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);