Skip to content

Commit

Permalink
Refactor: AivmManifestStyle を AivmManifestSpeakerStyle にリネーム
Browse files Browse the repository at this point in the history
あくまで「話者スタイル」なので、モデル -> 話者 -> スタイル の階層構造であることを明確にしたい
  • Loading branch information
tsukumijima committed Jun 1, 2024
1 parent 93155a2 commit 0614ae3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ class AivmManifestSpeaker(BaseModel):
# 話者のバージョン (SemVer 2.0 準拠 / ex: 1.0.0)
version: Annotated[str, constr(pattern=r'^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$')]
# 話者のスタイル情報 (最低 1 つ以上のスタイルが必要)
styles: list[AivmManifestStyle]
styles: list[AivmManifestSpeakerStyle]

class AivmManifestStyle(BaseModel):
""" AIVM マニフェストのスタイル情報 """
class AivmManifestSpeakerStyle(BaseModel):
""" AIVM マニフェストの話者スタイル情報 """
# スタイルの名前
name: Annotated[str, constr(min_length=1)]
# スタイルのアイコン画像 (Data URL)
Expand Down
4 changes: 2 additions & 2 deletions aivmlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
AivmMetadata,
AivmManifest,
AivmManifestSpeaker,
AivmManifestStyle,
AivmManifestSpeakerStyle,
DEFAULT_AIVM_MANIFEST,
ModelArchitecture,
)
Expand Down Expand Up @@ -87,7 +87,7 @@ def generate_aivm_metadata(
version = '1.0.0',
# style2id の内容を反映
styles = [
AivmManifestStyle(
AivmManifestSpeakerStyle(
name = style_name,
icon = DEFAULT_ICON_DATA_URL,
voice_samples = [],
Expand Down
8 changes: 4 additions & 4 deletions aivmlib/schemas/aivm_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class AivmManifestSpeaker(BaseModel):
# 話者のバージョン (SemVer 2.0 準拠 / ex: 1.0.0)
version: Annotated[str, constr(pattern=r'^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$')]
# 話者のスタイル情報 (最低 1 つ以上のスタイルが必要)
styles: list[AivmManifestStyle]
styles: list[AivmManifestSpeakerStyle]

class AivmManifestStyle(BaseModel):
""" AIVM マニフェストのスタイル情報 """
class AivmManifestSpeakerStyle(BaseModel):
""" AIVM マニフェストの話者スタイル情報 """
# スタイルの名前
name: Annotated[str, constr(min_length=1)]
# スタイルのアイコン画像 (Data URL)
Expand Down Expand Up @@ -102,7 +102,7 @@ class AivmManifestVoiceSample(BaseModel):
local_id = 0,
version = '1.0.0',
styles = [
AivmManifestStyle(
AivmManifestSpeakerStyle(
name = 'ノーマル',
icon = DEFAULT_ICON_DATA_URL,
voice_samples = [],
Expand Down

0 comments on commit 0614ae3

Please sign in to comment.