diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml new file mode 100644 index 0000000..bd1ebf4 --- /dev/null +++ b/.github/workflows/build_wheel.yml @@ -0,0 +1,67 @@ +name: Build wheel + +on: + workflow_dispatch: + create: + tags: + - v* + +jobs: + build: + permissions: write-all + strategy: + max-parallel: 4 + matrix: + platform: [ubuntu-latest] + python-version: ["3.10"] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install old pip + run: python -m pip install --upgrade pip==23.3.2 + - name: Install Deps + run: python -m pip install . torch==2.3.1 wheel ninja build + - name: Build the wheel + run: python -m build --wheel --outdir dist/ + - run: du -h dist/* + - uses: actions/upload-artifact@v4 + with: + path: dist/*.whl + + - name: Log Built Wheels + run: | + ls dist + + - name: Set wheel name + run: echo "wheel_name=$(basename dist/*.whl)" >> $GITHUB_ENV + + - name: Get the tag version + id: extract_branch + run: echo ::set-output name=branch::${GITHUB_REF#refs/tags/} + + - name: Get Release with tag + id: get_current_release + uses: joutvhu/get-release@v1 + with: + tag_name: ${{ steps.extract_branch.outputs.branch }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Release Asset + id: upload_release_asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_current_release.outputs.upload_url }} + asset_path: ./dist/${{env.wheel_name}} + asset_name: ${{env.wheel_name}} + asset_content_type: application/* \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fdc1164..a41117b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rvc" -version = "0.3.5" +version = "0.3.6" description = "An easy-to-use Voice Conversion framework based on VITS." authors = ["Ftps "] readme = "README.md" @@ -10,8 +10,8 @@ github = "https://github.com/RVC-Project/Retrieval-based-Voice-Conversion" [tool.poetry.dependencies] python = "^3.10" -torch = "^2.1.0" -fairseq = "^0.12.2" +torch = ">=2.1.0" +fairseq = ">=0.12.2" # fairseq = {git = "https://github.com/Tps-F/fairseq.git", branch="main"} soundfile = "^0.12.1" librosa = "^0.10.1" @@ -27,8 +27,8 @@ tensorboardx = "^2.6.2.2" poethepoet = "^0.24.4" uvicorn = "^0.26.0" fastapi = "^0.109.0" -python-multipart = "^0.0.6" -numba = "0.59.0rc1" +python-multipart = ">=0.0.6" +numba = ">=0.59.0" [tool.poetry.extras] api = ["uvicorn", "fastapi"] diff --git a/rvc/modules/vc/pipeline.py b/rvc/modules/vc/pipeline.py index f859b6f..e815a67 100644 --- a/rvc/modules/vc/pipeline.py +++ b/rvc/modules/vc/pipeline.py @@ -153,6 +153,18 @@ def get_f0( del self.model_rmvpe.model del self.model_rmvpe logger.info("Cleaning ortruntime memory") + elif f0_method == "fcpe": + if not hasattr(self, "model_fcpe"): + from torchfcpe import spawn_bundled_infer_model + + logger.info("Loading fcpe model") + self.model_fcpe = spawn_bundled_infer_model(self.device) + f0 = self.model_fcpe.infer( + torch.from_numpy(x).to(self.device).unsqueeze(0).float(), + sr=16000, + decoder_mode="local_argmax", + threshold=0.006, + ).squeeze().cpu().numpy() f0 *= pow(2, f0_up_key / 12) # with open("test.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()]))