Class: Voicevox::StyleInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/voicevox/wrapper/info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



41
42
43
# File 'lib/voicevox/wrapper/info.rb', line 41

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



41
42
43
# File 'lib/voicevox/wrapper/info.rb', line 41

def name
  @name
end

Instance Method Details

#loadvoid

This method returns an undefined value.

スタイルをロードします。



57
58
59
60
# File 'lib/voicevox/wrapper/info.rb', line 57

def load
  Voicevox.initialize_required
  Voicevox.process_result Voicevox::Core.voicevox_load_model(id)
end

#loaded?Boolean

スタイルがロードされているかを返します。

Returns:

  • (Boolean)

    ロードされている場合はtrue、そうでない場合はfalse。



48
49
50
# File 'lib/voicevox/wrapper/info.rb', line 48

def loaded?
  Voicevox::Core.is_model_loaded(id)
end