client.generate_speech(...)またはclient.create_speech(...)。
例
主なパラメーター
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.
Ruby SDKで/audio/speechを呼び出します。
client.generate_speech(...)またはclient.create_speech(...)。
require 'phaseo_sdk'
client = PhaseoSdk::Phaseo.new(api_key: ENV.fetch("PHASEO_API_KEY"))
audio = client.generate_speech(
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)。