client.CreateSpeech(...)
示例
主要参数
model(必填):支持 TTS 的模型 ID。input(必填):要合成的文本。voice:语音预设(因模型而异,例如alloy)。format:mp3、wav、flac等。speed:播放速度倍率(通常为 0.25–4)。
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
使用 C# SDK 调用 /audio/speech。
client.CreateSpeech(...)
using PhaseoSdk;
var client = new Phaseo(apiKey);
var response = await client.CreateSpeech(new Dictionary<string, object>
{
["model"] = "openai/gpt-4o-mini-tts",
["input"] = "Hello world",
["voice"] = "alloy",
["format"] = "mp3"
});
model(必填):支持 TTS 的模型 ID。input(必填):要合成的文本。voice:语音预设(因模型而异,例如 alloy)。format:mp3、wav、flac 等。speed:播放速度倍率(通常为 0.25–4)。