File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -252,15 +252,15 @@ async def combine_voices(self, voices: List[str]) -> str:
252252 if not isinstance (e , (ValueError , RuntimeError )):
253253 raise RuntimeError (f"Error combining voices: { str (e )} " )
254254 raise
255-
255+
256256 async def list_voices (self ) -> List [str ]:
257257 """List all available voices"""
258258 voices = []
259259 try :
260- async with aiofiles .scandir (TTSModel .VOICES_DIR ) as it :
261- async for entry in it :
262- if entry .name .endswith (".pt" ):
263- voices .append (entry .name [:- 3 ]) # Remove .pt extension
260+ it = await aiofiles .os . scandir (TTSModel .VOICES_DIR )
261+ for entry in it :
262+ if entry .name .endswith (".pt" ):
263+ voices .append (entry .name [:- 3 ]) # Remove .pt extension
264264 except Exception as e :
265265 logger .error (f"Error listing voices: { str (e )} " )
266266 return sorted (voices )
You can’t perform that action at this time.
0 commit comments