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.
Rust chatterboxdesktopdubbingmobilemultilingualofflineomnivoicerustrvcspeech-synthesisspeech-to-textstttext-to-speechttsvoice-cloningvoxcpm2whisper
import importlib.util
from pathlib import Path
import pytest
_path = Path(__file__).resolve().parents[1] / "src" / "mimvox_engine" / "backends" / "omnivoice_text.py"
_spec = importlib.util.spec_from_file_location("omnivoice_text_under_test", _path)
text = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(text)
@pytest.mark.parametrize(
("raw", "lang", "spoken"),
[
("8–15 people", "en", "8 to 15 people"),
("8 — 15", "en", "8 to 15"),
("8–15 людей", "uk", "від 8 до 15 людей"),
("8–15 Personen", "de", "8 bis 15 Personen"),
("8–15", "ja", "8–15"),
("2024-11-29", "en", "2024-11-29"),
],
)
def test_a_range_of_numbers_is_read_as_a_range(raw, lang, spoken):
assert text._ranges(raw, lang) == spoken
@pytest.mark.skipif(text._n2w is None, reason="num2words is not installed")
def test_spelled_numbers_have_no_commas():
assert text.normalize("at 8,850 metres, 8–15 people", "en") == (
"at eight thousand eight hundred and fifty metres, eight to fifteen people"
)