|
|
@ -36,9 +36,9 @@ class Tts:
|
|
|
|
os.makedirs(PIPER_FOLDER_PATH, exist_ok=True)
|
|
|
|
os.makedirs(PIPER_FOLDER_PATH, exist_ok=True)
|
|
|
|
|
|
|
|
|
|
|
|
# Determine OS and architecture
|
|
|
|
# Determine OS and architecture
|
|
|
|
OS = platform.system()
|
|
|
|
OS = platform.system().lower()
|
|
|
|
ARCH = platform.machine()
|
|
|
|
ARCH = platform.machine()
|
|
|
|
if OS == "Darwin":
|
|
|
|
if OS == "darwin":
|
|
|
|
OS = "macos"
|
|
|
|
OS = "macos"
|
|
|
|
if ARCH == "arm64":
|
|
|
|
if ARCH == "arm64":
|
|
|
|
ARCH = "aarch64"
|
|
|
|
ARCH = "aarch64"
|
|
|
@ -47,7 +47,7 @@ class Tts:
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
print("Piper: unsupported architecture")
|
|
|
|
print("Piper: unsupported architecture")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
elif OS == "Windows":
|
|
|
|
elif OS == "windows":
|
|
|
|
if ARCH == "AMD64":
|
|
|
|
if ARCH == "AMD64":
|
|
|
|
ARCH = "amd64"
|
|
|
|
ARCH = "amd64"
|
|
|
|
else:
|
|
|
|
else:
|
|
|
@ -58,7 +58,9 @@ class Tts:
|
|
|
|
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}"
|
|
|
|
asset_url = f"{PIPER_URL}{PIPER_ASSETNAME}"
|
|
|
|
if OS == "Windows":
|
|
|
|
|
|
|
|
|
|
|
|
if OS == "windows":
|
|
|
|
|
|
|
|
|
|
|
|
asset_url = asset_url.replace(".tar.gz", ".zip")
|
|
|
|
asset_url = asset_url.replace(".tar.gz", ".zip")
|
|
|
|
|
|
|
|
|
|
|
|
# Download and extract Piper
|
|
|
|
# Download and extract Piper
|
|
|
|