fixed: async scandir finding voices

This commit is contained in:
remsky 2025-01-07 21:36:07 -07:00
parent 89bec47b0b
commit e7ffcf49f5

View file

@ -257,8 +257,8 @@ class TTSService:
"""List all available voices"""
voices = []
try:
async with aiofiles.scandir(TTSModel.VOICES_DIR) as it:
async for entry in it:
it = await aiofiles.os.scandir(TTSModel.VOICES_DIR)
for entry in it:
if entry.name.endswith(".pt"):
voices.append(entry.name[:-3]) # Remove .pt extension
except Exception as e: