From 7bb857a38415c76ca8372ce5e0cc52323e0a11bd Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Mon, 29 Jan 2024 11:55:33 +0200 Subject: [PATCH] added openvoice container --- .gitignore | 4 +++- doc/packages notes environments.md | 2 ++ tts/openvoice/Dockerfile | 21 +++++++++++++++++++++ tts/openvoice/OpenVoice | 1 + tts/openvoice/compose.yml | 6 ++++++ tts/openvoice/install | 29 +++++++++++++++++++++++++++++ 6 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 doc/packages notes environments.md create mode 100644 tts/openvoice/Dockerfile create mode 160000 tts/openvoice/OpenVoice create mode 100644 tts/openvoice/compose.yml create mode 100644 tts/openvoice/install diff --git a/.gitignore b/.gitignore index 2c73ccf..29b21f7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ rec/* */__pycache__/* __pycache__ agent-py-bot/scrape/raw/summary_log.txt -agent-py-bot/scrape/raw/* \ No newline at end of file +agent-py-bot/scrape/raw/* +.aider* +tts/*.m4a diff --git a/doc/packages notes environments.md b/doc/packages notes environments.md new file mode 100644 index 0000000..4f30ee7 --- /dev/null +++ b/doc/packages notes environments.md @@ -0,0 +1,2 @@ +pip install autogenstudio +autogenstudio ui --8081 \ No newline at end of file diff --git a/tts/openvoice/Dockerfile b/tts/openvoice/Dockerfile new file mode 100644 index 0000000..4770898 --- /dev/null +++ b/tts/openvoice/Dockerfile @@ -0,0 +1,21 @@ +# Use an official Python runtime as a parent image +FROM python:3.8-slim + +# Set the working directory in the container +WORKDIR /app + +# Clone the repository +RUN apt-get update && \ + apt-get install -y git aria2 unzip && \ + git clone -b dev https://github.com/camenduru/OpenVoice /app && \ + aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/OpenVoice/resolve/main/checkpoints_1226.zip -d /app -o checkpoints_1226.zip && \ + unzip /app/checkpoints_1226.zip -d /app + +# Install any needed packages +RUN pip install gradio==3.50.2 langid faster-whisper whisper-timestamped unidecode eng-to-ipa pypinyin cn2an + +# Make port available to the world outside this container +EXPOSE 7860 + +# Run openvoice_app.py when the container launches +CMD ["python", "openvoice_app.py", "--share"] diff --git a/tts/openvoice/OpenVoice b/tts/openvoice/OpenVoice new file mode 160000 index 0000000..e99197f --- /dev/null +++ b/tts/openvoice/OpenVoice @@ -0,0 +1 @@ +Subproject commit e99197fe5ed92167acb39fc50237791b088fe2f7 diff --git a/tts/openvoice/compose.yml b/tts/openvoice/compose.yml new file mode 100644 index 0000000..5fa86f8 --- /dev/null +++ b/tts/openvoice/compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + openvoice: + build: . + ports: + - "7860:7860" diff --git a/tts/openvoice/install b/tts/openvoice/install new file mode 100644 index 0000000..905e693 --- /dev/null +++ b/tts/openvoice/install @@ -0,0 +1,29 @@ +# experimental +conda create -n openvoice python=3.9 +conda activate openvoice +conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia +pip install -r requirements.txt +# git clone https://github.com/myshell-ai/OpenVoice.git +!git clone -b dev https://github.com/camenduru/OpenVoice +%cd /content/OpenVoice + +!apt -y install -qq aria2 +!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/OpenVoice/resolve/main/checkpoints_1226.zip -d /content -o checkpoints_1226.zip +!unzip /content/checkpoints_1226.zip + +!pip install -q gradio==3.50.2 langid faster-whisper whisper-timestamped unidecode eng-to-ipa pypinyin cn2an + +!python openvoice_app.py --share + +# colab: +%cd /content +!git clone -b dev https://github.com/camenduru/OpenVoice +%cd /content/OpenVoice + +!apt -y install -qq aria2 +!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/OpenVoice/resolve/main/checkpoints_1226.zip -d /content -o checkpoints_1226.zip +!unzip /content/checkpoints_1226.zip + +!pip install -q gradio==3.50.2 langid faster-whisper whisper-timestamped unidecode eng-to-ipa pypinyin cn2an + +!python openvoice_app.py --share \ No newline at end of file