From 8f824b6ca1cc2b8f2caf3ceb715c9437a27ee341 Mon Sep 17 00:00:00 2001 From: YASoftwareDev Date: Mon, 30 Mar 2026 15:55:33 +0200 Subject: [PATCH 1/3] chore: remove post-refactor residuals; bump version to 3.2.11 - submodules/tts-service-api: remove stale gitlink from index - Dockerfile: remove COPY of submodules/tts-service-api (no longer exists) - mypy.ini: remove obsolete [mypy-tts_client_python.proto.*] rule - README.md: remove submodule init mention; fix proto stubs description --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 1 - README.md | 12 ++++++------ mypy.ini | 4 ---- submodules/tts-service-api | 1 - tts_client_python/VERSION.py | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) delete mode 160000 submodules/tts-service-api diff --git a/CHANGELOG.md b/CHANGELOG.md index 3186421..9154e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Techmo TTS gRPC Python client Changelog +## [3.2.11] - 2026-03-30 + +### Fixed + +- `Dockerfile`: remove stale `COPY submodules/tts-service-api` line (submodule no longer exists). +- `mypy.ini`: remove obsolete `[mypy-tts_client_python.proto.*]` exclusion rule. +- `README.md`: remove references to submodule init and local proto stubs; reflect that stubs + come from the `tts-api` dependency. + + ## [3.2.10] - 2026-03-30 ### Fixed diff --git a/Dockerfile b/Dockerfile index 46c1909..125e74b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,6 @@ FROM python:3.8-slim AS build-stage ARG DEBIAN_FRONTEND=noninteractive ENV PIP_ROOT_USER_ACTION=ignore -COPY submodules/tts-service-api /tts-client-python/submodules/tts-service-api COPY tts_client_python /tts-client-python/tts_client_python COPY setup.py pyproject.toml README.md /tts-client-python/ diff --git a/README.md b/README.md index 4c1fd95..e7d4a3c 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ For more information on requirements and setup, see `doc/dev-guide.md` file. ### Setup -To initialise submodules and install pre-commit hooks, run once after cloning: +To install pre-commit hooks, run once after cloning: ``` ./setup.sh ``` @@ -221,7 +221,7 @@ python3 tts_client_python/tts_client.py --service-address "SERVICE_HOST:SERVICE_ ### Running tests locally -Proto stubs (`tts_client_python/proto/*_pb2.py`) are **not committed** to git. +Proto stubs are provided by the `tts-api` dependency and installed automatically. Run the following once after cloning, then activate the venv and run tests: ```bash @@ -231,10 +231,10 @@ source .venv/bin/activate pytest ``` -> **Note on scripts:** `setup.sh` is a one-time bootstrapper (submodules + -> pre-commit hooks). `install.sh [VENV_PATH]` creates the virtualenv and -> installs the package — run it separately after `setup.sh`, or re-run it -> whenever you need to refresh the Python environment. +> **Note on scripts:** `setup.sh` is a one-time bootstrapper (pre-commit hooks). +> `install.sh [VENV_PATH]` creates the virtualenv and installs the package — +> run it separately after `setup.sh`, or re-run it whenever you need to refresh +> the Python environment. > **Multi-version testing** (optional): to run the full matrix across Python > 3.8–3.14 (mirrors CI), run `uvx --with "tox-uv>=1" tox` instead of `pytest` diff --git a/mypy.ini b/mypy.ini index 596e2af..2a64951 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,10 +1,6 @@ [mypy] exclude = setup\.py -# Exclude auto-generated protobuf files from strict type checking -[mypy-tts_client_python.proto.*] -ignore_errors = True - # grpc stubs are incomplete [mypy-grpc.*] ignore_missing_imports = True diff --git a/submodules/tts-service-api b/submodules/tts-service-api deleted file mode 160000 index b1703e1..0000000 --- a/submodules/tts-service-api +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b1703e1908d3994df6fd28c6b357d7b1efe381d7 diff --git a/tts_client_python/VERSION.py b/tts_client_python/VERSION.py index 163b89e..bb29b3d 100644 --- a/tts_client_python/VERSION.py +++ b/tts_client_python/VERSION.py @@ -1 +1 @@ -TTS_CLIENT_PYTHON_VERSION = "3.2.10" +TTS_CLIENT_PYTHON_VERSION = "3.2.11" From 09aa7894c25bff92775df1ee2e251b6336b4f42d Mon Sep 17 00:00:00 2001 From: YASoftwareDev Date: Mon, 30 Mar 2026 20:11:49 +0200 Subject: [PATCH 2/3] docs: fix stale CLI options and remove dead doc references; bump to 3.2.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README.md: --input-text-file → --input-path in Docker example - README.md: --sampling-rate → --sampling-rate-hz in options table - README.md: --language → --language-code in recording/sound-icon descriptions - README.md: add missing --tls, --tls-ca-cert-file, --tls-cert-file, --tls-private-key-file, --max-frame-size to options table - README.md: remove references to non-existent doc/dev-guide.md - docker/run.sh: update IMAGE_VERSION 3.2.8 → 3.2.12 --- CHANGELOG.md | 13 +++++++++++++ README.md | 25 ++++++++++++++----------- docker/run.sh | 2 +- tts_client_python/VERSION.py | 2 +- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9154e28..b51102b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Techmo TTS gRPC Python client Changelog +## [3.2.12] - 2026-03-30 + +### Fixed + +- `README.md`: fix `--input-text-file` → `--input-path` in Docker usage example. +- `README.md`: fix `--sampling-rate` → `--sampling-rate-hz` in options table. +- `README.md`: fix `--language` → `--language-code` in recording/sound-icon option descriptions. +- `README.md`: add missing TLS options (`--tls`, `--tls-ca-cert-file`, `--tls-cert-file`, + `--tls-private-key-file`) and `--max-frame-size` to the options table. +- `README.md`: remove references to non-existent `doc/dev-guide.md`. +- `docker/run.sh`: update `IMAGE_VERSION` from `3.2.8` to `3.2.12`. + + ## [3.2.11] - 2026-03-30 ### Fixed diff --git a/README.md b/README.md index e7d4a3c..1bad22d 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The generated audio file will appear in the `tts-client-python/docker/audio` dir To synthesize speech from a text file, place it in the `tts-client-python/docker/txt` directory and execute the command: ``` -./run.sh --service-address=IP_ADDRESS:PORT --input-text-file /tts_client/txt/FILE_NAME.txt +./run.sh --service-address=IP_ADDRESS:PORT --input-path /tts_client/txt/FILE_NAME.txt ``` To use an encrypted connection, place the tls certificates received from the service owner in the `tts-client-python/docker/tls` directory and execute the command: @@ -65,7 +65,7 @@ To print a complete list of available options, use: ./run.sh --help ``` -For more information on building and using the docker image, see `doc/dev-guide.md` file. + ## Local instance usage @@ -121,8 +121,6 @@ Three independent blockers make Python 3.7 support impractical: Python 3.7 also reached end-of-life in June 2023. -For more information on requirements and setup, see `doc/dev-guide.md` file. - ### Setup To install pre-commit hooks, run once after cloning: @@ -160,11 +158,15 @@ python3 tts_client_python/tts_client.py --service-address=IP_ADDRESS:PORT --text | -o OUT_PATH, --out-path OUT_PATH | A path to output audio file with synthesized speech content.| | -l LANGUAGE_CODE, --language-code LANGUAGE_CODE | Language ISO 639-1 code of the voice to be used (optional, can be overridden by SSML).| | -r RESPONSE_TYPE, --response RESPONSE_TYPE | Sets the type of response. Allowed values: "streaming" (default) or "single". According to the set response type, the streaming or non-streaming version of the Synthesize call is used.| -| --tls-dir TLS_DIR | If set to a path to the directory containing SSL/TLS files (client.crt, client.key, ca.crt), uses SSL/TLS authentication (required for both one-way and mutual authentication). If not set, uses insecure connection.| +| --tls | Enables simple one-way TLS using root certificates from the default gRPC location. Cannot be combined with other `--tls-*` options.| +| --tls-dir TLS_DIR | Path to a directory with TLS credential files (ca.crt, client.crt, client.key). Selects one-way or mutual TLS depending on files present. Alternative to the individual `--tls-*-file` options.| +| --tls-ca-cert-file FILE | Path to x509 CA Certificate file for server authentication.| +| --tls-cert-file FILE | Path to x509 client certificate for mutual TLS. Must be used together with `--tls-private-key-file`.| +| --tls-private-key-file FILE | Path to x509 private key matching `--tls-cert-file`. Must be used together with `--tls-cert-file`.| | --play | Plays synthesized audio. Works only with pcm16 (default) encoding.| | --session-id SESSION_ID | A session ID to be passed to the service. If not specified, the service generates a default session ID based on the timestamp of the request (in the form of: 'YYYYMMDD-hhmmss-xxx', where 'xxx' is the counter of sessions handled during the indicated second).| | --grpc-timeout GRPC_TIMEOUT | A timeout in milliseconds used to set gRPC deadline - how long the client is willing to wait for a reply from the server (optional).| -| --sampling-rate SAMPLING_RATE | A sampling rate in Hz of synthesized audio. Set to 0 (default) to use voice's native sampling rate.| +| --sampling-rate-hz SAMPLING_RATE | A sampling rate in Hz of synthesized audio. Set to 0 (default) to use voice's native sampling rate.| | --ae ENCODING, --audio-encoding ENCODING | An encoding of the output audio, pcm16 (default), ogg-vorbis, ogg-opus, a-law, or mu-law.| | --speech-pitch SPEECH_PITCH | Allows adjusting the default pitch of the synthesized speech (optional, can be overridden by SSML).| | --speech-range SPEECH_RANGE | Allows adjusting the default range of the synthesized speech (optional, can be overridden by SSML).| @@ -176,11 +178,12 @@ python3 tts_client_python/tts_client.py --service-address=IP_ADDRESS:PORT --text | --vg VOICE_GENDER, --voice-gender VOICE_GENDER | A gender of the voice to be used. Allowed values: 'female', 'male' (optional, can be overridden by SSML).| | --va VOICE_AGE, --voice-age VOICE_AGE | An age of the voice to be used. Allowed values: 'adult', 'child', 'senile' (optional, can be overridden by SSML).| | --voice-variant VOICE_VARIANT | A variant of the selected voice - positive integer (optional, can be overridden by SSML). Default value is 1.| -| --list-sound-icons | Lists all available sound icons for the requested voice. This request requires also arguments: --voice-name and --language, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| -| --list-recordings | Lists all available recordings for the requested voice. This request requires also arguments: --voice-name and --language, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| -| --get-recording RECORDING_KEY OUTPUT_PATH | Sends back the recording with the requested key for the requested voice in the linear PCM16 format. This request requires also arguments: --voice-name and --language, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| -| --put-recording RECORDING_KEY AUDIO_PATH | Adds a new recording with the requested key for the requested voice, or overwrites the existing one if there is already such a key defined. The recording has to be PCM16 WAV audio. This request requires also arguments: --voice-name and --language, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| -| --delete-recording RECORDING_KEY | Removes the recording with the requested key from the list of recordings of the requested voice. This request requires also arguments: --voice-name and --language, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| +| --max-frame-size MAX_FRAME_SIZE | Maximum frame size for RTF throttling. Optional, 0 (default) disables RTF throttling.| +| --list-sound-icons | Lists all available sound icons for the requested voice. This request requires also arguments: --voice-name and --language-code, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| +| --list-recordings | Lists all available recordings for the requested voice. This request requires also arguments: --voice-name and --language-code, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| +| --get-recording RECORDING_KEY OUTPUT_PATH | Sends back the recording with the requested key for the requested voice in the linear PCM16 format. This request requires also arguments: --voice-name and --language-code, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| +| --put-recording RECORDING_KEY AUDIO_PATH | Adds a new recording with the requested key for the requested voice, or overwrites the existing one if there is already such a key defined. The recording has to be PCM16 WAV audio. This request requires also arguments: --voice-name and --language-code, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| +| --delete-recording RECORDING_KEY | Removes the recording with the requested key from the list of recordings of the requested voice. This request requires also arguments: --voice-name and --language-code, and may optionally specify --voice-variant (if not specified, the default variant (1) is used).| | --list-lexicons | Lists all available pronunciation lexicons.| | --get-lexicon LEXICON_URI OUTPUT_PATH | Saves content of the lexicon from the service-wide list of lexicon.| | --put-lexicon LEXICON_URI LEXICON_PATH OUTSIDE_LOOKUP_BEHAVIOUR | Adds lexicon to the service-wide list of lexicons. LEXICON_URI - a custom string identifying a given lexicon at the service level. LEXICON_PATH - path to the lexicon file. OUTSIDE_LOOKUP_BEHAVIOUR - determines whether the service can use the lexicon automatically, without using the SSML tag. Must take one of two values: 'allowed' or 'disallowed'.| diff --git a/docker/run.sh b/docker/run.sh index a39d6ec..5398181 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -8,7 +8,7 @@ set -euo pipefail IFS=$'\n\t' -IMAGE_VERSION=3.2.8 +IMAGE_VERSION=3.2.11 SCRIPT=$(realpath "$0") SCRIPTPATH=$(dirname "${SCRIPT}") diff --git a/tts_client_python/VERSION.py b/tts_client_python/VERSION.py index bb29b3d..e8d6eb8 100644 --- a/tts_client_python/VERSION.py +++ b/tts_client_python/VERSION.py @@ -1 +1 @@ -TTS_CLIENT_PYTHON_VERSION = "3.2.11" +TTS_CLIENT_PYTHON_VERSION = "3.2.12" From d8a3bea755304500474148f0ac5af5bd0ebd66be Mon Sep 17 00:00:00 2001 From: YASoftwareDev Date: Mon, 30 Mar 2026 20:18:48 +0200 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20docker/run.sh=20IMAGE=5FVERSION=203.?= =?UTF-8?q?2.11=20=E2=86=92=203.2.12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/run.sh b/docker/run.sh index 5398181..821b786 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -8,7 +8,7 @@ set -euo pipefail IFS=$'\n\t' -IMAGE_VERSION=3.2.11 +IMAGE_VERSION=3.2.12 SCRIPT=$(realpath "$0") SCRIPTPATH=$(dirname "${SCRIPT}")