speechify-api 1.2.1__tar.gz → 1.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {speechify_api-1.2.1 → speechify_api-1.2.3}/PKG-INFO +18 -4
- {speechify_api-1.2.1 → speechify_api-1.2.3}/README.md +17 -3
- {speechify_api-1.2.1 → speechify_api-1.2.3}/pyproject.toml +3 -3
- {speechify_api-1.2.1/src/speechify/tts/audio → speechify_api-1.2.3/src/speechify/api}/types/audio_stream_request_accept.py +1 -1
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/client_wrapper.py +1 -1
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/environment.py +1 -1
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/__init__.py +0 -6
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/audio/client.py +53 -12
- {speechify_api-1.2.1/src/speechify/api → speechify_api-1.2.3/src/speechify/tts/audio}/types/audio_stream_request_accept.py +1 -1
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/audio/types/get_speech_request_audio_format.py +1 -1
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/auth/client.py +21 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/__init__.py +0 -6
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_speech_response_audio_format.py +1 -1
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/voices/client.py +61 -1
- speechify_api-1.2.1/src/speechify/tts/types/experimental_stream_request.py +0 -49
- speechify_api-1.2.1/src/speechify/tts/types/experimental_stream_request_model.py +0 -7
- speechify_api-1.2.1/src/speechify/tts/types/experimental_stream_response.py +0 -33
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/api/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/api/types/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/client.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/api_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/datetime_utils.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/file.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/http_client.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/jsonable_encoder.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/pydantic_utilities.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/query_encoder.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/remove_none_from_dict.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/request_options.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/core/serialization.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/py.typed +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/audio/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/audio/types/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/audio/types/get_speech_request_model.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/audio/types/get_stream_request_model.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/auth/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/auth/types/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/auth/types/create_access_token_request_scope.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/client.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/bad_request_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/forbidden_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/internal_server_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/not_found_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/payment_required_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/unauthorized_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/access_token.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/access_token_scope.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/api_key.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/create_voice_language.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/create_voice_model.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/create_voice_model_name.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/created_voice.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/created_voice_gender.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/created_voice_type.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_speech_options_request.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_speech_response.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_stream_options_request.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voice.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voice_gender.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voice_language.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voice_type.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voices_model.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voices_model_name.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/nested_chunk.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/o_auth_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/o_auth_error_error.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/speech_marks.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/voices/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/voices/types/__init__.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/voices/types/voices_create_request_gender.py +0 -0
- {speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: speechify-api
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: Official Speechify API SDK
|
|
5
5
|
Keywords: speechify,ai,api,sdk,text-to-speech,tts
|
|
6
6
|
Author: Speechify
|
|
@@ -32,11 +32,25 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fspeechifyinc%2Fspeechify-api-sdk-python)
|
|
33
33
|
[](https://pypi.python.org/pypi/speechify-api)
|
|
34
34
|
|
|
35
|
-
The Speechifyinc Python library provides convenient access to the Speechifyinc
|
|
35
|
+
The Speechifyinc Python library provides convenient access to the Speechifyinc APIs from Python.
|
|
36
|
+
|
|
37
|
+
## Table of Contents
|
|
38
|
+
|
|
39
|
+
- [Documentation](#documentation)
|
|
40
|
+
- [Installation](#installation)
|
|
41
|
+
- [Reference](#reference)
|
|
42
|
+
- [Usage](#usage)
|
|
43
|
+
- [Async Client](#async-client)
|
|
44
|
+
- [Exception Handling](#exception-handling)
|
|
45
|
+
- [Advanced](#advanced)
|
|
46
|
+
- [Retries](#retries)
|
|
47
|
+
- [Timeouts](#timeouts)
|
|
48
|
+
- [Custom Client](#custom-client)
|
|
49
|
+
- [Contributing](#contributing)
|
|
36
50
|
|
|
37
51
|
## Documentation
|
|
38
52
|
|
|
39
|
-
API reference documentation is available [here](https://docs.
|
|
53
|
+
API reference documentation is available [here](https://docs.speechify.ai/api-reference).
|
|
40
54
|
|
|
41
55
|
## Installation
|
|
42
56
|
|
|
@@ -46,7 +60,7 @@ pip install speechify-api
|
|
|
46
60
|
|
|
47
61
|
## Reference
|
|
48
62
|
|
|
49
|
-
A full reference for this library is available [here](
|
|
63
|
+
A full reference for this library is available [here](https://github.com/speechifyinc/speechify-api-sdk-python/blob/HEAD/./reference.md).
|
|
50
64
|
|
|
51
65
|
## Usage
|
|
52
66
|
|
|
@@ -3,11 +3,25 @@
|
|
|
3
3
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fspeechifyinc%2Fspeechify-api-sdk-python)
|
|
4
4
|
[](https://pypi.python.org/pypi/speechify-api)
|
|
5
5
|
|
|
6
|
-
The Speechifyinc Python library provides convenient access to the Speechifyinc
|
|
6
|
+
The Speechifyinc Python library provides convenient access to the Speechifyinc APIs from Python.
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Documentation](#documentation)
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Reference](#reference)
|
|
13
|
+
- [Usage](#usage)
|
|
14
|
+
- [Async Client](#async-client)
|
|
15
|
+
- [Exception Handling](#exception-handling)
|
|
16
|
+
- [Advanced](#advanced)
|
|
17
|
+
- [Retries](#retries)
|
|
18
|
+
- [Timeouts](#timeouts)
|
|
19
|
+
- [Custom Client](#custom-client)
|
|
20
|
+
- [Contributing](#contributing)
|
|
7
21
|
|
|
8
22
|
## Documentation
|
|
9
23
|
|
|
10
|
-
API reference documentation is available [here](https://docs.
|
|
24
|
+
API reference documentation is available [here](https://docs.speechify.ai/api-reference).
|
|
11
25
|
|
|
12
26
|
## Installation
|
|
13
27
|
|
|
@@ -17,7 +31,7 @@ pip install speechify-api
|
|
|
17
31
|
|
|
18
32
|
## Reference
|
|
19
33
|
|
|
20
|
-
A full reference for this library is available [here](
|
|
34
|
+
A full reference for this library is available [here](https://github.com/speechifyinc/speechify-api-sdk-python/blob/HEAD/./reference.md).
|
|
21
35
|
|
|
22
36
|
## Usage
|
|
23
37
|
|
|
@@ -3,7 +3,7 @@ name = "speechify-api"
|
|
|
3
3
|
|
|
4
4
|
[tool.poetry]
|
|
5
5
|
name = "speechify-api"
|
|
6
|
-
version = "1.2.
|
|
6
|
+
version = "1.2.3"
|
|
7
7
|
description = "Official Speechify API SDK"
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
authors = [
|
|
@@ -40,8 +40,8 @@ packages = [
|
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
[project.urls]
|
|
43
|
-
Documentation = 'https://docs.
|
|
44
|
-
Homepage = 'https://docs.
|
|
43
|
+
Documentation = 'https://docs.speechify.ai/api-reference'
|
|
44
|
+
Homepage = 'https://docs.speechify.ai'
|
|
45
45
|
Repository = 'https://github.com/speechifyinc/speechify-api-sdk-python'
|
|
46
46
|
|
|
47
47
|
[tool.poetry.dependencies]
|
|
@@ -22,7 +22,7 @@ class BaseClientWrapper:
|
|
|
22
22
|
headers: typing.Dict[str, str] = {
|
|
23
23
|
"X-Fern-Language": "Python",
|
|
24
24
|
"X-Fern-SDK-Name": "speechify-api",
|
|
25
|
-
"X-Fern-SDK-Version": "1.2.
|
|
25
|
+
"X-Fern-SDK-Version": "1.2.3",
|
|
26
26
|
}
|
|
27
27
|
headers["Authorization"] = f"Bearer {self._get_token()}"
|
|
28
28
|
return headers
|
|
@@ -10,9 +10,6 @@ from .types import (
|
|
|
10
10
|
CreatedVoice,
|
|
11
11
|
CreatedVoiceGender,
|
|
12
12
|
CreatedVoiceType,
|
|
13
|
-
ExperimentalStreamRequest,
|
|
14
|
-
ExperimentalStreamRequestModel,
|
|
15
|
-
ExperimentalStreamResponse,
|
|
16
13
|
GetSpeechOptionsRequest,
|
|
17
14
|
GetSpeechResponse,
|
|
18
15
|
GetSpeechResponseAudioFormat,
|
|
@@ -54,9 +51,6 @@ __all__ = [
|
|
|
54
51
|
"CreatedVoice",
|
|
55
52
|
"CreatedVoiceGender",
|
|
56
53
|
"CreatedVoiceType",
|
|
57
|
-
"ExperimentalStreamRequest",
|
|
58
|
-
"ExperimentalStreamRequestModel",
|
|
59
|
-
"ExperimentalStreamResponse",
|
|
60
54
|
"ForbiddenError",
|
|
61
55
|
"GetSpeechOptionsRequest",
|
|
62
56
|
"GetSpeechRequestAudioFormat",
|
|
@@ -10,6 +10,7 @@ from ..types.get_speech_response import GetSpeechResponse
|
|
|
10
10
|
from ...core.serialization import convert_and_respect_annotation_metadata
|
|
11
11
|
from ...core.pydantic_utilities import parse_obj_as
|
|
12
12
|
from ..errors.bad_request_error import BadRequestError
|
|
13
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
13
14
|
from ..errors.payment_required_error import PaymentRequiredError
|
|
14
15
|
from ..errors.forbidden_error import ForbiddenError
|
|
15
16
|
from ..errors.internal_server_error import InternalServerError
|
|
@@ -46,8 +47,8 @@ class AudioClient:
|
|
|
46
47
|
----------
|
|
47
48
|
input : str
|
|
48
49
|
Plain text or SSML to be synthesized to speech.
|
|
49
|
-
Refer to https://docs.
|
|
50
|
-
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.
|
|
50
|
+
Refer to https://docs.speechify.ai/docs/api-limits for the input size limits.
|
|
51
|
+
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody
|
|
51
52
|
|
|
52
53
|
voice_id : str
|
|
53
54
|
Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices
|
|
@@ -57,7 +58,7 @@ class AudioClient:
|
|
|
57
58
|
|
|
58
59
|
language : typing.Optional[str]
|
|
59
60
|
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.
|
|
60
|
-
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.
|
|
61
|
+
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.
|
|
61
62
|
|
|
62
63
|
model : typing.Optional[GetSpeechRequestModel]
|
|
63
64
|
Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
|
|
@@ -122,6 +123,16 @@ class AudioClient:
|
|
|
122
123
|
),
|
|
123
124
|
)
|
|
124
125
|
)
|
|
126
|
+
if _response.status_code == 401:
|
|
127
|
+
raise UnauthorizedError(
|
|
128
|
+
typing.cast(
|
|
129
|
+
typing.Optional[typing.Any],
|
|
130
|
+
parse_obj_as(
|
|
131
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
132
|
+
object_=_response.json(),
|
|
133
|
+
),
|
|
134
|
+
)
|
|
135
|
+
)
|
|
125
136
|
if _response.status_code == 402:
|
|
126
137
|
raise PaymentRequiredError(
|
|
127
138
|
typing.cast(
|
|
@@ -177,15 +188,15 @@ class AudioClient:
|
|
|
177
188
|
|
|
178
189
|
input : str
|
|
179
190
|
Plain text or SSML to be synthesized to speech.
|
|
180
|
-
Refer to https://docs.
|
|
181
|
-
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.
|
|
191
|
+
Refer to https://docs.speechify.ai/docs/api-limits for the input size limits.
|
|
192
|
+
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody
|
|
182
193
|
|
|
183
194
|
voice_id : str
|
|
184
195
|
Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices
|
|
185
196
|
|
|
186
197
|
language : typing.Optional[str]
|
|
187
198
|
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.
|
|
188
|
-
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.
|
|
199
|
+
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.
|
|
189
200
|
|
|
190
201
|
model : typing.Optional[GetStreamRequestModel]
|
|
191
202
|
Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
|
|
@@ -236,6 +247,16 @@ class AudioClient:
|
|
|
236
247
|
),
|
|
237
248
|
)
|
|
238
249
|
)
|
|
250
|
+
if _response.status_code == 401:
|
|
251
|
+
raise UnauthorizedError(
|
|
252
|
+
typing.cast(
|
|
253
|
+
typing.Optional[typing.Any],
|
|
254
|
+
parse_obj_as(
|
|
255
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
256
|
+
object_=_response.json(),
|
|
257
|
+
),
|
|
258
|
+
)
|
|
259
|
+
)
|
|
239
260
|
if _response.status_code == 402:
|
|
240
261
|
raise PaymentRequiredError(
|
|
241
262
|
typing.cast(
|
|
@@ -294,8 +315,8 @@ class AsyncAudioClient:
|
|
|
294
315
|
----------
|
|
295
316
|
input : str
|
|
296
317
|
Plain text or SSML to be synthesized to speech.
|
|
297
|
-
Refer to https://docs.
|
|
298
|
-
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.
|
|
318
|
+
Refer to https://docs.speechify.ai/docs/api-limits for the input size limits.
|
|
319
|
+
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody
|
|
299
320
|
|
|
300
321
|
voice_id : str
|
|
301
322
|
Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices
|
|
@@ -305,7 +326,7 @@ class AsyncAudioClient:
|
|
|
305
326
|
|
|
306
327
|
language : typing.Optional[str]
|
|
307
328
|
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.
|
|
308
|
-
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.
|
|
329
|
+
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.
|
|
309
330
|
|
|
310
331
|
model : typing.Optional[GetSpeechRequestModel]
|
|
311
332
|
Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
|
|
@@ -378,6 +399,16 @@ class AsyncAudioClient:
|
|
|
378
399
|
),
|
|
379
400
|
)
|
|
380
401
|
)
|
|
402
|
+
if _response.status_code == 401:
|
|
403
|
+
raise UnauthorizedError(
|
|
404
|
+
typing.cast(
|
|
405
|
+
typing.Optional[typing.Any],
|
|
406
|
+
parse_obj_as(
|
|
407
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
408
|
+
object_=_response.json(),
|
|
409
|
+
),
|
|
410
|
+
)
|
|
411
|
+
)
|
|
381
412
|
if _response.status_code == 402:
|
|
382
413
|
raise PaymentRequiredError(
|
|
383
414
|
typing.cast(
|
|
@@ -433,15 +464,15 @@ class AsyncAudioClient:
|
|
|
433
464
|
|
|
434
465
|
input : str
|
|
435
466
|
Plain text or SSML to be synthesized to speech.
|
|
436
|
-
Refer to https://docs.
|
|
437
|
-
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.
|
|
467
|
+
Refer to https://docs.speechify.ai/docs/api-limits for the input size limits.
|
|
468
|
+
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody
|
|
438
469
|
|
|
439
470
|
voice_id : str
|
|
440
471
|
Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices
|
|
441
472
|
|
|
442
473
|
language : typing.Optional[str]
|
|
443
474
|
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.
|
|
444
|
-
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.
|
|
475
|
+
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.
|
|
445
476
|
|
|
446
477
|
model : typing.Optional[GetStreamRequestModel]
|
|
447
478
|
Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
|
|
@@ -492,6 +523,16 @@ class AsyncAudioClient:
|
|
|
492
523
|
),
|
|
493
524
|
)
|
|
494
525
|
)
|
|
526
|
+
if _response.status_code == 401:
|
|
527
|
+
raise UnauthorizedError(
|
|
528
|
+
typing.cast(
|
|
529
|
+
typing.Optional[typing.Any],
|
|
530
|
+
parse_obj_as(
|
|
531
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
532
|
+
object_=_response.json(),
|
|
533
|
+
),
|
|
534
|
+
)
|
|
535
|
+
)
|
|
495
536
|
if _response.status_code == 402:
|
|
496
537
|
raise PaymentRequiredError(
|
|
497
538
|
typing.cast(
|
|
@@ -7,6 +7,7 @@ from ...core.request_options import RequestOptions
|
|
|
7
7
|
from ..types.access_token import AccessToken
|
|
8
8
|
from ...core.pydantic_utilities import parse_obj_as
|
|
9
9
|
from ..errors.bad_request_error import BadRequestError
|
|
10
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
10
11
|
from json.decoder import JSONDecodeError
|
|
11
12
|
from ...core.api_error import ApiError
|
|
12
13
|
from ...core.client_wrapper import AsyncClientWrapper
|
|
@@ -83,6 +84,16 @@ class AuthClient:
|
|
|
83
84
|
),
|
|
84
85
|
)
|
|
85
86
|
)
|
|
87
|
+
if _response.status_code == 401:
|
|
88
|
+
raise UnauthorizedError(
|
|
89
|
+
typing.cast(
|
|
90
|
+
typing.Optional[typing.Any],
|
|
91
|
+
parse_obj_as(
|
|
92
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
93
|
+
object_=_response.json(),
|
|
94
|
+
),
|
|
95
|
+
)
|
|
96
|
+
)
|
|
86
97
|
_response_json = _response.json()
|
|
87
98
|
except JSONDecodeError:
|
|
88
99
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -165,6 +176,16 @@ class AsyncAuthClient:
|
|
|
165
176
|
),
|
|
166
177
|
)
|
|
167
178
|
)
|
|
179
|
+
if _response.status_code == 401:
|
|
180
|
+
raise UnauthorizedError(
|
|
181
|
+
typing.cast(
|
|
182
|
+
typing.Optional[typing.Any],
|
|
183
|
+
parse_obj_as(
|
|
184
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
185
|
+
object_=_response.json(),
|
|
186
|
+
),
|
|
187
|
+
)
|
|
188
|
+
)
|
|
168
189
|
_response_json = _response.json()
|
|
169
190
|
except JSONDecodeError:
|
|
170
191
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -9,9 +9,6 @@ from .create_voice_model_name import CreateVoiceModelName
|
|
|
9
9
|
from .created_voice import CreatedVoice
|
|
10
10
|
from .created_voice_gender import CreatedVoiceGender
|
|
11
11
|
from .created_voice_type import CreatedVoiceType
|
|
12
|
-
from .experimental_stream_request import ExperimentalStreamRequest
|
|
13
|
-
from .experimental_stream_request_model import ExperimentalStreamRequestModel
|
|
14
|
-
from .experimental_stream_response import ExperimentalStreamResponse
|
|
15
12
|
from .get_speech_options_request import GetSpeechOptionsRequest
|
|
16
13
|
from .get_speech_response import GetSpeechResponse
|
|
17
14
|
from .get_speech_response_audio_format import GetSpeechResponseAudioFormat
|
|
@@ -37,9 +34,6 @@ __all__ = [
|
|
|
37
34
|
"CreatedVoice",
|
|
38
35
|
"CreatedVoiceGender",
|
|
39
36
|
"CreatedVoiceType",
|
|
40
|
-
"ExperimentalStreamRequest",
|
|
41
|
-
"ExperimentalStreamRequestModel",
|
|
42
|
-
"ExperimentalStreamResponse",
|
|
43
37
|
"GetSpeechOptionsRequest",
|
|
44
38
|
"GetSpeechResponse",
|
|
45
39
|
"GetSpeechResponseAudioFormat",
|
|
@@ -5,6 +5,7 @@ from ...core.client_wrapper import SyncClientWrapper
|
|
|
5
5
|
from ...core.request_options import RequestOptions
|
|
6
6
|
from ..types.get_voice import GetVoice
|
|
7
7
|
from ...core.pydantic_utilities import parse_obj_as
|
|
8
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
8
9
|
from ..errors.not_found_error import NotFoundError
|
|
9
10
|
from ..errors.internal_server_error import InternalServerError
|
|
10
11
|
from json.decoder import JSONDecodeError
|
|
@@ -15,7 +16,6 @@ from ..types.created_voice import CreatedVoice
|
|
|
15
16
|
from ..errors.bad_request_error import BadRequestError
|
|
16
17
|
from ..errors.payment_required_error import PaymentRequiredError
|
|
17
18
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
18
|
-
from ..errors.unauthorized_error import UnauthorizedError
|
|
19
19
|
from ...core.client_wrapper import AsyncClientWrapper
|
|
20
20
|
|
|
21
21
|
# this is used as the default value for optional parameters
|
|
@@ -63,6 +63,16 @@ class VoicesClient:
|
|
|
63
63
|
object_=_response.json(),
|
|
64
64
|
),
|
|
65
65
|
)
|
|
66
|
+
if _response.status_code == 401:
|
|
67
|
+
raise UnauthorizedError(
|
|
68
|
+
typing.cast(
|
|
69
|
+
typing.Optional[typing.Any],
|
|
70
|
+
parse_obj_as(
|
|
71
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
72
|
+
object_=_response.json(),
|
|
73
|
+
),
|
|
74
|
+
)
|
|
75
|
+
)
|
|
66
76
|
if _response.status_code == 404:
|
|
67
77
|
raise NotFoundError(
|
|
68
78
|
typing.cast(
|
|
@@ -183,6 +193,16 @@ class VoicesClient:
|
|
|
183
193
|
),
|
|
184
194
|
)
|
|
185
195
|
)
|
|
196
|
+
if _response.status_code == 401:
|
|
197
|
+
raise UnauthorizedError(
|
|
198
|
+
typing.cast(
|
|
199
|
+
typing.Optional[typing.Any],
|
|
200
|
+
parse_obj_as(
|
|
201
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
202
|
+
object_=_response.json(),
|
|
203
|
+
),
|
|
204
|
+
)
|
|
205
|
+
)
|
|
186
206
|
if _response.status_code == 402:
|
|
187
207
|
raise PaymentRequiredError(
|
|
188
208
|
typing.cast(
|
|
@@ -253,6 +273,16 @@ class VoicesClient:
|
|
|
253
273
|
),
|
|
254
274
|
)
|
|
255
275
|
)
|
|
276
|
+
if _response.status_code == 401:
|
|
277
|
+
raise UnauthorizedError(
|
|
278
|
+
typing.cast(
|
|
279
|
+
typing.Optional[typing.Any],
|
|
280
|
+
parse_obj_as(
|
|
281
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
282
|
+
object_=_response.json(),
|
|
283
|
+
),
|
|
284
|
+
)
|
|
285
|
+
)
|
|
256
286
|
if _response.status_code == 404:
|
|
257
287
|
raise NotFoundError(
|
|
258
288
|
typing.cast(
|
|
@@ -404,6 +434,16 @@ class AsyncVoicesClient:
|
|
|
404
434
|
object_=_response.json(),
|
|
405
435
|
),
|
|
406
436
|
)
|
|
437
|
+
if _response.status_code == 401:
|
|
438
|
+
raise UnauthorizedError(
|
|
439
|
+
typing.cast(
|
|
440
|
+
typing.Optional[typing.Any],
|
|
441
|
+
parse_obj_as(
|
|
442
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
443
|
+
object_=_response.json(),
|
|
444
|
+
),
|
|
445
|
+
)
|
|
446
|
+
)
|
|
407
447
|
if _response.status_code == 404:
|
|
408
448
|
raise NotFoundError(
|
|
409
449
|
typing.cast(
|
|
@@ -532,6 +572,16 @@ class AsyncVoicesClient:
|
|
|
532
572
|
),
|
|
533
573
|
)
|
|
534
574
|
)
|
|
575
|
+
if _response.status_code == 401:
|
|
576
|
+
raise UnauthorizedError(
|
|
577
|
+
typing.cast(
|
|
578
|
+
typing.Optional[typing.Any],
|
|
579
|
+
parse_obj_as(
|
|
580
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
581
|
+
object_=_response.json(),
|
|
582
|
+
),
|
|
583
|
+
)
|
|
584
|
+
)
|
|
535
585
|
if _response.status_code == 402:
|
|
536
586
|
raise PaymentRequiredError(
|
|
537
587
|
typing.cast(
|
|
@@ -610,6 +660,16 @@ class AsyncVoicesClient:
|
|
|
610
660
|
),
|
|
611
661
|
)
|
|
612
662
|
)
|
|
663
|
+
if _response.status_code == 401:
|
|
664
|
+
raise UnauthorizedError(
|
|
665
|
+
typing.cast(
|
|
666
|
+
typing.Optional[typing.Any],
|
|
667
|
+
parse_obj_as(
|
|
668
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
669
|
+
object_=_response.json(),
|
|
670
|
+
),
|
|
671
|
+
)
|
|
672
|
+
)
|
|
613
673
|
if _response.status_code == 404:
|
|
614
674
|
raise NotFoundError(
|
|
615
675
|
typing.cast(
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import pydantic
|
|
5
|
-
import typing
|
|
6
|
-
from .experimental_stream_request_model import ExperimentalStreamRequestModel
|
|
7
|
-
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ExperimentalStreamRequest(UniversalBaseModel):
|
|
11
|
-
"""
|
|
12
|
-
ExperimentalStreamRequest is the wrapper for request parameters to the client
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
input: str = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
Plain text or SSML to be synthesized to speech.
|
|
18
|
-
Refer to https://docs.sws.speechify.com/docs/api-limits for the input size limits.
|
|
19
|
-
Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.sws.speechify.com/docs/ssml#prosody
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
language: typing.Optional[str] = pydantic.Field(default=None)
|
|
23
|
-
"""
|
|
24
|
-
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.
|
|
25
|
-
Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.sws.speechify.com/docs/language-support.
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
model: typing.Optional[ExperimentalStreamRequestModel] = pydantic.Field(default=None)
|
|
29
|
-
"""
|
|
30
|
-
Model used for audio synthesis
|
|
31
|
-
simba-base ModelBase ModelBase is deprecated. Use simba-english or simba-multilingual instead. @deprecated
|
|
32
|
-
simba-english ModelEnglish
|
|
33
|
-
simba-multilingual ModelMultilingual
|
|
34
|
-
simba-turbo ModelTurbo
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
voice_id: str = pydantic.Field()
|
|
38
|
-
"""
|
|
39
|
-
Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices
|
|
40
|
-
"""
|
|
41
|
-
|
|
42
|
-
if IS_PYDANTIC_V2:
|
|
43
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
44
|
-
else:
|
|
45
|
-
|
|
46
|
-
class Config:
|
|
47
|
-
frozen = True
|
|
48
|
-
smart_union = True
|
|
49
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import typing
|
|
5
|
-
import pydantic
|
|
6
|
-
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class ExperimentalStreamResponse(UniversalBaseModel):
|
|
10
|
-
"""
|
|
11
|
-
ExperimentalStreamResponse represents generated audio stream info
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
audio_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
-
"""
|
|
16
|
-
URL to the synthesized audio file. It includes the expiration time and a signature in the query params.
|
|
17
|
-
The audio file will be available for download until the expiration time.
|
|
18
|
-
For the URL to work correctly, it must be used verbatim, with all the query parameters.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
expires: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
-
"""
|
|
23
|
-
Expiry time of the audio file, in ISO-8601 format.
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
if IS_PYDANTIC_V2:
|
|
27
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
-
else:
|
|
29
|
-
|
|
30
|
-
class Config:
|
|
31
|
-
frozen = True
|
|
32
|
-
smart_union = True
|
|
33
|
-
extra = pydantic.Extra.allow
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/internal_server_error.py
RENAMED
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/errors/payment_required_error.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/create_voice_language.py
RENAMED
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/create_voice_model_name.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_speech_options_request.py
RENAMED
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_stream_options_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.1 → speechify_api-1.2.3}/src/speechify/tts/types/get_voices_model_name.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|