Skip to content

Commit

Permalink
remove workflows, modify demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lazzarello committed Jan 6, 2024
1 parent 323df90 commit a8c86ef
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 144 deletions.
94 changes: 0 additions & 94 deletions .github/workflows/pypi-release.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/style_check.yml

This file was deleted.

4 changes: 2 additions & 2 deletions fastapi-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions fastapi-server/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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 = {}

Expand Down Expand Up @@ -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]
Expand Down
11 changes: 11 additions & 0 deletions fastapi-server/xtts-server.service
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a8c86ef

Please sign in to comment.