Class: GroqRuby::Resources::Audio::Speech
- Defined in:
- lib/groq_ruby/resources/audio/speech.rb
Overview
‘client.audio.speech.create(…)` — text-to-speech. Returns the raw audio bytes (caller decides where to write them).
Constant Summary collapse
- PATH =
"/openai/v1/audio/speech".freeze
- SCHEMA =
Dry::Schema.define do required(:input).filled(:string) required(:model).filled(:string) required(:voice).filled(:string) optional(:response_format).filled(:string, included_in?: %w[flac mp3 mulaw ogg wav]) optional(:sample_rate).filled(:integer, included_in?: [8000, 16000, 22050, 24000, 32000, 44100, 48000]) optional(:speed).filled(:float) end
Instance Method Summary collapse
-
#create(**params) ⇒ String
Raw audio bytes — write with ‘File.binwrite`.
Methods inherited from Base
Constructor Details
This class inherits a constructor from GroqRuby::Resources::Base