glue/tests/test_TextToSpeech.py

9 строки
370 B
Python
Исходник Обычный вид История

2021-11-02 16:17:12 +03:00
import TextToSpeech as tts
import pandas as pd
import os
def test_tts_main():
df = tts.generate_tts(pd.DataFrame({'text': ['This is a test', 'And this is another test!']}), "output/test")
assert list(df) == ['text', 'audio_synth', 'text_ssml']
for index, row in df.iterrows():
assert os.path.isfile(f"output/test/tts_telephone/{row['audio_synth']}")