Skip to content

Commit

Permalink
fix: async warning
Browse files Browse the repository at this point in the history
  • Loading branch information
p0n1 committed Jun 28, 2024
1 parent 919202d commit c11d9a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions audiobook_generator/tts_providers/edge_tts_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ def __init__(self, config: GeneralConfig):
def __str__(self) -> str:
return f"{self.config}"

async def validate_config(self):
if self.config.voice_name not in await get_supported_voices():
def validate_config(self):
supported_voices = asyncio.run(get_supported_voices())
# logger.debug(f"Supported voices: {supported_voices}")
if self.config.voice_name not in supported_voices:
raise ValueError(
f"EdgeTTS: Unsupported voice name: {self.config.voice_name}"
)
Expand Down

0 comments on commit c11d9a3

Please sign in to comment.