FastAPI backend, web UI, CosyVoice3/F5-TTS setup scripts, and handoff docs for GPU PC continuation. Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
428 B
Python
14 lines
428 B
Python
from backend.app.text_preprocess import preprocess_korean, split_sentences
|
|
|
|
|
|
def test_preprocess_numbers():
|
|
out = preprocess_korean("예산은 1,250,000원입니다.")
|
|
assert "원" in out
|
|
assert "1,250,000" not in out
|
|
|
|
|
|
def test_split_sentences():
|
|
chunks = split_sentences("첫 문장입니다. 두 번째 문장입니다.", max_chars=50)
|
|
assert len(chunks) >= 1
|
|
assert all(len(c) <= 50 for c in chunks)
|