Add KittenTTS support and ONNX parity fixes #1182
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: Tests and Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| # Style checks run once | |
| style: | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Run pre-commit | |
| run: | | |
| python -m pip install pre-commit | |
| pre-commit run --all | |
| if ! git diff --quiet; then | |
| echo 'Style checks failed. Run: pre-commit run --all-files' | |
| exit 1 | |
| fi | |
| # Core tests (DSP, utils) | |
| core: | |
| runs-on: macos-14 | |
| needs: style | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install all deps | |
| run: pip install -e ".[all,dev]" | |
| - name: Test DSP imports without TTS/STT | |
| run: | | |
| python -c "from mlx_audio.dsp import stft, mel_filters; print('DSP OK')" | |
| python -c "from mlx_audio.utils import stft; import sys; assert 'mlx_audio.tts.utils' not in sys.modules; print('Lazy imports OK')" | |
| - name: Run core tests | |
| run: pytest -s mlx_audio/tests/ | |
| # Modular installation tests - validates issue #287 | |
| # Only verifies imports work with minimal deps installed. | |
| # Full tests run separately with all deps (test files import models that need extra deps). | |
| modular: | |
| runs-on: macos-14 | |
| needs: style | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - extra: stt | |
| verify: "from mlx_audio.stt.utils import load_model" | |
| - extra: tts | |
| verify: "from mlx_audio.tts.utils import load_model" | |
| - extra: sts | |
| verify: "from mlx_audio.sts.voice_pipeline import VoicePipeline" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install [${{ matrix.extra }}] only | |
| run: pip install -e ".[${{ matrix.extra }}]" | |
| - name: Verify ${{ matrix.extra }} imports | |
| run: python -c "${{ matrix.verify }}; print('${{ matrix.extra }} imports OK')" | |
| # Full test suites - need all deps | |
| tests: | |
| runs-on: macos-14 | |
| needs: style | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: TTS | |
| path: mlx_audio/tts/tests | |
| - name: STT | |
| path: mlx_audio/stt/tests | |
| - name: STS | |
| path: mlx_audio/sts/tests | |
| - name: Codec | |
| path: mlx_audio/codec/tests | |
| - name: VAD | |
| path: mlx_audio/vad/tests | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install all deps | |
| run: pip install -e ".[all,dev]" | |
| - name: Run ${{ matrix.name }} tests | |
| run: pytest -s ${{ matrix.path }}/ |