diff --git a/.ruff.toml b/.ruff.toml index 7a8331a..cccd6ed 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,6 +1,6 @@ # The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml -target-version = "py310" +target-version = "py39" select = [ "B007", # Loop control variable {name} not used within loop body diff --git a/wyoming-microsoft-tts/download.py b/wyoming-microsoft-tts/download.py index 236e65c..f9c4971 100755 --- a/wyoming-microsoft-tts/download.py +++ b/wyoming-microsoft-tts/download.py @@ -2,7 +2,7 @@ import json import logging from pathlib import Path -from typing import Any +from typing import Any, Union from urllib.parse import quote, urlsplit, urlunsplit from urllib.request import Request, urlopen @@ -57,7 +57,7 @@ def transform_voices_files(response): def get_voices( - download_dir: str | Path, + download_dir: Union[str, Path], update_voices: bool = False, region: str = "westus", key: str = "", @@ -94,7 +94,7 @@ def get_voices( return json.load(voices_file) -def find_voice(name: str, download_dir: str | Path) -> dict[str, Any]: +def find_voice(name: str, download_dir: Union[str, Path]) -> dict[str, Any]: """Look for the files for a voice. Returns: Dict of voice info