File size: 345 Bytes
9ddc3f7
 
 
2ffc7e7
9ddc3f7
6449e88
9ddc3f7
 
 
6449e88
2ffc7e7
1
2
3
4
5
6
7
8
9
10
11
12
from ukrainian_tts.tts import TTS, Voices, Stress
from io import BytesIO


def test_tts():
    tts = TTS()
    file = BytesIO()
    _, text = tts.tts("Привіт", Voices.Dmytro.value, Stress.Dictionary.value, file)
    file.seek(0)
    assert text == "прив+іт"
    assert file.getbuffer().nbytes > 1000  # check that file was generated