Skip to content

Commit

Permalink
整理: SpeakerSupportPermittedSynthesisMorphing Enum の ._missing_()
Browse files Browse the repository at this point in the history
…を廃止 (#1412)

refactor: `SpeakerSupportPermittedSynthesisMorphing` のデフォルト値を廃止
  • Loading branch information
tarepan committed Jun 20, 2024
1 parent 215997f commit 3f2685c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions voicevox_engine/metas/Metas.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class SpeakerSupportPermittedSynthesisMorphing(str, Enum):
SELF_ONLY = "SELF_ONLY" # 同じ話者内でのみ許可
NOTHING = "NOTHING" # 全て禁止

@classmethod
def _missing_(cls, value: object) -> "SpeakerSupportPermittedSynthesisMorphing":
return SpeakerSupportPermittedSynthesisMorphing.ALL


class SpeakerSupportedFeatures(BaseModel):
"""
Expand All @@ -48,7 +44,7 @@ class SpeakerSupportedFeatures(BaseModel):

permitted_synthesis_morphing: SpeakerSupportPermittedSynthesisMorphing = Field(
title="モーフィング機能への対応",
default=SpeakerSupportPermittedSynthesisMorphing(None),
default=SpeakerSupportPermittedSynthesisMorphing.ALL,
)


Expand Down

0 comments on commit 3f2685c

Please sign in to comment.