mirror of https://github.com/coqui-ai/TTS.git
remove workflows, modify demo
This commit is contained in:
parent
323df903d5
commit
a8c86efea9
|
@ -1,94 +0,0 @@
|
|||
name: Publish Python 🐍 distributions 📦 to PyPI
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
defaults:
|
||||
run:
|
||||
shell:
|
||||
bash
|
||||
jobs:
|
||||
build-sdist:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Verify tag matches version
|
||||
run: |
|
||||
set -ex
|
||||
version=$(cat TTS/VERSION)
|
||||
tag="${GITHUB_REF/refs\/tags\/}"
|
||||
if [[ "v$version" != "$tag" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- run: |
|
||||
python -m pip install -U pip setuptools wheel build
|
||||
- run: |
|
||||
python -m build
|
||||
- run: |
|
||||
pip install dist/*.tar.gz
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: sdist
|
||||
path: dist/*.tar.gz
|
||||
build-wheels:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10", "3.11"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install pip requirements
|
||||
run: |
|
||||
python -m pip install -U pip setuptools wheel build
|
||||
python -m pip install -r requirements.txt
|
||||
- name: Setup and install manylinux1_x86_64 wheel
|
||||
run: |
|
||||
python setup.py bdist_wheel --plat-name=manylinux1_x86_64
|
||||
python -m pip install dist/*-manylinux*.whl
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheel-${{ matrix.python-version }}
|
||||
path: dist/*-manylinux*.whl
|
||||
publish-artifacts:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [build-sdist, build-wheels]
|
||||
steps:
|
||||
- run: |
|
||||
mkdir dist
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: "sdist"
|
||||
path: "dist/"
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: "wheel-3.9"
|
||||
path: "dist/"
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: "wheel-3.10"
|
||||
path: "dist/"
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: "wheel-3.11"
|
||||
path: "dist/"
|
||||
- run: |
|
||||
ls -lh dist/
|
||||
- name: Setup PyPI config
|
||||
run: |
|
||||
cat << EOF > ~/.pypirc
|
||||
[pypi]
|
||||
username=__token__
|
||||
password=${{ secrets.PYPI_TOKEN }}
|
||||
EOF
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- run: |
|
||||
python -m pip install twine
|
||||
- run: |
|
||||
twine upload --repository pypi dist/*
|
|
@ -1,46 +0,0 @@
|
|||
name: style-check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
jobs:
|
||||
check_skip:
|
||||
runs-on: ubuntu-latest
|
||||
if: "! contains(github.event.head_commit.message, '[ci skip]')"
|
||||
steps:
|
||||
- run: echo "${{ github.event.head_commit.message }}"
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.9]
|
||||
experimental: [false]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
architecture: x64
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements*'
|
||||
- name: check OS
|
||||
run: cat /etc/os-release
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git make gcc
|
||||
make system-deps
|
||||
- name: Install/upgrade Python setup deps
|
||||
run: python3 -m pip install --upgrade pip setuptools wheel
|
||||
- name: Install TTS
|
||||
run: |
|
||||
python3 -m pip install .[all]
|
||||
python3 setup.py egg_info
|
||||
- name: Style check
|
||||
run: make style
|
|
@ -1,9 +1,9 @@
|
|||
FROM python:3.10
|
||||
|
||||
RUN mkdir /code
|
||||
RUN mkdir -p /code/test
|
||||
WORKDIR /code
|
||||
COPY demo.py test/default_speaker.json /code/
|
||||
RUN mkdir /code/test/
|
||||
COPY test/ /code/test/
|
||||
RUN apt-get -y update && apt-get -y install ffmpeg
|
||||
RUN pip install gradio requests
|
||||
CMD ["python", "demo.py"]
|
||||
|
|
|
@ -6,7 +6,7 @@ import json
|
|||
import os
|
||||
|
||||
|
||||
SERVER_URL = 'https://bazsyqz5jc4up9-8888.proxy.runpod.net:443'
|
||||
SERVER_URL = os.environ.get("TTS_API_ENDPOINT", 'http://localhost:8888')
|
||||
OUTPUT = "./demo_outputs"
|
||||
cloned_speakers = {}
|
||||
|
||||
|
@ -40,7 +40,7 @@ def clone_speaker(upload_file, clone_speaker_name, cloned_speaker_names):
|
|||
json.dump(embeddings, fp)
|
||||
cloned_speakers[clone_speaker_name] = embeddings
|
||||
cloned_speaker_names.append(clone_speaker_name)
|
||||
return upload_file, clone_speaker_name, cloned_speaker_names, gr.Dropdown.update(choices=cloned_speaker_names)
|
||||
return upload_file, clone_speaker_name, cloned_speaker_names, gr.Dropdown(choices=cloned_speaker_names)
|
||||
|
||||
def tts(text, speaker_type, speaker_name_studio, speaker_name_custom, lang):
|
||||
embeddings = STUDIO_SPEAKERS[speaker_name_studio] if speaker_type == 'Studio' else cloned_speakers[speaker_name_custom]
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=A xTTS speech synthesis server
|
||||
|
||||
[Service]
|
||||
User=ubuntu
|
||||
WorkingDirectory=/home/ubuntu/xtts-streaming-server/server
|
||||
ExecStart=/home/ubuntu/TTS/.venv/bin/python /home/ubuntu/TTS/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 8888
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue