(3.0.1) mypy compliance
Some checks failed
Actions / Build (push) Successful in 18s
Actions / Lint with Ruff & Pylint (push) Failing after 15s
Actions / Build Documentation (push) Successful in 24s

This commit is contained in:
cswimr 2024-11-15 09:51:11 -05:00
parent 18d2c504c7
commit a7113babb7
Signed by: cswimr
GPG key ID: A9C162E867C851FA
7 changed files with 81 additions and 41 deletions

View file

@ -22,8 +22,10 @@ STORMTROOPER = "191c5adc-a092-5eea-b4ff-ce01f66153ae" # TikTok
async def test_fetch_tts() -> None:
"""Test the fetch_tts method"""
voice = api.get_voices(voice_id=ALEXANDER)[0]
tts = await api.fetch_tts(text="Sphinx of black quartz, judge my vow. The quick brown fox jumps over a lazy dog.", voice=voice)
voice = api.get_voices(voice_id=ALEXANDER)
if voice is None:
raise ValueError("Voice not found")
tts = await api.fetch_tts(text="Sphinx of black quartz, judge my vow. The quick brown fox jumps over a lazy dog.", voice=voice[0])
try:
with open(file="test.mp3", mode="wb") as f:
f.write(tts)