Skip to content

Commit

Permalink
feat: implemented is_interrogative in Phoneme
Browse files Browse the repository at this point in the history
疑問系の文章に対して発音を変えるために、音素が質問かどうか判定する関数を追加した

refs #222
  • Loading branch information
qwerty2501 committed Dec 10, 2021
1 parent 5fe249e commit 9cdcdf0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions voicevox_engine/full_context_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ def is_pause(self):
"""
return self.contexts["f1"] == "xx"

def is_interrogative(self):
"""
音素が質問(interrogative)であるかを返す
Returns
-------
is_interrogative: bool
音素が質問(interrogative)であるか(True)否か(False)
"""
return self.contexts["f3"] == "1"

def __repr__(self):
return f"<Phoneme phoneme='{self.phoneme}'>"

Expand Down

0 comments on commit 9cdcdf0

Please sign in to comment.