Table of Contents

Class SpeechService

public class SpeechService : CrudServiceBase<OpenAIClient>
Inheritance
object
SpeechService

Constructors

SpeechService(OpenAIClient)

public SpeechService(OpenAIClient client)

Parameters

client OpenAIClient

Fields

kEndpoint

public const string kEndpoint = "VERSION/audio/speech"

Field Value

string

Methods

CreateAsync(OpenAISpeechGenerationRequest, RESTOptions)

Generates audio from the input text.

public UniTask<Generated<AudioClip>> CreateAsync(OpenAISpeechGenerationRequest req, RESTOptions options = null)

Parameters

req OpenAISpeechGenerationRequest
options RESTOptions

Returns

UniTask<Generated<AudioClip>>

StreamAsync(OpenAISpeechGenerationRequest, RESTOptions)

public UniTask<IRESTStream<OpenAISpeechGenerationEvent>> StreamAsync(OpenAISpeechGenerationRequest req, RESTOptions options = null)

Parameters

req OpenAISpeechGenerationRequest
options RESTOptions

Returns

UniTask<IRESTStream<OpenAISpeechGenerationEvent>>