Class SpeechService
public class SpeechService : CrudServiceBase<OpenAIClient>
- Inheritance
-
objectSpeechService
Constructors
SpeechService(OpenAIClient)
public SpeechService(OpenAIClient client)
Parameters
clientOpenAIClient
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
reqOpenAISpeechGenerationRequestoptionsRESTOptions
Returns
- UniTask<Generated<AudioClip>>
StreamAsync(OpenAISpeechGenerationRequest, RESTOptions)
public UniTask<IRESTStream<OpenAISpeechGenerationEvent>> StreamAsync(OpenAISpeechGenerationRequest req, RESTOptions options = null)
Parameters
reqOpenAISpeechGenerationRequestoptionsRESTOptions
Returns
- UniTask<IRESTStream<OpenAISpeechGenerationEvent>>