name: persian-tts on: push: branches: [persian-tts] paths: ["tts/job.txt"] workflow_dispatch: permissions: contents: write jobs: tts: runs-on: ubuntu-latest timeout-minutes: 90 strategy: matrix: seed: [21, 22, 23] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: { python-version: "3.11" } - name: Install run: | git clone --depth 1 https://github.com/resemble-ai/chatterbox.git /tmp/chatterbox pip install -q torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu pip install -q -e /tmp/chatterbox pip install -q huggingface_hub safetensors soundfile librosa phonemizer sudo apt-get install -y -q espeak-ng > /dev/null - name: Synthesize run: python tts/run3.py ${{ matrix.seed }} 2>&1 | tee tts/log_${{ matrix.seed }}.txt continue-on-error: true - name: Save results if: always() run: | git config user.name "persian-tts-bot" git config user.email "persian-tts-bot@users.noreply.github.com" git add -A tts git commit -m "TTS output for $(cat tts/job.txt | head -c 40)" || true for k in 1 2 3 4 5; do git pull --rebase -q && git push && break; sleep $((RANDOM % 10 + 3)); done