Method: Mac::Say.voices

Defined in:
lib/mac/say.rb

.voicesArray<Hash>

Get all the voices supported by the say command on current machine

Examples:

Get all the voices

Mac::Say.voices #=>
   [
       {
           :name      => :agnes,
           :language  => :en,
           :country   => :us,
           :sample    => "Isn't it nice to have a computer that will talk to you?",
           :gender    => :female,
           :joke      => false,
           :quality   => :low,
           :singing   => false
       },
       {
           :name      => :albert,
           :language  => :en,
           :country   => :us,
           :sample    => "I have a frog in my throat. No, I mean a real frog!",
           :gender    => :male,
           :joke      => true,
           :quality   => :medium,
           :singing   => false
       },
       ...
   ]

Returns:

  • (Array<Hash>)

    an array of voices Hashes supported by the say command



239
240
241
242
# File 'lib/mac/say.rb', line 239

def self.voices
  mac = new
  mac.voices
end