From 69528d7cbc6536e4b41153daac3bfb9a0c8a7a34 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:11:30 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 5.41.10 --- .fern/metadata.json | 4 ++-- poetry.lock | 24 +++++++++++------------ pyproject.toml | 2 +- reference.md | 2 +- src/speechify/audio/client.py | 20 +++++++++---------- src/speechify/audio/raw_client.py | 12 ++++++------ src/speechify/core/client_wrapper.py | 4 ++-- src/speechify/types/get_stream_request.py | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.fern/metadata.json b/.fern/metadata.json index e42db10..0ed8180 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -9,9 +9,9 @@ }, "pyproject_python_version": ">=3.9" }, - "originGitCommit": "14383dab6762a97b9dab9778796ac2b4c41cdd6d", + "originGitCommit": "9dc6c3ff12a6ae2c28a77e56accb770d4c8e95cf", "originGitCommitIsDirty": false, "invokedBy": "ci", "ciProvider": "github", - "sdkVersion": "5.0.0" + "sdkVersion": "5.0.1" } \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 6a59a38..804f042 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1203,27 +1203,27 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "9.1.1" +version = "9.2.0" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c"}, - {file = "pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313"}, + {file = "pytest-9.2.0-py3-none-any.whl", hash = "sha256:07acdcf88ec174f907dc01af70bf52d49b014bbab03faeeade31c96b18c2e588"}, + {file = "pytest-9.2.0.tar.gz", hash = "sha256:97c4f3b1f3c7414aa36465e09b8220f1d03627993bd51b1282e193753c80557b"}, ] [package.dependencies] colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} -iniconfig = ">=1.0.1" -packaging = ">=22" -pluggy = ">=1.5,<2" -pygments = ">=2.7.2" -tomli = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=2" +packaging = ">=24" +pluggy = ">=1.6,<2" +pygments = ">=2.15" +tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] -dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "asynctest ; python_version < \"3.11\"", "attrs (>=23.1)", "coverage (>=7.5)", "hypothesis (>=6.75)", "mock", "numpy (>=1.26)", "pexpect (>=4.9)", "pytest-xdist (>=3.5)", "pyyaml", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" @@ -1400,14 +1400,14 @@ files = [ [[package]] name = "types-python-dateutil" -version = "2.9.0.20261021" +version = "2.9.0.20261029" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "types_python_dateutil-2.9.0.20261021-py3-none-any.whl", hash = "sha256:12aab3bdfe55e1d9de7f54301e025d6276ce17e6a08e31644f2202d59c8d1fca"}, - {file = "types_python_dateutil-2.9.0.20261021.tar.gz", hash = "sha256:62d66fcdd293e38745eae644e5da4cb399b98799c0ae61f03a54896fb51b3140"}, + {file = "types_python_dateutil-2.9.0.20261029-py3-none-any.whl", hash = "sha256:8fd04c6e1722d2523a74d6670596fc0007077651465b686f144ae1d200dcacf5"}, + {file = "types_python_dateutil-2.9.0.20261029.tar.gz", hash = "sha256:3258b491686c441d8074cfc8712308741900c9ff128a06421baec3767c503511"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 446a862..e6d8c2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ license-files = ["LICENSE"] [tool.poetry] name = "speechify-api" -version = "5.0.0" +version = "5.0.1" description = "Official Speechify API SDK" readme = "README.md" authors = [ diff --git a/reference.md b/reference.md index b97d83d..3f78cca 100644 --- a/reference.md +++ b/reference.md @@ -102,7 +102,7 @@ Please refer to the list of the supported languages and recommendations regardin **model:** `typing.Optional[GetSpeechRequestModel]` -Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. +Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. diff --git a/src/speechify/audio/client.py b/src/speechify/audio/client.py index 37fd074..6703eb8 100644 --- a/src/speechify/audio/client.py +++ b/src/speechify/audio/client.py @@ -84,7 +84,7 @@ def speech( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetSpeechRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -117,7 +117,7 @@ def speech( client.audio.speech( audio_format="mp3", input="Hello! This is the Speechify text-to-speech API.", - model="simba-3.2", + model="simba-3.5", voice_id="geffen_32", ) """ @@ -183,7 +183,7 @@ def stream( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -306,7 +306,7 @@ def stream_with_timestamps( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -348,7 +348,7 @@ def stream_with_timestamps( ) response = client.audio.stream_with_timestamps( input="Streaming long-form audio with the Speechify API.", - model="simba-3.2", + model="simba-3.5", voice_id="geffen_32", ) for chunk in response: @@ -434,7 +434,7 @@ async def speech( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetSpeechRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -472,7 +472,7 @@ async def main() -> None: await client.audio.speech( audio_format="mp3", input="Hello! This is the Speechify text-to-speech API.", - model="simba-3.2", + model="simba-3.5", voice_id="geffen_32", ) @@ -541,7 +541,7 @@ async def stream( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -673,7 +673,7 @@ async def stream_with_timestamps( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -720,7 +720,7 @@ async def stream_with_timestamps( async def main() -> None: response = client.audio.stream_with_timestamps( input="Streaming long-form audio with the Speechify API.", - model="simba-3.2", + model="simba-3.5", voice_id="geffen_32", ) async for chunk in response: diff --git a/src/speechify/audio/raw_client.py b/src/speechify/audio/raw_client.py index 7fa2111..2e7fc54 100644 --- a/src/speechify/audio/raw_client.py +++ b/src/speechify/audio/raw_client.py @@ -88,7 +88,7 @@ def speech( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetSpeechRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -324,7 +324,7 @@ def stream( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -592,7 +592,7 @@ def stream_with_timestamps( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -865,7 +865,7 @@ async def speech( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetSpeechRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -1101,7 +1101,7 @@ async def stream( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. @@ -1370,7 +1370,7 @@ async def stream_with_timestamps( Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. model : typing.Optional[GetStreamRequestModel] - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. diff --git a/src/speechify/core/client_wrapper.py b/src/speechify/core/client_wrapper.py index cb94db7..c3bc63b 100644 --- a/src/speechify/core/client_wrapper.py +++ b/src/speechify/core/client_wrapper.py @@ -36,12 +36,12 @@ def get_headers(self, *, include_token: bool = True) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "speechify-api/4.0.1", + "User-Agent": "speechify-api/5.0.1", "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "speechify-api", - "X-Fern-SDK-Version": "4.0.1", + "X-Fern-SDK-Version": "5.0.1", **(self.get_custom_headers() or {}), } if self._version is not None: diff --git a/src/speechify/types/get_stream_request.py b/src/speechify/types/get_stream_request.py index 5d50430..1f3a076 100644 --- a/src/speechify/types/get_stream_request.py +++ b/src/speechify/types/get_stream_request.py @@ -32,7 +32,7 @@ class GetStreamRequest(UniversalBaseModel): model: typing.Optional[GetStreamRequestModel] = pydantic.Field(default=None) """ - Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native English model; a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. """ From 8f1002c70a16112ca3befc13bfb5d80a583f8249 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:11:31 +0000 Subject: [PATCH 2/2] [fern-replay] Applied customizations Patches with unresolved conflicts (1): - patch-composite-28378839: Customer customizations (composite) Run `fern-replay resolve` to apply these customizations. --- .fern/replay.lock | 3725 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 3723 insertions(+), 2 deletions(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 479495f..93d9048 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -12,5 +12,3726 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 5.41.10 -current_generation: f45ba8380dabd5e09ce4637fdcf94ae6f2cf41a9 -patches: [] + - commit_sha: 8bc88358fd2aeb2f6a235da4effc63557070d55c + tree_hash: c4f995afd7036d5ce89ab393f5f4925b21e951e5 + timestamp: 2026-10-29T15:11:27.081Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 5.41.10 +current_generation: 8bc88358fd2aeb2f6a235da4effc63557070d55c +patches: + - id: patch-composite-28378839 + content_hash: sha256:f853c24832eebc6f1fb8d4315616a712e7ef940cf3639271275a6847d49f9830 + original_commit: 28378839177f2c4aee3f75b20e4f3dbc67011e99 + original_message: Customer customizations (composite) + original_author: composite + base_generation: f45ba8380dabd5e09ce4637fdcf94ae6f2cf41a9 + files: + - README.md + - pyproject.toml + - reference.md + patch_content: |+ + diff --git a/README.md b/README.md + index 4a35333..6f5e7fd 100644 + --- a/README.md + +++ b/README.md + @@ -51,7 +51,7 @@ client = Speechify( + client.audio.speech( + audio_format="mp3", + input="Hello! This is the Speechify text-to-speech API.", + - model="simba-3.2", + + model="simba-3.5", + voice_id="geffen_32", + ) + ``` + @@ -87,7 +87,7 @@ async def main() -> None: + await client.audio.speech( + audio_format="mp3", + input="Hello! This is the Speechify text-to-speech API.", + - model="simba-3.2", + + model="simba-3.5", + voice_id="geffen_32", + ) + + @@ -123,7 +123,7 @@ client = Speechify( + + client.audio.stream_with_timestamps( + input="Streaming long-form audio with the Speechify API.", + - model="simba-3.2", + + model="simba-3.5", + voice_id="geffen_32", + ) + ``` + diff --git a/pyproject.toml b/pyproject.toml + index 2b8b09d..446a862 100644 + --- a/pyproject.toml + +++ b/pyproject.toml + @@ -6,7 +6,7 @@ license-files = ["LICENSE"] + + [tool.poetry] + name = "speechify-api" + -version = "4.0.1" + +version = "5.0.0" + description = "Official Speechify API SDK" + readme = "README.md" + authors = [ + diff --git a/reference.md b/reference.md + index 7de11a5..b97d83d 100644 + --- a/reference.md + +++ b/reference.md + @@ -42,7 +42,7 @@ client = Speechify( + client.audio.speech( + audio_format="mp3", + input="Hello! This is the Speechify text-to-speech API.", + - model="simba-3.2", + + model="simba-3.5", + voice_id="geffen_32", + ) + + @@ -317,7 +317,7 @@ client = Speechify( + + client.audio.stream_with_timestamps( + input="Streaming long-form audio with the Speechify API.", + - model="simba-3.2", + + model="simba-3.5", + voice_id="geffen_32", + ) + + theirs_snapshot: + README.md: | + # Speechify Python Library + + [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FSpeechify-AI%2Fsdk-python) + [![pypi](https://img.shields.io/pypi/v/speechify-api)](https://pypi.python.org/pypi/speechify-api) + + The Speechify Python library provides convenient access to the Speechify APIs from Python. + + ## Table of Contents + + - [Documentation](#documentation) + - [Installation](#installation) + - [Reference](#reference) + - [Usage](#usage) + - [Environments](#environments) + - [Async Client](#async-client) + - [Exception Handling](#exception-handling) + - [Streaming](#streaming) + - [Pagination](#pagination) + - [Advanced](#advanced) + - [Access Raw Response Data](#access-raw-response-data) + - [Retries](#retries) + - [Timeouts](#timeouts) + - [Custom Client](#custom-client) + - [Contributing](#contributing) + + ## Documentation + + API reference documentation is available [here](https://docs.speechify.ai/api-reference). + + ## Installation + + ```sh + pip install speechify-api + ``` + + ## Reference + + A full reference for this library is available [here](https://github.com/Speechify-AI/sdk-python/blob/HEAD/./reference.md). + + ## Usage + + Instantiate and use the client with the following: + + ```python + from speechify import Speechify + + client = Speechify( + token="", + ) + + client.audio.speech( + audio_format="mp3", + input="Hello! This is the Speechify text-to-speech API.", + model="simba-3.5", + voice_id="geffen_32", + ) + ``` + + ## Environments + + This SDK allows you to configure different environments for API requests. + + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + environment=SpeechifyEnvironment.DEFAULT, + ) + ``` + + ## Async Client + + The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client). + + ```python + import asyncio + + from speechify import AsyncSpeechify + + client = AsyncSpeechify( + token="", + ) + + + async def main() -> None: + await client.audio.speech( + audio_format="mp3", + input="Hello! This is the Speechify text-to-speech API.", + model="simba-3.5", + voice_id="geffen_32", + ) + + + asyncio.run(main()) + ``` + + ## Exception Handling + + When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error + will be thrown. + + ```python + from speechify.core.api_error import ApiError + + try: + client.audio.speech(...) + except ApiError as e: + print(e.status_code) + print(e.body) + ``` + + ## Streaming + + The SDK supports streaming responses, as well, the response will be a generator that you can loop over. + + ```python + from speechify import Speechify + + client = Speechify( + token="", + ) + + client.audio.stream_with_timestamps( + input="Streaming long-form audio with the Speechify API.", + model="simba-3.5", + voice_id="geffen_32", + ) + ``` + + ## Pagination + + Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object. + + ```python + from speechify import Speechify + + client = Speechify( + token="", + ) + + client.voices.list( + locale="en", + model="simba-3.2", + project_id="proj_01arz3ndektsv4rrffq69g5fav", + ) + ``` + + ```python + # You can also iterate through pages and access the typed response per page + pager = client.voices.list(...) + for page in pager.iter_pages(): + print(page.response) # access the typed response for each page + for item in page: + print(item) + ``` + + ## Advanced + + ### Access Raw Response Data + + The SDK provides access to raw response data, including headers, through the `.with_raw_response` property. + The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes. + + ```python + from speechify import Speechify + + client = Speechify(...) + response = client.audio.with_raw_response.speech(...) + print(response.headers) # access the response headers + print(response.status_code) # access the response status code + print(response.data) # access the underlying object + ``` + + ### Retries + + The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long + as the request is deemed retryable and the number of retry attempts has not grown larger than the configured + retry limit (default: 2). + + Which status codes are retried depends on the `retryStatusCodes` generator configuration: + + **`legacy`** (current default): retries on + - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) + - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict) + - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) + - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (All server errors, including 500) + + **`recommended`**: retries on + - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) + - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict) + - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) + - [502](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502) (Bad Gateway) + - [503](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) (Service Unavailable) + - [504](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504) (Gateway Timeout) + + Use the `max_retries` request option to configure this behavior. + + ```python + client.audio.speech(..., request_options={ + "max_retries": 1 + }) + ``` + + ### Timeouts + + The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. + + ```python + from speechify import Speechify + + client = Speechify(..., timeout=20.0) + + # Override timeout for a specific method + client.audio.speech(..., request_options={ + "timeout": 1 + }) + ``` + + ### Custom Client + + You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies + and transports. + + ```python + import httpx + from speechify import Speechify + + client = Speechify( + ..., + httpx_client=httpx.Client( + proxy="http://my.test.proxy.example.com", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), + ) + ``` + + ## Contributing + + While we value open-source contributions to this SDK, this library is generated programmatically. + Additions made directly to this library would have to be moved over to our generation code, + otherwise they would be overwritten upon the next generated release. Feel free to open a PR as + a proof of concept, but know that we will not be able to merge it as-is. We suggest opening + an issue first to discuss with us! + + On the other hand, contributions to the README are always very welcome! + pyproject.toml: | + [project] + name = "speechify-api" + dynamic = ["version"] + license = "MIT" + license-files = ["LICENSE"] + + [tool.poetry] + name = "speechify-api" + version = "5.0.0" + description = "Official Speechify API SDK" + readme = "README.md" + authors = [ + "Speechify " + ] + keywords = [ + "speechify", + "ai", + "api", + "sdk", + "text-to-speech", + "tts" + ] + license = "MIT" + classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", + "Operating System :: OS Independent", + "Operating System :: POSIX", + "Operating System :: MacOS", + "Operating System :: POSIX :: Linux", + "Operating System :: Microsoft :: Windows", + "Topic :: Software Development :: Libraries :: Python Modules", + "Typing :: Typed" + ] + packages = [ + { include = "speechify", from = "src"} + ] + + [tool.poetry.urls] + Documentation = 'https://docs.speechify.ai/api-reference' + Homepage = 'https://docs.speechify.ai' + Repository = 'https://github.com/Speechify-AI/sdk-python' + + [tool.poetry.dependencies] + python = "^3.10" + aiohttp = { version = ">=3.14.1,<4", optional = true, python = ">=3.10"} + httpx = ">=0.21.2" + httpx-aiohttp = { version = "^0.1.8", optional = true, python = ">=3.10"} + pydantic = ">= 1.9.2" + pydantic-core = ">=2.18.2,<3.0.0" + typing_extensions = ">= 4.0.0" + + [tool.poetry.group.dev.dependencies] + mypy = "==1.13.0" + pytest = "^9.0.3" + pytest-asyncio = "^1.0.0" + pytest-xdist = "^3.6.1" + python-dateutil = "^2.9.0" + types-python-dateutil = "^2.9.0.20240316" + urllib3 = ">=2.6.3,<3.0.0" + ruff = "==0.11.5" + + [tool.pytest.ini_options] + testpaths = [ "tests" ] + asyncio_mode = "auto" + norecursedirs = [ "src" ] + markers = [ + "aiohttp: tests that require httpx_aiohttp to be installed", + ] + + [tool.mypy] + plugins = ["pydantic.mypy"] + + [tool.ruff] + line-length = 120 + + [tool.ruff.lint] + select = [ + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + ] + ignore = [ + "E402", # Module level import not at top of file + "E501", # Line too long + "E711", # Comparison to `None` should be `cond is not None` + "E712", # Avoid equality comparisons to `True`; use `if ...:` checks + "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks + "E722", # Do not use bare `except` + "E731", # Do not assign a `lambda` expression, use a `def` + "F821", # Undefined name + "F841" # Local variable ... is assigned to but never used + ] + + [tool.ruff.lint.isort] + section-order = ["future", "standard-library", "third-party", "first-party"] + + [build-system] + requires = ["poetry-core"] + build-backend = "poetry.core.masonry.api" + + [tool.poetry.extras] + aiohttp=["aiohttp", "httpx-aiohttp"] + reference.md: |+ + # Reference + ## audio +
client.audio.speech(...) -> GetSpeechResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Synthesize speech audio from text or SSML. Returns the complete audio + file plus billing and speech-mark metadata in a single JSON response. + For low-latency playback or long-form text, use POST /v1/audio/stream. + Set `output_format` for explicit sample-rate/bitrate control (e.g. + `pcm_16000` or `ulaw_8000` for telephony). +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.audio.speech( + audio_format="mp3", + input="Hello! This is the Speechify text-to-speech API.", + model="simba-3.5", + voice_id="geffen_32", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **input:** `str` + + Plain text or SSML to be synthesized to speech. + Up to 2,000 characters of spoken text, the characters the request is billed for: SSML tags do not count. The input as sent, markup included, may be up to 20,000 characters. + Refer to https://docs.speechify.ai/docs/api-limits for the input size limits. + SSML sets pauses (``), speaking rate, pitch and volume (``) and pronunciation (``): see https://docs.speechify.ai/build/guides/text-to-speech/ssml for each tag. Emotion styles and emphasis are applied only by the Simba 1.6 models, until 2026-11-21; `simba-3.0`, `simba-3.2` and `simba-3.5` accept those tags without applying them. + +
+
+ +
+
+ + **voice_id:** `str` — Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices + +
+
+ +
+
+ + **audio_format:** `typing.Optional[GetSpeechRequestAudioFormat]` — The format for the output audio. Note, that the current default is "wav", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect. + +
+
+ +
+
+ + **language:** `typing.Optional[str]` + + Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US. + Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. + +
+
+ +
+
+ + **model:** `typing.Optional[GetSpeechRequestModel]` + + Model used for audio synthesis. Defaults to `simba-3.0`, which is streaming-native and multilingual: it officially supports English plus `de-DE`, `es-ES`, `es-MX`, `fr-FR`, `it-IT` and `pt-BR`, and routes each request to its English or its multilingual training based on `language` (falling back to the voice's locale when `language` is omitted). `simba-3.2` is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400. `simba-3.5` is the recommended model: streaming-native, covering 48 languages under one id, English included, routed by `language` like `simba-3.0`; every voice works on it, cloned voices included. + + The legacy Simba 1.6 models `simba-english` and `simba-multilingual` are retired from API version `2026-09-21`: naming one returns 400 `model_retired`. Pinning your API version to a date before `2026-09-21` keeps them on their Simba 1.6 training until **2026-11-21**; from then both ids are served by our current models on every API version that can still name them. Migrate to `simba-3.2` (English), `simba-3.0` or `simba-3.5` before then; call GET /v1/audio/models to see the set your workspace can select today. + +
+
+ +
+
+ + **options:** `typing.Optional[GetSpeechOptionsRequest]` + +
+
+ +
+
+ + **output_format:** `typing.Optional[AudioOutputFormat]` — The output audio format as a `codec_sampleRate_bitrate` string. Takes precedence over `audio_format` when set. + +
+
+ +
+
+ + **pronunciations:** `typing.Optional[Pronunciations]` + +
+
+ +
+
+ + **safety_identifier:** `typing.Optional[SafetyIdentifier]` — Optional. A stable, opaque identifier for the end user this request is made for: a hash of your own user id or an opaque id, never an email address or other personal data. It is recorded with the request even under zero data retention, and your workspace can be given per-end-user limits and a block list keyed on it. See https://docs.speechify.ai/build/guides/concepts/safety-identifiers. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio.stream(...) -> typing.Iterator[bytes] +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Synthesize speech and stream the audio back as it is generated, for + low-latency playback. Set `output_format` in the body for explicit + codec/sample-rate/bitrate control (e.g. `pcm_16000` or `ulaw_8000` for + telephony), or fall back to the Accept header for the container; the + response is raw audio bytes (HTTP chunked). For Base64-encoded audio + with speech-mark metadata in a single JSON response, use + POST /v1/audio/speech. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.audio.stream( + input="input", + voice_id="voice_id", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **request:** `GetStreamRequest` + +
+
+ +
+
+ + **accept:** `typing.Optional[StreamAudioRequestAccept]` + + Selects the audio container/codec for the streamed response when + `output_format` is not set in the request body. The response + Content-Type echoes this value, except `audio/pcm` returns + `audio/L16` with rate and channels parameters (raw 16-bit linear + PCM, 24 kHz mono, little-endian). For explicit sample-rate/bitrate + control (e.g. `pcm_16000`, `ulaw_8000`), set `output_format` in the + body instead; it takes precedence over this header. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio.stream_with_timestamps(...) -> typing.Iterator[bytes] +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Synthesize speech and stream it back together with word-level speech + marks, for text highlighting, captions and audio-text synchronization + while the audio is still arriving. + + The response is a Server-Sent Events stream. Each `speech.chunk` event + carries a Base64-encoded run of audio, the speech marks that became + final with it, or both - a chunk may carry only one of the two, and the + last chunk of a stream is often marks-only. A terminal `speech.done` + event ends the stream; there is no `[DONE]` sentinel. Ignore any event + type you do not recognize, so that new event types do not break your + integration. + + Speech-mark times are absolute milliseconds from the start of the + synthesis, so concatenate the audio chunks into one stream and apply the + marks against that single timeline. Which chunk a mark arrives on is a + delivery detail and carries no meaning. Times stay correct for every + `output_format`: changing the codec or sample rate does not change the + duration. + + Every model this route accepts produces speech marks here. The default + `simba-3.0`, `simba-3.2` and `simba-3.5` stream marks word by word + alongside the audio. The legacy `simba-english` and `simba-multilingual` models, + still selectable on a workspace pinned before API version `2026-09-21`, + synthesize a sentence at a time, so their marks arrive a sentence at a + time with that sentence's audio; from that version on they return 400 + `model_retired` on every synthesis route, and from 2026-11-21 both ids + are served by our current models. + For Base64-encoded audio and speech marks in one non-streamed JSON + response, use POST /v1/audio/speech. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.audio.stream_with_timestamps( + input="Streaming long-form audio with the Speechify API.", + model="simba-3.5", + voice_id="geffen_32", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **request:** `GetStreamRequest` + +
+
+ +
+
+ + **accept:** `typing.Optional[StreamWithTimestampsAudioRequestAccept]` + + Selects the audio container/codec carried inside the events when + `output_format` is not set in the request body. The selected media + type is echoed on the `Speechify-Audio-Content-Type` response + header, since the response's own Content-Type is `text/event-stream`. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## models +
client.models.list() -> ModelsResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + List the text-to-speech models available for synthesis. Drive a model + picker from this response, then pass a model `id` as the `model` + parameter to POST /v1/audio/speech or /v1/audio/stream. The response + marks the default model (used when a request omits `model`), the + routes each model may be passed to, and which voices it accepts. + Multi-speaker models arrive in a separate `dialogue_models` array + because they are valid only on POST /v1/audio/dialogue. Returns + the full set in a single response: the model catalog is static + platform reference data, so it is intentionally not paginated. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.models.list() + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## voices +
client.voices.list(...) -> ListVoicesResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Lists the voices available to the caller - the shared voice + catalog plus the cloned voices they can reach, whichever member or + service-account key created them. A clone filed under a project is + listed only for a caller who can reach that project; a clone no + project filed is shared with the whole workspace and is listed for + everyone in it. The list is paged: a request without `limit` + returns the first 50 voices, and `limit` raises that to at most + 200. Pass `cursor` from the previous response to fetch the next + page while `has_more` is true. API versions before 2026-07-16 + returned the whole catalogue when `limit` was omitted. Narrow the + list with the `type` and `locale` filters. + + A page can come back with fewer than `limit` voices, and a short + page - an empty one included - is not the end of the list. Keep + following `next_cursor` while `has_more` is true. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.voices.list( + locale="en", + model="simba-3.2", + project_id="proj_01arz3ndektsv4rrffq69g5fav", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **cursor:** `typing.Optional[str]` — Opaque pagination cursor from a previous response. + +
+
+ +
+
+ + **limit:** `typing.Optional[int]` — Max items per page (default 50, max 200). + +
+
+ +
+
+ + **type:** `typing.Optional[ListVoicesRequestType]` + + Filter by voice type: `personal` (the workspace's cloned voices) + or `shared` (the public catalogue). Omit to return both. + +
+
+ +
+
+ + **locale:** `typing.Optional[str]` + + Filter to voices whose locale matches this BCP-47 language range, + prefix-matched: `en` matches `en-US` and `en-GB`; `en-US` matches + only `en-US`. Case-insensitive. Omit to return all locales. + +
+
+ +
+
+ + **gender:** `typing.Optional[ListVoicesRequestGender]` — Filter by voice gender. Omit to return all genders. + +
+
+ +
+
+ + **model:** `typing.Optional[str]` + + Filter to voices that support this model (as listed in each voice's + `models[]`), e.g. `simba-3.2`. Omit to return voices for all models. + +
+
+ +
+
+ + **project_id:** `typing.Optional[str]` + + Filter cloned voices by workspace project: omit for every voice you + can reach, pass the literal `shared` for the clones no project + filed, or a `proj_...` id for the clones filed under that project. + The shared catalog carries no project and is returned either way. + + A clone is filed under a project when a project-pinned key created + it. A clone with no project is shared with the whole workspace + rather than sitting in a Default project, so the literal here is + `shared`, never `default` - passing `default` is a 400. Returns 404 + project_not_found for a malformed id and for any project outside + your reach: a project-pinned key reaches only its pinned project, + and a member holding project grants reaches only the granted ones. + That 404 is the same in every case and does not reveal whether such + a project exists. `shared` is always inside your reach. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.create(...) -> GetVoice +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Create a cloned voice for the workspace from a 10-30 second audio sample, with verified consent from the speaker. + + Cloning requires proof that the speaker agreed to it. Create a consent challenge with `POST /v1/voices/consent-challenges`, show the returned `phrase` to the speaker, record them reading it aloud, and send that recording here as `consent_recording` together with the challenge's `consent_challenge_id`. Speechify transcribes the recording, checks it against the phrase it issued, checks that its speaker is the speaker in your `sample`, and keeps it as the consent record for the voice. The person consenting therefore has to be the person being cloned. A challenge is single use and short-lived, so record and submit in one sitting. + + The clone belongs to the workspace rather than the member who created it, and access follows the caller's workspace role and API-key scopes exactly as for any other voice: voices scopes to list it, audio scopes to synthesize with it, and the content-management permission plus a write scope on the key to delete it. Cloned voices are usable self-serve on `simba-3.0` (and, on a workspace pinned before API version `2026-09-21`, on the retired `simba-english` and `simba-multilingual`, which from 2026-11-21 are served by our current models and still take cloned voices). `simba-3.2` and `simba-3.5` also serve cloned voices. + + The previous flow, a `consent` form field carrying the speaker's name and email as a JSON string, was switched off on 2026-09-23 for every API version: a create that sends `consent` and no `consent_challenge_id` returns 400 `consent_verification_required`. + + Voice cloning is not available in some jurisdictions. A request from one returns 403 `voice_cloning_unavailable_in_region` before consent verification runs, so it does not spend the challenge. The location is read from the IP address that sends the request, which is your server's when your backend calls the API; a location header in the request is ignored. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.voices.create( + idempotency_key="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d", + sample="example_sample", + avatar="example_avatar", + consent_recording="example_consent_recording", + name="name", + gender="male", + consent_challenge_id="consent_challenge_id", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **name:** `str` — Name of the personal voice + +
+
+ +
+
+ + **gender:** `CreateVoicesRequestGender` + + Gender marker for the personal voice + male GenderMale + female GenderFemale + not_specified GenderNotSpecified + +
+
+ +
+
+ + **sample:** `core.File` — Audio sample of the voice to clone, 10-30 seconds of clean speech. + +
+
+ +
+
+ + **consent_challenge_id:** `str` + + The `id` of the consent challenge this create consumes, from + `POST /v1/voices/consent-challenges`. Single use: once a + create has consumed it, whether or not that create + succeeded, it cannot be used again. + +
+
+ +
+
+ + **consent_recording:** `core.File` + + Recording of the speaker reading the challenge's `phrase` + aloud. This is the consent record for the voice, not a + second voice sample: it must be the same person as in + `sample`, and it is retained as evidence. 5-30 seconds, at + most 25 MB, in any common audio container. + +
+
+ +
+
+ + **idempotency_key:** `typing.Optional[str]` + + A client-generated key (an opaque string, max 255 chars) that makes a + side-effect POST safe to retry: the server runs the operation exactly + once and replays the first response (its status and body) for 24 hours. + Reusing a key with a different request body, or while the first request + is still in flight, returns `409 idempotency_conflict`. A replayed + response carries the `Idempotent-Replayed: true` header. + +
+
+ +
+
+ + **locale:** `typing.Optional[str]` — Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.) + +
+
+ +
+
+ + **avatar:** `typing.Optional[core.File]` — Avatar image file + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.get(...) -> GetVoice +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Fetch a single voice by id - a shared catalogue voice or one of + the workspace's cloned voices. A cloned voice that belongs to + another workspace returns 404, identical to an unknown id, so + voice inventory is never enumerable across tenants. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.voices.get( + voice_id="voice_id", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **voice_id:** `str` — The ID of the voice to fetch + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.delete(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Delete one of the workspace's cloned voices. Requires the + `content.manage` permission (owner, admin, or member); a + service-account key is authorized by its scopes instead. + + A voice that is also a member's personal voice (one cloned + before workspaces owned voices and adopted into this workspace) + is removed from the workspace only; the person keeps it. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.voices.delete( + voice_id="voice_id", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **voice_id:** `str` — The ID of the voice to delete + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.download_sample(...) -> typing.Iterator[bytes] +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Download a personal (cloned) voice sample +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.voices.download_sample( + voice_id="voice_id", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **voice_id:** `str` — The ID of the voice to download sample for + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## projects +
client.projects.list(...) -> ListProjectsResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + List the workspace's projects, newest first. The implicit Default + project is not a row and is never listed; resources with no + `project_id` live in it. Archived projects are hidden unless + `include_archived=true`, and purged ones unless + `include_purged=true`. Cursor-paginated: omit `cursor` for the + first page; walk pages while `has_more` is true (default page size + 50, max 200). +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.list() + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **cursor:** `typing.Optional[str]` — Opaque pagination cursor from a previous response. + +
+
+ +
+
+ + **limit:** `typing.Optional[int]` — Max items per page (default 50, max 200). + +
+
+ +
+
+ + **include_archived:** `typing.Optional[bool]` + + Include archived projects. Defaults to `false`, so the list shows + only live projects; archived ones stay readable by id. + +
+
+ +
+
+ + **include_purged:** `typing.Optional[bool]` + + Include purged projects that are still inside their 30-day restore + window, each carrying the `purged_at` stamp its deadline is + measured from. Defaults to `false`, so the list shows only projects + that still exist. This is the only read that returns a purged + project: the by-id read answers 404 for one, and a project past its + window is never listed, because it is awaiting permanent deletion + and a restore would refuse it. Independent of `include_archived`: + a purge runs only from the archived state, so asking for purged + projects never means asking for every archived one as well. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.create(...) -> Project +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Create a project in the caller's workspace. Names are unique per + workspace (case-insensitive). A workspace holds at most 100 live + projects; at the cap the create refuses with + `409 project_limit_reached` until one is deleted. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.create( + name="Production", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **name:** `str` + + Project name; unique per workspace (case-insensitive), + surrounding whitespace is trimmed. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.get(...) -> Project +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Fetch one project by id, scoped to the caller's workspace. Returns + 404 for missing or foreign-workspace projects — project existence + is never leaked across workspaces. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.get( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.delete(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Delete a project. With no body it deletes a project that holds + nothing, and refuses one that does; `mode` is how you say what + should happen to what it holds. + + **Empty** (no body): the project is removed only while it holds no + resources. A project that holds any is refused with 409 + `project_not_empty`, and the refusal enumerates what is inside: + `error.details.resource_count` is the total, and + `error.details.contents` names each kind with a count and up to five + names. Every project row also carries that total as + `resource_count`, so an application can find the projects it may + delete in one list call. Records of work never hold a project open + and are not counted. + + **Detach** (`mode: detach`): only the grouping row is removed; every + resource in the project moves to the implicit Default project, where + it stays readable and is listed by `?project_id=default`. Refused + with 409 `project_has_scoped_credentials` while an API key, service + account, vault credential, webhook endpoint, member grant or pending + invite is scoped to the project, because detaching any of those + would silently widen it. + + **Purge** (`mode: purge` with `confirm` equal to the project's + name): available only on an ARCHIVED project, because a teardown + needs a state you can sit in and reverse first; a live project is + refused with the coded `409 project_not_archived`. Archive the + project, confirm it is the one you mean, then purge. The project is + removed WITH its contents in one transaction: the resources it holds + and its scoped webhook endpoints and vault credentials are deleted, + API keys and service accounts pinned to the project are revoked, and + member grants and pending-invite scopes on the project are cleared. + Resources with a lifecycle and a delete of their own, such as + stores, hosted APIs and files, are not removed: they move to the + Default project, and because they do hold a project open, an + unqualified delete refuses while any of them is in the project. + Refused with 409 while a resource that must be released first is + still attached (the refusal names it), while a member's only project + grant is this one, or while a live invite carries only this project + (clearing either would widen that person to the whole workspace, the + invite one acceptance earlier). + + **A purge is recoverable for 30 days.** The project disappears from + every list and read immediately, and its name is freed for reuse, + but the project and its resources are kept and permanently deleted + only once the window closes. `POST + /v1/projects/{project_id}/restore` brings the project and its + resources back inside that window; the credentials the purge revoked + and the grants it cleared stay that way. + + The 409 carries the blockers under `error.details.blockers` (`kind`, + typed `id`, `name`, and the `blocks` modes each refuses), their + total under `error.details.blocker_count`, and, for existing + clients, the same rows under `error.details.credentials`. The lists + are capped at 50 rows; the counts are not, and the refusal is + decided on the count. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.delete( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + mode="purge", + confirm="Staging", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **mode:** `typing.Optional[DeleteProjectRequestMode]` + + `detach` removes the grouping row only and moves every resource + to the Default project; `purge` removes the project with its + contents. Omitted, the delete removes only an empty project. + +
+
+ +
+
+ + **confirm:** `typing.Optional[str]` + + Required for `purge`: the project's name, exactly as returned by + GET. A mismatch answers 400 `validation_failed` naming this field. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.update(...) -> Project +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Edit a project in place - its name, its monthly spend limit, or its + capacity ceilings - keeping the same id so every grouped resource + follows the edit with no re-pointing. Names are unique per + workspace (case-insensitive). The limit fields require + `billing.manage`; a capacity ceiling above the workspace's own is + refused, since it could never apply. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.update( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **max_requests_per_minute:** `typing.Optional[int]` + + Sets the project's request-rate ceiling in requests per + minute; `null` removes it. Must be a positive integer at or + below the workspace's widest per-surface request rate over a + minute, otherwise the request is refused with + `400 validation_failed` naming the field and the ceiling. + Requires the `billing.manage` permission. Takes effect on the + next request from a credential pinned to the project. + +
+
+ +
+
+ + **name:** `typing.Optional[str]` + + New project name; unique per workspace (case-insensitive), + surrounding whitespace is trimmed. + +
+
+ +
+
+ + **monthly_budget:** `typing.Optional[float]` + + Edits the project's MONTHLY spend limit in US dollars: omit to + leave it unchanged, send a positive value to set or change it, or + an explicit `0` to remove it. Amounts are whole cents written as a + plain decimal; a finer value, or exponent notation, is refused + rather than rounded. Requires the + `billing.manage` + permission (owners/admins), like the workspace budget — a + spend ceiling is a billing control, not a grouping edit. Once the + project's billed spend within the current calendar month (UTC) + reaches the limit, new billable work attributed to that project is + refused with the coded `402 project_spend_limit_exceeded` until + the month resets or the limit is raised. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.archive(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Archive a project. From then on nothing new starts or bills inside + it: requests on a credential pinned to the project, and every new + piece of work attributed to it, are refused with the coded `409 + project_archived`. Work already in flight is left to finish. + Everything in the project stays readable and its configuration stays + editable, and the project still answers by id. + + Idempotent: archiving an archived project is a no-op. Reverse it + with the unarchive operation. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.archive( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.unarchive(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Lift a project's archive so work and spend resume inside it. + Idempotent: unarchiving a live project is a no-op. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.unarchive( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.restore(...) -> ProjectRestore +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Walk back a purge. A purged project is recoverable for 30 days: its + row and its contents are kept, hidden from every list and read, and + permanently deleted only once the window expires. + + **What comes back:** the project and exactly the resources the purge + removed. A resource you had deleted yourself before the purge stays + deleted. + + **What does NOT come back, on purpose:** every credential the purge + revoked stays revoked, and every grant it cleared stays cleared. API + keys and service accounts pinned to the project are not re-issued, + vault credentials and webhook endpoints scoped to it are not + undeleted, and member grants and pending-invite scopes are not + restored. Bringing a credential or a grant back would re-grant + access somebody deliberately ended, so the restore reports them + under `still_revoked` instead. Re-create the credentials and + re-grant the members the project still needs. + + The project returns ARCHIVED, the state it was purged from, so + nothing dispatches or bills inside it until you unarchive it. + + Refused with `409 project_not_purged` when the project was never + purged, `409 project_restore_window_expired` once the 30 days have + passed, and `409 project_name_taken` when another project has taken + this one's name since the purge (a purge frees the name immediately + - rename the project holding it, then restore). +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.restore( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.audit(...) -> ProjectAuditResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Who changed this project's access or its lifecycle state, and when. + Newest first. Covers the last 90 days; paginate by passing `cursor` + from the previous response. + + Each entry names the SUBJECT (whose access changed) and the ACTOR (who + changed it), with the role the actor held at the time. When a change + was made by Speechify support acting on the workspace's behalf, the + entry also carries that admin's email, so a support-initiated change + never reads as one a colleague made. + + Requires `members.manage_project_scope` (owner or admin): who widened + a member's access is a stronger fact than who currently holds it. + Returns 404 for missing or foreign-workspace projects. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.audit( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project id (prefixed external id, `proj_...`). + +
+
+ +
+
+ + **cursor:** `typing.Optional[str]` — Opaque pagination cursor from a previous response. + +
+
+ +
+
+ + **limit:** `typing.Optional[int]` — Max items per page (default 50, max 200). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.list_members(...) -> ProjectMembersResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + List the workspace members granted access to this project, oldest + grant first. Paginate by passing `cursor` from the previous response. + + A member with no grants anywhere is workspace-wide and does not appear + here: this lists people who have been narrowed to specific projects, + not everyone who can reach this one. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.list_members( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project ID. + +
+
+ +
+
+ + **cursor:** `typing.Optional[str]` — Opaque pagination cursor from a previous response. + +
+
+ +
+
+ + **limit:** `typing.Optional[int]` — Max items per page (default 50, max 200). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.grant_member(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Grant a workspace member access to this project. Once a member holds + any grant, they see and touch only the projects they have been granted. + + Requires `members.manage_project_scope` (owner or admin). An owner or + billing admin cannot be scoped: both already hold workspace-wide access + that a project scope would contradict without restricting anything. + Idempotent: granting a project the member already holds is a no-op. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.grant_member( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + user_id="user_kb3fim3yjnyto3kxli4g4ysdmyzgiuttjrudswlkgbawk", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project ID. + +
+
+ +
+
+ + **user_id:** `str` — The prefixed user id of the workspace member to grant. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.projects.revoke_member(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Remove a member's access to this project. + + A member who loses their last grant is not locked out - they return + to workspace-wide access, because holding no grants is the unrestricted + state. To restrict someone, grant them the projects they should keep + rather than revoking everything. Requires `members.manage_project_scope`. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.projects.revoke_member( + project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", + user_id="user_kb3fim3yjnyto3kxli4g4ysdmyzgiuttjrudswlkgbawk", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **project_id:** `str` — Project ID. + +
+
+ +
+
+ + **user_id:** `str` — The member's prefixed user id, as returned by the members list. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## workspaces +
client.workspaces.get_entitlements() -> EntitlementsResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + The per-tier entitlements catalog plus the caller's RESOLVED + entitlements for the current workspace (tier defaults composed with + any per-tenant override). Readable with an API key as well as a + console session: it is how an integration learns what it may use + before a feature endpoint answers `402`. Branch on + `current.voice_cloning` and `current.hosted_apis_access`, and size + traffic from + `current.tts_requests_per_second` and `current.tts_concurrency`. The + console renders quota affordances and upgrade-card limits from the + same single server-authoritative source instead of a hardcoded + mirror. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.workspaces.get_entitlements() + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## Audio Watermark +
client.audio.watermark.detect(...) -> WatermarkDetectionResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Check whether a clip carries the watermark Speechify seals into audio it + generates. Upload the audio as `audio`; nothing about it is stored, and + no voice is read or written. + + Read the answer carefully in one direction. A `watermarked: true` is + positive evidence that the audio came from Speechify synthesis. A + `watermarked: false` is NOT proof that it did not: only models + redeployed since the watermark shipped mark their output, the detector + needs at least three seconds of clear speech to judge, and re-encoding + or changing the speed of a clip degrades the mark. Treat a negative as + the absence of evidence rather than as evidence of absence. + + Checks are rate-limited well below the synthesis budget: this is a + forensic question, not a data-plane call. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.audio.watermark.detect( + audio="example_audio", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **audio:** `core.File` + + The clip to check, at most 25MB. Give the detector at least + three seconds of clear speech; below that its confidence is + not worth acting on, and below half a second it always + reports zero. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio.watermark.verify(...) -> WatermarkVerificationResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + The public AI detection tool. Ask whether a clip carries the watermark + Speechify seals into audio it generates, with no account, no API key and + no credential of any kind. + + `verify` answers; `detect` measures. This route returns a bare yes or no, + the way verifying a signature does. Its sibling + `POST /v1/audio/watermark/detect` takes an API key and returns the + detector's confidence alongside the verdict. + + This is the programmatic half of the tool published at + , and it exists so the tool can be invoked + without visiting our website, as California's AI Transparency Act + (BPC 22757.2) requires. Nothing about the clip is stored, and nothing + identifying about you is collected or retained. + + The answer is a bare verdict. `watermarked: true` is positive evidence + that the audio came from Speechify synthesis. `watermarked: false` is + NOT proof that it did not: only models redeployed since the watermark + shipped mark their output, the detector needs at least three seconds of + clear speech to judge, and re-encoding or changing the speed of a clip + degrades the mark. Treat a negative as the absence of evidence rather + than as evidence of absence. + + Because the tool takes no credential, it is rate-limited per client + address and shares a platform-wide budget: expect a 429 under sustained + automated use, and retry after the interval the response advertises. + Use `POST /v1/audio/watermark/detect` with an API key for the detector's + confidence score and a per-workspace allowance of its own. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.audio.watermark.verify( + audio="example_audio", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **audio:** `core.File` + + The clip to check, at most 25MB. Give the detector at least + three seconds of clear speech; below that its answer is not + worth acting on. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## Voices ConsentChallenges +
client.voices.consent_challenges.create(...) -> ConsentChallenge +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Start the consent check for a voice clone. + + Returns a `phrase` for the speaker to read aloud and an `id` that identifies this challenge. Show the phrase to the speaker exactly as returned, record them reading it, then send the recording and the `id` to `POST /v1/voices`, which verifies the recording against the phrase and against the voice sample being cloned, then keeps it as the consent record. + + A challenge is single use, is bound to the workspace that created it, and expires at `expires_at` - it is proof that a speaker was in front of a microphone just now, so create it when you are ready to record, not at the start of your flow. If it expires, create another one and record again. + + Challenge creation is rate limited per workspace at a few dozen per hour, far more tightly than the rest of the voice surface, because each one precedes a person recording themselves - mint it when your speaker is ready, not speculatively. Read the live ceiling off `RateLimit-*` rather than hard-coding it. **On a `429`, always honour `Retry-After` rather than a fixed backoff of your own**: the wait is measured in minutes and can run to most of an hour. `RateLimit-*` are omitted rather than reporting a bucket that is not the one refusing. + + Like `POST /v1/voices`, a challenge requested from a jurisdiction where voice cloning is not available returns 403 `voice_cloning_unavailable_in_region` and issues no phrase. The location is read from the IP address that sends the request, which is your server's when your backend calls the API. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.voices.consent_challenges.create( + idempotency_key="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d", + full_name="Jane Doe", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **full_name:** `str` + + Full name of the person consenting to have their voice cloned. + Speechify binds it to the challenge and stores it with the consent + record, so the create that consumes the challenge does not carry it + and cannot change it. + + At most 120 bytes once UTF-8 encoded, which is 120 characters of + Latin script but around 40 of Chinese, Japanese or Korean. Stated in + bytes rather than as a `maxLength` because the two only agree on + single-byte scripts, and a character count that never over-accepts + would have to refuse Latin names at 30. A name over the limit comes + back as `validation_failed` reporting its measured length. + +
+
+ +
+
+ + **idempotency_key:** `typing.Optional[str]` + + A client-generated key (an opaque string, max 255 chars) that makes a + side-effect POST safe to retry: the server runs the operation exactly + once and replays the first response (its status and body) for 24 hours. + Reusing a key with a different request body, or while the first request + is still in flight, returns `409 idempotency_conflict`. A replayed + response carries the `Idempotent-Replayed: true` header. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + ## Webhooks Endpoints +
client.webhooks.endpoints.list(...) -> ListWebhookEndpointsResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + The caller's workspace's registered webhook endpoints. Cursor-paginated: + omit `cursor` for the first page; walk pages while `has_more` is true + (default page size 50, max 200). The signing `secret` is never returned + here — it is shown only when an endpoint is created or its secret is + rotated. Filter by delivery scope with `project_id`. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.list( + project_id="proj_01arz3ndektsv4rrffq69g5fav", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **cursor:** `typing.Optional[str]` — Opaque pagination cursor from a previous response. + +
+
+ +
+
+ + **limit:** `typing.Optional[int]` — Max items per page (default 50, max 200). + +
+
+ +
+
+ + **project_id:** `typing.Optional[str]` + + Filter endpoints by project scope: omit for everything the caller + may see, pass the literal `shared` for workspace-wide endpoints + only, or a `proj_...` id for endpoints scoped to that project. + Endpoints have no Default project - a null `project_id` means + workspace-wide, so the literal here is `shared`, never `default`. + Returns 404 project_not_found for a malformed id and for any + project outside your reach: a project-pinned API key or + service-account key reaches only its pinned project, and a member + holding project grants reaches only the granted projects. That 404 + is the same in every case and does not reveal whether such a + project exists - outside your reach a project is answered as + nonexistent, never as forbidden. `shared` is always inside your + reach. Inside it, a well-formed id that matches nothing yields an + empty page. + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.endpoints.create(...) -> WebhookEndpoint +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Register a webhook endpoint. Speechify mints an HMAC signing secret + and returns it in the response `secret` field — exactly once. Store it + then; subsequent reads omit it (rotate it with the rotate-secret action + if lost). Select events via `enabled_events`: a list of catalog event + names or `["*"]` for every event. Optionally scope delivery to one + project with `project_id`; omit it for a workspace-wide endpoint that + receives every project's events. Limited to 50 endpoints per workspace. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.create( + url="https://example.com/speechify/webhooks", + enabled_events=[ + "project.spend_budget.warning" + ], + description="Example description.", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **url:** `str` + + HTTPS destination for event deliveries. Must be a publicly + reachable host: loopback, private, link-local, and cloud-metadata + addresses (and reserved hostnames like `localhost`) are rejected. + +
+
+ +
+
+ + **enabled_events:** `typing.List[str]` — Catalog event names to subscribe to, or `["*"]` for all events. + +
+
+ +
+
+ + **project_id:** `typing.Optional[str]` + + Optionally scope the endpoint to one project (prefixed + `proj_...` id): a scoped endpoint receives only that project's + events. Omit (or null) for workspace-wide - it receives every + project's events. An unknown id returns 404 project_not_found. + A project-pinned API key creates into its own project and + cannot name the workspace-wide tier. + +
+
+ +
+
+ + **include:** `typing.Optional[typing.List[str]]` + + Optional payload-shaping keys (see `WebhookEndpoint.include`). + Omit for the lean default. + +
+
+ +
+
+ + **api_version:** `typing.Optional[datetime.date]` + + Optionally pin the endpoint's payload shape to a dated version + (`YYYY-MM-DD`, see `WebhookEndpoint.api_version`). Omit to use the + workspace's current version. An unknown version is rejected. + +
+
+ +
+
+ + **description:** `typing.Optional[str]` + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.endpoints.get(...) -> WebhookEndpoint +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Fetch a webhook endpoint by id. The signing secret is never returned. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.get( + webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **webhook_endpoint_id:** `str` — Webhook endpoint id (prefixed `whe_…`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.endpoints.delete(...) +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Delete a webhook endpoint. In-flight deliveries stop; returns 204 on success. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.delete( + webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **webhook_endpoint_id:** `str` — Webhook endpoint id (prefixed `whe_…`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.endpoints.update(...) -> WebhookEndpoint +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Partial update; omitted fields are left unchanged. Set `disabled` to pause delivery without deleting the endpoint. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.update( + webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", + url="https://example.com/webhook", + enabled_events=[ + "example" + ], + description="Example description.", + disabled=False, + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **webhook_endpoint_id:** `str` — Webhook endpoint id (prefixed `whe_…`). + +
+
+ +
+
+ + **url:** `typing.Optional[str]` + + HTTPS destination for event deliveries. Must be a publicly + reachable host: loopback, private, link-local, and cloud-metadata + addresses (and reserved hostnames like `localhost`) are rejected. + +
+
+ +
+
+ + **project_id:** `typing.Optional[str]` + + Re-scope the endpoint: a `proj_...` id narrows it to that + project's events, an explicit null makes it workspace-wide + (every project's events), omitted leaves it unchanged. The + signing secret and delivery history are untouched, so + re-scoping never requires redeploying your receiver. An + unknown id returns 404 project_not_found. A project-pinned API + key may only scope an endpoint to its own project. + +
+
+ +
+
+ + **enabled_events:** `typing.Optional[typing.List[str]]` + +
+
+ +
+
+ + **include:** `typing.Optional[typing.List[str]]` + + Payload-shaping keys (see `WebhookEndpoint.include`). Send `[]` to + clear back to the lean default. + +
+
+ +
+
+ + **api_version:** `typing.Optional[datetime.date]` + + Opt the endpoint into a different (typically newer) payload shape + (`YYYY-MM-DD`, see `WebhookEndpoint.api_version`). Omit to leave it + unchanged. An unknown version is rejected. + +
+
+ +
+
+ + **description:** `typing.Optional[str]` + +
+
+ +
+
+ + **disabled:** `typing.Optional[bool]` + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.endpoints.rotate_secret(...) -> WebhookEndpoint +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Mint a new HMAC signing secret for the endpoint and return it in the + response `secret` field (shown exactly once). The previous secret stops + signing immediately, so accept both during your cutover window. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.rotate_secret( + webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **webhook_endpoint_id:** `str` — Webhook endpoint id (prefixed `whe_…`). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.endpoints.list_deliveries(...) -> ListWebhookEndpointDeliveriesResponse +
+
+ + #### 📝 Description + +
+
+ +
+
+ + Delivery attempts for one webhook endpoint, newest first. One row per + (endpoint, event, resource), updated in place across retries. Each row + includes the exact request payload and signed headers Speechify sent + (`request_body`, `request_headers`) and the response your server returned + (`last_status_code`, `last_response_body`, `last_response_headers`), so + you can verify the signature and debug failures. Cursor-paginated: omit + `cursor` for the first page; walk pages while `has_more` is true (default + page size 50, max 200). + + An endpoint that was not a target of an event has no row for it: a + project-scoped endpoint records nothing for another project's events. + An empty list therefore means either nothing matched or nothing + happened. To tell them apart, check the project's own activity first: + activity there with no delivery here is a defect to report; none there + means there was nothing to deliver. +
+
+
+
+ + #### 🔌 Usage + +
+
+ +
+
+ + ```python + from speechify import Speechify + from speechify.environment import SpeechifyEnvironment + + client = Speechify( + token="", + environment=SpeechifyEnvironment.DEFAULT, + ) + + client.webhooks.endpoints.list_deliveries( + webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", + ) + + ``` +
+
+
+
+ + #### ⚙️ Parameters + +
+
+ +
+
+ + **webhook_endpoint_id:** `str` — Webhook endpoint id (prefixed `whe_…`). + +
+
+ +
+
+ + **cursor:** `typing.Optional[str]` — Opaque pagination cursor from a previous response. + +
+
+ +
+
+ + **limit:** `typing.Optional[int]` — Max items per page (default 50, max 200). + +
+
+ +
+
+ + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ + status: unresolved