struct AI::Provider::SpeechModel::CallOptions

Overview

Options for the doGenerate call.

Included Modules

Defined in:

ai/provider/speech_model/speech_model.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(text : String, voice : String | Nil = nil, output_format : String | Nil = nil, instructions : String | Nil = nil, speed : Float64 | Nil = nil, language : String | Nil = nil, provider_options : Shared::ProviderOptions | Nil = nil, headers : Shared::Headers | Nil = nil) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def headers : Shared::Headers | Nil #

Additional HTTP headers to be sent with the request.


[View source]
def instructions : String | Nil #

Instructions for the speech generation (e.g. "Speak in a slow and steady tone").


[View source]
def language : String | Nil #

The language for speech generation. ISO 639-1 code (e.g. "en", "es", "fr") or "auto".


[View source]
def output_format : String | Nil #

The desired output format for the audio (e.g. "mp3", "wav").


[View source]
def provider_options : Shared::ProviderOptions | Nil #

Additional provider-specific options.


[View source]
def speed : Float64 | Nil #

The speed of the speech generation.


[View source]
def text : String #

Text to convert to speech.


[View source]
def voice : String | Nil #

The voice to use for speech synthesis. This is provider-specific and may be a voice ID, name, or other identifier.


[View source]