diff --git a/test/tts_pipeline/__snapshots__/test_tts_engine/test_mocked_create_sing_volume_from_phoneme_and_f0_output.json b/test/tts_pipeline/__snapshots__/test_tts_engine/test_mocked_create_sing_volume_from_phoneme_and_f0_output.json new file mode 100644 index 000000000..cc38d7b9c --- /dev/null +++ b/test/tts_pipeline/__snapshots__/test_tts_engine/test_mocked_create_sing_volume_from_phoneme_and_f0_output.json @@ -0,0 +1,106 @@ +[ + 0.0, + 0.0, + 0.0, + 0.0, + 0.61, + 0.61, + 0.61, + 0.61, + 0.61, + 0.61, + 1.53, + 1.53, + 1.53, + 1.53, + 1.96, + 1.96, + 1.96, + 1.96, + 1.96, + 1.96, + 1.96, + 1.96, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 0.83, + 1.79, + 1.79, + 1.79, + 1.79, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 1.44, + 0.0, + 0.0, + 0.0, + 1.11, + 1.11, + 0.51, + 0.51, + 0.51, + 0.51, + 0.51, + 0.51, + 3.0, + 3.0, + 3.0, + 3.0, + 3.0, + 3.0, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 2.57, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 +] diff --git a/test/tts_pipeline/test_tts_engine.py b/test/tts_pipeline/test_tts_engine.py index 57598155b..6c5ae49e7 100644 --- a/test/tts_pipeline/test_tts_engine.py +++ b/test/tts_pipeline/test_tts_engine.py @@ -381,6 +381,27 @@ 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()` の出力スナップショットが一定である + NOTE: 入力生成の簡略化に別関数を呼び出すため、別関数が正しく動作しない場合テストが落ちる + """ + # 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 = tts_engine.create_sing_volume_from_phoneme_and_f0( + doremi_srore, phonemes, f0s, StyleId(1) + ) + # Tests + assert snapshot_json == round_floats(result, round_value=2) + + def test_mocked_synthesize_wave_from_score_output( snapshot_json: SnapshotAssertion, ) -> None: