Class: Voicevox::CharacterInfo
- Inherits:
-
Struct
- Object
- Struct
- Voicevox::CharacterInfo
- Defined in:
- lib/voicevox/wrapper/info.rb
Overview
キャラクターの情報を表すStruct。
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#speaker_uuid ⇒ Object
Returns the value of attribute speaker_uuid.
-
#styles ⇒ Object
Returns the value of attribute styles.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#id ⇒ Integer
キャラクターの最初のスタイルのIDを返します。.
-
#load ⇒ void
キャラクターのスタイルを全てロードします。.
-
#loaded? ⇒ Boolean
キャラクターのスタイルが全てロードされているかを返します。.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/voicevox/wrapper/info.rb', line 10 def name @name end |
#speaker_uuid ⇒ Object
Returns the value of attribute speaker_uuid
10 11 12 |
# File 'lib/voicevox/wrapper/info.rb', line 10 def speaker_uuid @speaker_uuid end |
#styles ⇒ Object
Returns the value of attribute styles
10 11 12 |
# File 'lib/voicevox/wrapper/info.rb', line 10 def styles @styles end |
#version ⇒ Object
Returns the value of attribute version
10 11 12 |
# File 'lib/voicevox/wrapper/info.rb', line 10 def version @version end |
Instance Method Details
#id ⇒ Integer
Note:
ほとんどの場合はノーマルになります。
キャラクターの最初のスタイルのIDを返します。
18 19 20 |
# File 'lib/voicevox/wrapper/info.rb', line 18 def id styles[0].id end |
#load ⇒ void
This method returns an undefined value.
キャラクターのスタイルを全てロードします。
36 37 38 39 |
# File 'lib/voicevox/wrapper/info.rb', line 36 def load Voicevox.initialize_required styles.map(&:load) end |
#loaded? ⇒ Boolean
キャラクターのスタイルが全てロードされているかを返します。
27 28 29 |
# File 'lib/voicevox/wrapper/info.rb', line 27 def loaded? styles.map(&:loaded?).all? end |