音声を生成せずに予想長さのみを返すAPIで、課金予測やテキスト長調節に活用できます。
text-to-speech
APIとほぼ同じです。duration
値のみが返されます。項目 | 必須 | 説明 |
---|---|---|
text | ✅ | 分析対象テキスト。最大300文字 |
language | ✅ | テキスト言語。ko 、en 、ja のうち一つ |
style | ❌ | 感情スタイル。指定しない場合はdefaultスタイルが使用されます |
model | ❌ | デフォルト値はsona_speech_1 。現在は該当モデルのみ使用可能 |
voice_settings | ❌ | 発話速度やピッチ調節値。結果長に影響を与える可能性があります |
voice_settings.speed
を調節すると長さが変わるため、固定された発話速度でテストすることをお勧めします。API key for the service
Returns predicted duration of the audio in seconds
The response is of type object
.