Module: Gtts

Defined in:
lib/gtts.rb,
lib/gtts/tts.rb,
lib/gtts/lang.rb,
lib/gtts/version.rb

Defined Under Namespace

Modules: Lang Classes: Error, GTTS, GttsError, Speed

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.create(text, **options) ⇒ Object

Shortcut for creating a new GTTS instance



11
12
13
# File 'lib/gtts.rb', line 11

def self.create(text, **options)
  GTTS.new(text, **options)
end

.language_supported?(lang_code) ⇒ Boolean

Check if a language is supported

Returns:

  • (Boolean)


21
22
23
# File 'lib/gtts.rb', line 21

def self.language_supported?(lang_code)
  Lang.supported?(lang_code)
end

.languagesObject

Get list of supported languages



16
17
18
# File 'lib/gtts.rb', line 16

def self.languages
  Lang.tts_langs
end