Spaces:
Runtime error
Runtime error
| name: Release and Publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Triggers on version tags like v1.0.0, v3.0.1, etc. | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Test package import | |
| run: | | |
| pip install -e . | |
| python -c "import ttsfm; print(f'β TTSFM imported successfully')" | |
| python -c "from ttsfm import TTSClient; print('β TTSClient imported successfully')" | |
| - name: Build package | |
| run: | | |
| python -m build | |
| echo "π¦ Package built successfully" | |
| ls -la dist/ | |
| - name: Check package | |
| run: | | |
| twine check dist/* | |
| echo "β Package validation passed" | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| attestations: true | |
| skip-existing: true | |
| - name: Extract version (strip leading v) | |
| id: ver | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| body: | | |
| ## π TTSFM ${{ github.ref_name }} | |
| New release of TTSFM - Free Text-to-Speech API with OpenAI compatibility. | |
| ### π¦ Installation | |
| ```bash | |
| pip install ttsfm==${{ steps.ver.outputs.version }} | |
| ``` | |
| ### π Quick Start | |
| ```python | |
| from ttsfm import TTSClient | |
| client = TTSClient() | |
| response = client.generate_speech("Hello from TTSFM!") | |
| response.save_to_file("hello") | |
| ``` | |
| ### π³ Docker | |
| ```bash | |
| docker run -p 8000:8000 dbcccc/ttsfm:latest | |
| ``` | |
| ### β¨ Features | |
| - π Completely free (uses openai.fm service) | |
| - π― OpenAI-compatible API | |
| - π£οΈ 11 voices available | |
| - π΅ 6 audio formats (MP3, WAV, OPUS, AAC, FLAC, PCM) | |
| - β‘ Async and sync clients | |
| - π Web interface included | |
| - π§ CLI tool available | |
| ### π Documentation | |
| See [README](https://github.com/dbccccccc/ttsfm#readme) for full documentation. | |
| draft: false | |
| prerelease: false | |