Skip to content

Commit

Permalink
音量更新API関連テストの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Apr 28, 2024
1 parent 9923795 commit 1359299
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions test/tts_pipeline/test_tts_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,26 @@ def test_mocked_synthesize_wave_output(snapshot_json: SnapshotAssertion) -> None
assert snapshot_json == round_floats(result.tolist(), round_value=2)


def test_mocked_create_sing_volume_from_phoneme_and_f0_output(
snapshot_json: SnapshotAssertion,
) -> None:
"""
モックされた `TTSEngine.create_sing_phoneme_and_f0_and_volume()` の出力スナップショットが一定である
"""
# Inputs
tts_engine = TTSEngine(MockCoreWrapper())
doremi_srore = _gen_doremi_score()
phonemes, f0s, _ = tts_engine.create_sing_phoneme_and_f0_and_volume(
doremi_srore, StyleId(1)
)
# Outputs
result_volume = tts_engine.create_sing_volume_from_phoneme_and_f0(
doremi_srore, phonemes, f0s, StyleId(1)
)
# Tests
assert snapshot_json == round_floats(result_volume, round_value=2)


def test_mocked_synthesize_wave_from_score_output(
snapshot_json: SnapshotAssertion,
) -> None:
Expand Down

0 comments on commit 1359299

Please sign in to comment.