Fix UnboundLocalError for asset_url on Piper install (macOS)

pull/175/head
Davy Peter Braun 10 months ago
parent 7d1a4d9777
commit b059cbc0e4

@ -57,8 +57,10 @@ class Tts:
PIPER_ASSETNAME = f"piper_{OS}_{ARCH}.tar.gz" PIPER_ASSETNAME = f"piper_{OS}_{ARCH}.tar.gz"
PIPER_URL = "https://github.com/rhasspy/piper/releases/latest/download/" PIPER_URL = "https://github.com/rhasspy/piper/releases/latest/download/"
asset_url = f"{PIPER_URL}{PIPER_ASSETNAME}"
if OS == "windows": if OS == "windows":
asset_url = f"{PIPER_URL}{PIPER_ASSETNAME}".replace(".tar.gz", ".zip") asset_url = asset_url.replace(".tar.gz", ".zip")
# Download and extract Piper # Download and extract Piper
urllib.request.urlretrieve(asset_url, os.path.join(PIPER_FOLDER_PATH, PIPER_ASSETNAME)) urllib.request.urlretrieve(asset_url, os.path.join(PIPER_FOLDER_PATH, PIPER_ASSETNAME))

Loading…
Cancel
Save