File size: 359 Bytes
9ddc3f7
 
 
2ffc7e7
9ddc3f7
 
 
 
 
 
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(use_cuda=False)
    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