(3.0.1) mypy compliance
This commit is contained in:
parent
18d2c504c7
commit
a7113babb7
7 changed files with 81 additions and 41 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue