speechify-api 1.2.0__tar.gz → 1.2.2__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.0 → speechify_api-1.2.2}/PKG-INFO +3 -3
- {speechify_api-1.2.0 → speechify_api-1.2.2}/README.md +2 -2
- {speechify_api-1.2.0 → speechify_api-1.2.2}/pyproject.toml +1 -1
- {speechify_api-1.2.0/src/speechify/tts/audio → speechify_api-1.2.2/src/speechify/api}/types/audio_stream_request_accept.py +1 -1
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/client_wrapper.py +1 -1
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/__init__.py +0 -6
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/audio/client.py +41 -0
- {speechify_api-1.2.0/src/speechify/api → speechify_api-1.2.2/src/speechify/tts/audio}/types/audio_stream_request_accept.py +1 -1
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/audio/types/get_speech_request_audio_format.py +1 -1
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/auth/client.py +23 -2
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/__init__.py +0 -6
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/created_voice.py +6 -6
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_speech_response.py +5 -5
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_speech_response_audio_format.py +1 -1
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_voice.py +6 -6
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_voice_language.py +1 -1
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_voices_model.py +2 -2
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/speech_marks.py +6 -6
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/voices/client.py +61 -1
- speechify_api-1.2.0/src/speechify/tts/types/experimental_stream_request.py +0 -49
- speechify_api-1.2.0/src/speechify/tts/types/experimental_stream_request_model.py +0 -7
- speechify_api-1.2.0/src/speechify/tts/types/experimental_stream_response.py +0 -33
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/api/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/api/types/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/client.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/api_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/datetime_utils.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/file.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/http_client.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/jsonable_encoder.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/pydantic_utilities.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/query_encoder.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/remove_none_from_dict.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/request_options.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/core/serialization.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/environment.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/py.typed +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/audio/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/audio/types/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/audio/types/get_speech_request_model.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/audio/types/get_stream_request_model.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/auth/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/auth/types/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/auth/types/create_access_token_request_scope.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/client.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/bad_request_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/forbidden_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/internal_server_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/not_found_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/payment_required_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/unauthorized_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/access_token.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/access_token_scope.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/api_key.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/create_voice_language.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/create_voice_model.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/create_voice_model_name.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/created_voice_gender.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/created_voice_type.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_speech_options_request.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_stream_options_request.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_voice_gender.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_voice_type.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_voices_model_name.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/nested_chunk.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/o_auth_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/o_auth_error_error.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/voices/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/voices/types/__init__.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/voices/types/voices_create_request_gender.py +0 -0
- {speechify_api-1.2.0 → speechify_api-1.2.2}/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.2
|
|
4
4
|
Summary: Official Speechify API SDK
|
|
5
5
|
Keywords: speechify,ai,api,sdk,text-to-speech,tts
|
|
6
6
|
Author: Speechify
|
|
@@ -32,7 +32,7 @@ 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
36
|
|
|
37
37
|
## Documentation
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ pip install speechify-api
|
|
|
46
46
|
|
|
47
47
|
## Reference
|
|
48
48
|
|
|
49
|
-
A full reference for this library is available [here](
|
|
49
|
+
A full reference for this library is available [here](https://github.com/speechifyinc/speechify-api-sdk-python/blob/HEAD/./reference.md).
|
|
50
50
|
|
|
51
51
|
## Usage
|
|
52
52
|
|
|
@@ -3,7 +3,7 @@
|
|
|
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
7
|
|
|
8
8
|
## Documentation
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ pip install speechify-api
|
|
|
17
17
|
|
|
18
18
|
## Reference
|
|
19
19
|
|
|
20
|
-
A full reference for this library is available [here](
|
|
20
|
+
A full reference for this library is available [here](https://github.com/speechifyinc/speechify-api-sdk-python/blob/HEAD/./reference.md).
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
@@ -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.2",
|
|
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
|
|
@@ -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(
|
|
@@ -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(
|
|
@@ -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(
|
|
@@ -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
|
|
@@ -26,7 +27,7 @@ class AuthClient:
|
|
|
26
27
|
request_options: typing.Optional[RequestOptions] = None,
|
|
27
28
|
) -> AccessToken:
|
|
28
29
|
"""
|
|
29
|
-
Create a new API token for the logged in user
|
|
30
|
+
WARNING: This endpoint is deprecated. Create a new API token for the logged in user.
|
|
30
31
|
|
|
31
32
|
Parameters
|
|
32
33
|
----------
|
|
@@ -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)
|
|
@@ -100,7 +111,7 @@ class AsyncAuthClient:
|
|
|
100
111
|
request_options: typing.Optional[RequestOptions] = None,
|
|
101
112
|
) -> AccessToken:
|
|
102
113
|
"""
|
|
103
|
-
Create a new API token for the logged in user
|
|
114
|
+
WARNING: This endpoint is deprecated. Create a new API token for the logged in user.
|
|
104
115
|
|
|
105
116
|
Parameters
|
|
106
117
|
----------
|
|
@@ -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",
|
|
@@ -11,12 +11,12 @@ import pydantic
|
|
|
11
11
|
|
|
12
12
|
class CreatedVoice(UniversalBaseModel):
|
|
13
13
|
avatar_image: typing.Optional[str] = None
|
|
14
|
-
display_name:
|
|
15
|
-
gender:
|
|
16
|
-
locale:
|
|
17
|
-
id:
|
|
18
|
-
models: typing.
|
|
19
|
-
type:
|
|
14
|
+
display_name: str
|
|
15
|
+
gender: CreatedVoiceGender
|
|
16
|
+
locale: str
|
|
17
|
+
id: str
|
|
18
|
+
models: typing.List[CreateVoiceModel]
|
|
19
|
+
type: CreatedVoiceType
|
|
20
20
|
|
|
21
21
|
if IS_PYDANTIC_V2:
|
|
22
22
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import typing
|
|
5
4
|
import pydantic
|
|
6
5
|
from .get_speech_response_audio_format import GetSpeechResponseAudioFormat
|
|
7
6
|
from .speech_marks import SpeechMarks
|
|
8
7
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import typing
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class GetSpeechResponse(UniversalBaseModel):
|
|
12
|
-
audio_data:
|
|
12
|
+
audio_data: str = pydantic.Field()
|
|
13
13
|
"""
|
|
14
14
|
Synthesized speech audio, Base64-encoded
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
-
audio_format:
|
|
17
|
+
audio_format: GetSpeechResponseAudioFormat = pydantic.Field()
|
|
18
18
|
"""
|
|
19
19
|
The format of the audio data
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
billable_characters_count:
|
|
22
|
+
billable_characters_count: int = pydantic.Field()
|
|
23
23
|
"""
|
|
24
24
|
The number of billable characters processed in the request.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
|
-
speech_marks:
|
|
27
|
+
speech_marks: SpeechMarks
|
|
28
28
|
|
|
29
29
|
if IS_PYDANTIC_V2:
|
|
30
30
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -11,14 +11,14 @@ import pydantic
|
|
|
11
11
|
|
|
12
12
|
class GetVoice(UniversalBaseModel):
|
|
13
13
|
avatar_image: typing.Optional[str] = None
|
|
14
|
-
display_name:
|
|
15
|
-
gender:
|
|
16
|
-
locale:
|
|
17
|
-
id:
|
|
18
|
-
models: typing.
|
|
14
|
+
display_name: str
|
|
15
|
+
gender: GetVoiceGender
|
|
16
|
+
locale: str
|
|
17
|
+
id: str
|
|
18
|
+
models: typing.List[GetVoicesModel]
|
|
19
19
|
preview_audio: typing.Optional[str] = None
|
|
20
20
|
tags: typing.Optional[typing.List[str]] = None
|
|
21
|
-
type:
|
|
21
|
+
type: GetVoiceType
|
|
22
22
|
|
|
23
23
|
if IS_PYDANTIC_V2:
|
|
24
24
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -9,8 +9,8 @@ import pydantic
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class GetVoicesModel(UniversalBaseModel):
|
|
12
|
-
languages: typing.
|
|
13
|
-
name:
|
|
12
|
+
languages: typing.List[GetVoiceLanguage]
|
|
13
|
+
name: GetVoicesModelName
|
|
14
14
|
|
|
15
15
|
if IS_PYDANTIC_V2:
|
|
16
16
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -12,16 +12,16 @@ class SpeechMarks(UniversalBaseModel):
|
|
|
12
12
|
It is used to annotate the audio data with metadata about the synthesis process, like word timing or phoneme details.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
chunks: typing.
|
|
15
|
+
chunks: typing.List[NestedChunk] = pydantic.Field()
|
|
16
16
|
"""
|
|
17
17
|
Array of NestedChunk, each providing detailed segment information within the synthesized speech.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
end:
|
|
21
|
-
end_time:
|
|
22
|
-
start:
|
|
23
|
-
start_time:
|
|
24
|
-
type:
|
|
20
|
+
end: int
|
|
21
|
+
end_time: float
|
|
22
|
+
start: int
|
|
23
|
+
start_time: float
|
|
24
|
+
type: str
|
|
25
25
|
value: typing.Optional[str] = None
|
|
26
26
|
|
|
27
27
|
if IS_PYDANTIC_V2:
|
|
@@ -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
|
|
File without changes
|
{speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/errors/internal_server_error.py
RENAMED
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.0 → speechify_api-1.2.2}/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.0 → speechify_api-1.2.2}/src/speechify/tts/types/create_voice_language.py
RENAMED
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/create_voice_model_name.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_speech_options_request.py
RENAMED
|
File without changes
|
{speechify_api-1.2.0 → speechify_api-1.2.2}/src/speechify/tts/types/get_stream_options_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speechify_api-1.2.0 → speechify_api-1.2.2}/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
|