-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: ローカルの util 関数を解体 * refactor: `_gen_mora()` を util へ切り出して `gen_mora()` へリネーム * fix: lint
- Loading branch information
Showing
3 changed files
with
88 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""合成系テスト向けの utility""" | ||
|
||
from voicevox_engine.tts_pipeline.model import Mora | ||
|
||
|
||
def gen_mora( | ||
text: str, | ||
consonant: str | None, | ||
consonant_length: float | None, | ||
vowel: str, | ||
vowel_length: float, | ||
pitch: float, | ||
) -> Mora: | ||
"""Generate Mora with positional arguments for test simplicity.""" | ||
return Mora( | ||
text=text, | ||
consonant=consonant, | ||
consonant_length=consonant_length, | ||
vowel=vowel, | ||
vowel_length=vowel_length, | ||
pitch=pitch, | ||
) |