public class MiniMaxHttpClient extends Object
| Constructor and Description |
|---|
MiniMaxHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
static okhttp3.sse.EventSource |
executeStream(String url,
Map<String,String> header,
String payload,
okhttp3.sse.EventSourceListener listener) |
static MiniMaxTTSResponse |
speech(MiniMaxTTSRequest vo)
传入 FishAudioTTSRequestVo 对象。
|
static MiniMaxTTSResponse |
speech(String apiKey,
MiniMaxTTSRequest vo)
指定 API Key 调用接口。
|
static MiniMaxTTSResponse |
speech(String text,
String voice)
直接传入文本内容构造请求(使用默认参数)。
|
static MiniMaxTTSResponse |
speech(String apiPrefixUrl,
String apiKey,
MiniMaxTTSRequest vo)
完整的接口调用:指定 URL、API Key 和请求对象。
|
static MiniMaxTTSResponse |
speech(String text,
String voice,
String language_boost) |
static MiniMaxTTSResponse |
speechRequest(String apiPrefixUrl,
String apiKey,
String payload)
发起 HTTP 请求,返回平台 TTS 接口响应结果。
|
static okhttp3.sse.EventSource |
speechStream(MiniMaxTTSRequest vo,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.sse.EventSource |
speechStream(String apiKey,
MiniMaxTTSRequest vo,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.sse.EventSource |
speechStream(String text,
String voice,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.sse.EventSource |
speechStream(String apiPrefixUrl,
String apiKey,
MiniMaxTTSRequest vo,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.sse.EventSource |
speechStream(String text,
String voice,
String language_boost,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.sse.EventSource |
speechStreamRequest(String apiPrefixUrl,
String apiKey,
String payload,
okhttp3.sse.EventSourceListener listener)
发起 HTTP 请求,返回平台 TTS 接口响应结果。
|
public static final String TTS_URL
public static MiniMaxTTSResponse speech(String text, String voice)
text - 需要合成的文本public static MiniMaxTTSResponse speech(String text, String voice, String language_boost)
public static MiniMaxTTSResponse speech(MiniMaxTTSRequest vo)
vo - 请求对象public static MiniMaxTTSResponse speech(String apiKey, MiniMaxTTSRequest vo)
apiKey - API密钥vo - 请求对象public static MiniMaxTTSResponse speech(String apiPrefixUrl, String apiKey, MiniMaxTTSRequest vo)
apiPrefixUrl - 接口前缀地址,如 https://api.fish.audio/v1apiKey - API 密钥vo - 请求对象public static MiniMaxTTSResponse speechRequest(String apiPrefixUrl, String apiKey, String payload)
apiPrefixUrl - 接口前缀apiKey - API 密钥payload - msgpack 序列化后的请求数据public static okhttp3.sse.EventSource speechStream(String text, String voice, okhttp3.sse.EventSourceListener listener)
public static okhttp3.sse.EventSource speechStream(String text, String voice, String language_boost, okhttp3.sse.EventSourceListener listener)
public static okhttp3.sse.EventSource speechStream(MiniMaxTTSRequest vo, okhttp3.sse.EventSourceListener listener)
public static okhttp3.sse.EventSource speechStream(String apiKey, MiniMaxTTSRequest vo, okhttp3.sse.EventSourceListener listener)
public static okhttp3.sse.EventSource speechStream(String apiPrefixUrl, String apiKey, MiniMaxTTSRequest vo, okhttp3.sse.EventSourceListener listener)
public static okhttp3.sse.EventSource speechStreamRequest(String apiPrefixUrl, String apiKey, String payload, okhttp3.sse.EventSourceListener listener)
apiPrefixUrl - 接口前缀apiKey - API 密钥payload - msgpack 序列化后的请求数据Copyright © 2026. All rights reserved.