Spaces:
Runtime error
Runtime error
import os | |
import sys | |
import click | |
from click_help_colors import HelpColorsGroup | |
from dotenv import load_dotenv | |
from sh import aws | |
load_dotenv() | |
def main() -> None: | |
"""TTS Service CLI""" | |
def serve(share: bool) -> None: | |
"""Start the TTS Service""" | |
from tts_service.app import app | |
app.launch(share=share) | |
def service() -> None: | |
"""Manages the deployed service.""" | |
def upload_voices(bucket: str, prefix: str, delete: bool, dry_run: bool, directory: str) -> None: | |
"""Upload voices to the service""" | |
args = [directory, f"s3://{bucket}/{prefix}/"] | |
if delete: | |
args.insert(0, "--delete") | |
if dry_run: | |
args.insert(0, "--dryrun") | |
aws.s3.sync(*args, _out=sys.stdout, _err=sys.stderr) | |
if __name__ == "__main__": | |
main() | |