diff --git a/docs/DF_USAGE.md b/docs/DF_USAGE.md new file mode 100644 index 00000000..2b55572c --- /dev/null +++ b/docs/DF_USAGE.md @@ -0,0 +1,37 @@ +# OpenVoice Docker Setup + +This Dockerfile provides a convenient way to set up an environment for running OpenVoice, a project by MyShell AI, on an Ubuntu base image. OpenVoice is a tool for voice manipulation and conversion. + +## Prerequisites + +Before you can use this Docker image, you need to have Docker installed on your system. + +### Installing Docker + +Follow the instructions on the [official Docker website](https://docs.docker.com/get-docker/) to install Docker for your operating system. + +## Usage +To build the Docker image, use the following command: + +``` +bash +docker build -t myshell-openvoice . +``` + +## Running OpenVoice +To run OpenVoice with the Docker image, you can use the following example command: + +``` +bash +docker run -it -p 7860:7860 myshell-openvoice +``` + +Now you have a Docker container ready to run the OpenVoice application. Access the OpenVoice application at http://localhost:7860 in your web browser. + + +## References +- [OpenVoice MyShell GitHub Repository](https://github.com/myshell-ai/OpenVoice) + +- [Docker Official Website](https://docs.docker.com/get-docker/) + +Feel free to explore and adapt this Docker image based on your specific use case and requirements. For more details on OpenAI Whisper and its usage, refer to the official documentation. \ No newline at end of file diff --git a/docs/DockerFile b/docs/DockerFile new file mode 100644 index 00000000..da30b4af --- /dev/null +++ b/docs/DockerFile @@ -0,0 +1,43 @@ +# Use the base image of Ubuntu +FROM ubuntu:latest + +# Update the system and install necessary dependencies +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + sudo \ + python3.9 \ + python3-distutils \ + python3-pip \ + ffmpeg \ + git + +# Update pip +RUN pip install --upgrade pip + +# Set the working directory in the container +WORKDIR /app + +# Install openai-whisper +RUN git clone https://github.com/myshell-ai/OpenVoice openvoice + +RUN pip install gradio==3.50.2 langid faster-whisper whisper-timestamped unidecode eng-to-ipa pypinyin cn2an + +# Set the working directory in the container +WORKDIR /app/openvoice + +RUN pip install -e . +RUN pip install soundfile librosa inflect jieba silero + +RUN apt -y install -qq aria2 unzip +RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/OpenVoice/resolve/main/checkpoints_1226.zip -d /app/openvoice -o checkpoints_1226.zip +RUN unzip /app/openvoice/checkpoints_1226.zip +RUN mv /app/openvoice/checkpoints /app/openvoice/openvoice/checkpoints +RUN mv /app/openvoice/resources /app/openvoice/openvoice/resources + +EXPOSE 7860 + +RUN sed -i "s/demo.launch(debug=True, show_api=True, share=args.share)/demo.launch(server_name='0.0.0.0', debug=True, show_api=True, share=args.share)/" /app/openvoice/openvoice/openvoice_app.py + +WORKDIR /app/openvoice/openvoice + +# Default command when the container is started +CMD ["python3", "-m", "openvoice_app" ,"--share"] diff --git a/docs/USAGE.md b/docs/USAGE.md index 9de4427e..9cb5ef45 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -4,8 +4,11 @@ - [Quick Use](#quick-use): directly use OpenVoice without installation. - [Linux Install](#linux-install): for researchers and developers only. - - [V1](#openvoice-v1) - - [V2](#openvoice-v2) +- [Common Installation Steps (V1 and V2)](#common-installation-steps-v1-and-v2): Installation steps applicable to both OpenVoice V1 and V2. +- [OpenVoice V1](#openvoice-v1): Installation and usage instructions for OpenVoice V1. +- [OpenVoice V2](#openvoice-v2): Installation and usage instructions for OpenVoice V2. +- [Windows Install (VS Code)](#windows-install-vs-code): Installation instructions for Windows users. + ## Quick Use @@ -21,6 +24,8 @@ For most users, the most convenient way is to directly use the free TTS and Inst - [Japanese](https://app.myshell.ai/widget/IfIB3u) - [Korean](https://app.myshell.ai/widget/q6ZjIn) +OpenVoice supports any language as long as you have a base speaker in that language. The OpenVoice team already did the most difficult part (tone color converter training) for you. Base speaker TTS model is relatively easy to train, and multiple existing open-source repositories support it. If you don't want to train by yourself, simply use the OpenAI TTS model as the base speaker. + ## Minimal Demo For users who want to quickly try OpenVoice and do not require high quality or stability, click any of the following links: @@ -33,18 +38,35 @@ For users who want to quickly try OpenVoice and do not require high quality or s ## Linux Install -This section is only for developers and researchers who are familiar with Linux, Python and PyTorch. Clone this repo, and run +This section is only for developers and researchers who are familiar with Linux, Python, and PyTorch. -``` -conda create -n openvoice python=3.9 -conda activate openvoice -git clone git@github.com:myshell-ai/OpenVoice.git -cd OpenVoice -pip install -e . -``` +### Common Installation Steps (V1 and V2) No matter if you are using V1 or V2, the above installation is the same. +**1. Clone the Repository:** + ``` + bash + git clone git@github.com:myshell-ai/OpenVoice.git + cd OpenVoice + ``` + +**2. Create a Python Environment:** + ``` + conda create -n openvoice python=3.9 + conda activate openvoice + ``` + +**3. Install OpenVoice:** + ``` + pip install -e . + ``` + +**3. Next Step:** + Depending on the version you are using follow the next steps: +- [OpenVoice V1](#openvoice-v1): Installation and usage instructions for OpenVoice V1. +- [OpenVoice V2](#openvoice-v2): Installation and usage instructions for OpenVoice V2. + ### OpenVoice V1 Download the checkpoint from [here](https://myshell-public-repo-hosting.s3.amazonaws.com/openvoice/checkpoints_1226.zip) and extract it to the `checkpoints` folder. @@ -73,3 +95,6 @@ python -m unidic download ## Windows Install (VS Code) Please use [this guide](https://github.com/Alienpups/OpenVoice/blob/main/docs/USAGE_WINDOWS.md) if you want to install and use OpenVoice on Windows. + + +