Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -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/*
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.md"
Expand All @@ -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"
Expand All @@ -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"]
Expand Down
12 changes: 12 additions & 0 deletions rvc/modules/vc/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]))
Expand Down