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
85 changes: 85 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on:
push:
workflow_dispatch:

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
cd src/modules/python &&
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
cd src/modules/python &&
python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v5
with:
name: python-package-distributions
path: src/modules/python/dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
#if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pySpeechModule
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: python-package-distributions
path: src/modules/python/dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: src/modules/python/dist/

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
#if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/pySpeechModule

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: python-package-distributions
path: src/modules/python/dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: src/modules/python/dist/
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "2"

build:
os: "ubuntu-22.04"
tools:
python: "3.10"

python:
install:
- requirements: doc/pySpeechModule/requirements.txt

sphinx:
configuration: doc/pySpeechModule/source/conf.py
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ These speech syntheses are supported:
- Pico
- Piper
- Swift
- Kitten

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does not add Kitten?


Documentation
-------------
Expand All @@ -60,6 +61,8 @@ The python binding documentation is available on the shell with
`pydoc3 speechd` (or `pydoc speechd`)
and online: the [speechd.client module documentation](http://htmlpreview.github.io/?https://github.com/brailcom/speechd/blob/master/doc/speechd.client.html)

Also python documentation for writing server modules can be found [here](https://pyspeechmodule.readthedocs.io/en/latest/index.html)

The key features and the supported TTS engines, output subsystems, client
interfaces and client applications known to work with Speech Dispatcher are
listed in [overview of speech-dispatcher](README.overview.md) as well as voices
Expand Down Expand Up @@ -170,7 +173,7 @@ Development team:
* Andrei Kholodnyi

Contributors: Trevor Saunders, Lukas Loehrer,Gary Cramblitt, Olivier Bert, Jacob
Schmude, Steve Holmes, Gilles Casse, Rui Batista, Marco Skambraks ...and many
Schmude, Steve Holmes, Gilles Casse, Rui Batista, Marco Skambraks, John Settlemyer ...and many
others.

Licensing
Expand Down
20 changes: 20 additions & 0 deletions doc/pySpeechModule/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions doc/pySpeechModule/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
17 changes: 17 additions & 0 deletions doc/pySpeechModule/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# building the docs locally.

```
python -m venv ./venv
source venv/bin/activate

pip install -U sphinx
pip install sphinx-autobuild
pip install sphinx-rtd-theme myst-parser

# using sphinx
sphinx-build -M html source build

# using autobuild
sphinx-autobuild --host 0.0.0.0 --port 8080 source build
# go to localhost:8080/ to see a live preview of the doc's
```
4 changes: 4 additions & 0 deletions doc/pySpeechModule/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx==7.1.2
sphinx-rtd-theme==1.3.0rc1
myst-parser
soundfile
Loading
Loading