class Ollama::Handlers::Say
def call(response)
def call(response) if content = response.response || response.message&.content @output.print content end response.done and @output.close self end
def initialize(output: nil, voice: 'Samantha')
def initialize(output: nil, voice: 'Samantha') output ||= IO.popen(Shellwords.join([ 'say', '-v', voice ]), 'w') super(output:) @output.sync = true end