Update test_cli.yml #708
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CLI Scripts Test with Profiling | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| rvc_cli: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade pip for Python <3.11 | |
| if: ${{ matrix.python-version == '3.10' }} | |
| run: | | |
| python -m pip install --upgrade "pip<=24.0" | |
| - name: Install ffmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| - name: Install dependencies | |
| run: | | |
| pip install py-spy | |
| pip install --no-cache-dir -r requirements.txt | |
| - name: Install RVC models | |
| run: | | |
| python3 -m rvc.modules.model_manager "https://huggingface.co/Politrees/Victor_Tsoi/resolve/main/Victor_Tsoi.zip?download=true" "Tsoi" | |
| - name: Set up test audio | |
| run: | | |
| mkdir -p audio | |
| wget https://huggingface.co/Politrees/audio_for_test/resolve/main/BritishEnglishUKTest5.mp3 -O audio/test.mp3 | |
| - name: Run rvc script with profiling | |
| run: | | |
| python3 -m rvc.infer.infer_cli rvc --input_path "audio/test.mp3" --rvc_model "Tsoi" --f0_method "rmvpe" --f0_min 1 --f0_max 1100 --hop_length 32 --rvc_pitch -6 --protect 0.5 --index_rate 0 --volume_envelope 1 --output_format "mp3" & | |
| PID=$! | |
| py-spy top --pid $PID --duration 10 | |
| tts_cli: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade pip for Python <3.11 | |
| if: ${{ matrix.python-version == '3.10' }} | |
| run: | | |
| python -m pip install --upgrade "pip<=24.0" | |
| - name: Install ffmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| - name: Install dependencies | |
| run: | | |
| pip install py-spy | |
| pip install --no-cache-dir -r requirements.txt | |
| - name: Install RVC models | |
| run: | | |
| python3 -m rvc.modules.model_manager "https://huggingface.co/Politrees/Victor_Tsoi/resolve/main/Victor_Tsoi.zip?download=true" "Tsoi" | |
| - name: Run tts script with profiling | |
| run: | | |
| python3 -m rvc.infer.infer_cli tts --tts_voice "en-US-GuyNeural" --tts_text "e" --tts_rate 0 --tts_volume 0 --tts_pitch 0 --rvc_model "Tsoi" --f0_method "rmvpe" --f0_min 1 --f0_max 1100 --hop_length 32 --rvc_pitch -6 --protect 0.5 --index_rate 0 --volume_envelope 1 --output_format "mp3" & | |
| PID=$! | |
| py-spy top --pid $PID --duration 10 |