class

Arcana::AI::TTS::OpenAI

Inherits Arcana::AI::TTS::Provider < Arcana::AI::Traceable < Reference < Object

Constants

ENDPOINT = "https://api.openai.com/v1/audio/speech"

Constructors

new(api_key : String, model : String = "gpt-4o-mini-tts", endpoint : String = ENDPOINT, trace : Proc(String, Nil) | Nil = nil)
Source

Instance methods

model
Source
name
Source
stream(request : Request, ctx : Context | Nil = nil, &block : Bytes -> ) : Result

Stream audio chunks as they arrive. Override in subclasses.

Source
synthesize(request : Request, output_path : String) : Result
Source