Merge pull request #166 from TashaSkyUp/fix_165

Fix for 165 Bug: Piper TTS Service Fails on Windows due to Non-Cross Platform Code
pull/173/head
Ty Fiero 10 months ago committed by GitHub
commit f5f227488c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4,6 +4,8 @@ import os
import subprocess
import urllib.request
import tarfile
import platform
class Tts:
def __init__(self, config):
@ -34,8 +36,8 @@ class Tts:
os.makedirs(PIPER_FOLDER_PATH, exist_ok=True)
# Determine OS and architecture
OS = os.uname().sysname
ARCH = os.uname().machine
OS = platform.system()
ARCH = platform.machine()
if OS == "Darwin":
OS = "macos"
if ARCH == "arm64":
@ -45,6 +47,12 @@ class Tts:
else:
print("Piper: unsupported architecture")
return
elif OS == "Windows":
if ARCH == "AMD64":
ARCH = "x64"
else:
print("Piper: unsupported architecture")
return
PIPER_ASSETNAME = f"piper_{OS}_{ARCH}.tar.gz"
PIPER_URL = "https://github.com/rhasspy/piper/releases/latest/download/"

Loading…
Cancel
Save