Skip to content

Clone your own voice on your own computer: speak any text in 60+ languages and dub videos into another language in your voice. Fully local. Early version.

1.0 KB
Raw Blame
from mimvox_engine.dataset import store


def test_reading_parts_keep_their_numbers():
    assert store._advice([], [2, 3], []) == "Part 2, 3 could be better; check the tips and re-record if you can."
    assert store._advice([1], [2], []) == "Re-record part 1: it has problems and is not counted."


def test_a_recording_from_files_is_never_named_by_its_index():
    text = store._advice([], [824053], [824053])
    assert text == "The recording from files could be better; a cleaner file would help."
    assert "824053" not in store._advice([824053], [], [824053])


def test_several_recordings_from_files_are_counted_in_order():
    text = store._advice([], [1500, 900200], [1500, 2000, 900200])
    assert text == "Recording 1, 3 from files could be better; a cleaner file would help."


def test_both_kinds_together():
    text = store._advice([], [4, 824053], [824053])
    assert text == (
        "Part 4 could be better; check the tips and re-record if you can. "
        "The recording from files could be better; a cleaner file would help."
    )