speechify-api 0.0.145__py3-none-any.whl
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-0.0.145.dist-info/METADATA +167 -0
- speechify_api-0.0.145.dist-info/RECORD +73 -0
- speechify_api-0.0.145.dist-info/WHEEL +4 -0
- speechifyinc/__init__.py +17 -0
- speechifyinc/api/__init__.py +5 -0
- speechifyinc/api/types/__init__.py +5 -0
- speechifyinc/api/types/audio_stream_request_accept.py +5 -0
- speechifyinc/client.py +150 -0
- speechifyinc/core/__init__.py +47 -0
- speechifyinc/core/api_error.py +15 -0
- speechifyinc/core/client_wrapper.py +76 -0
- speechifyinc/core/datetime_utils.py +28 -0
- speechifyinc/core/file.py +67 -0
- speechifyinc/core/http_client.py +499 -0
- speechifyinc/core/jsonable_encoder.py +101 -0
- speechifyinc/core/pydantic_utilities.py +296 -0
- speechifyinc/core/query_encoder.py +58 -0
- speechifyinc/core/remove_none_from_dict.py +11 -0
- speechifyinc/core/request_options.py +35 -0
- speechifyinc/core/serialization.py +272 -0
- speechifyinc/environment.py +7 -0
- speechifyinc/py.typed +0 -0
- speechifyinc/tts/__init__.py +78 -0
- speechifyinc/tts/audio/__init__.py +5 -0
- speechifyinc/tts/audio/client.py +544 -0
- speechifyinc/tts/audio/types/__init__.py +8 -0
- speechifyinc/tts/audio/types/audio_stream_request_accept.py +5 -0
- speechifyinc/tts/audio/types/get_speech_request_audio_format.py +5 -0
- speechifyinc/tts/audio/types/get_speech_request_model.py +7 -0
- speechifyinc/tts/audio/types/get_stream_request_model.py +7 -0
- speechifyinc/tts/auth/__init__.py +5 -0
- speechifyinc/tts/auth/client.py +171 -0
- speechifyinc/tts/auth/types/__init__.py +5 -0
- speechifyinc/tts/auth/types/create_access_token_request_scope.py +10 -0
- speechifyinc/tts/client.py +26 -0
- speechifyinc/tts/errors/__init__.py +9 -0
- speechifyinc/tts/errors/bad_request_error.py +9 -0
- speechifyinc/tts/errors/forbidden_error.py +9 -0
- speechifyinc/tts/errors/internal_server_error.py +9 -0
- speechifyinc/tts/errors/not_found_error.py +9 -0
- speechifyinc/tts/errors/payment_required_error.py +9 -0
- speechifyinc/tts/types/__init__.py +57 -0
- speechifyinc/tts/types/access_token.py +34 -0
- speechifyinc/tts/types/access_token_scope.py +10 -0
- speechifyinc/tts/types/api_key.py +47 -0
- speechifyinc/tts/types/create_voice_language.py +20 -0
- speechifyinc/tts/types/create_voice_model.py +22 -0
- speechifyinc/tts/types/create_voice_model_name.py +7 -0
- speechifyinc/tts/types/created_voice.py +28 -0
- speechifyinc/tts/types/created_voice_gender.py +5 -0
- speechifyinc/tts/types/created_voice_type.py +5 -0
- speechifyinc/tts/types/experimental_stream_request.py +49 -0
- speechifyinc/tts/types/experimental_stream_request_model.py +7 -0
- speechifyinc/tts/types/experimental_stream_response.py +33 -0
- speechifyinc/tts/types/get_speech_options_request.py +32 -0
- speechifyinc/tts/types/get_speech_response.py +36 -0
- speechifyinc/tts/types/get_speech_response_audio_format.py +5 -0
- speechifyinc/tts/types/get_stream_options_request.py +32 -0
- speechifyinc/tts/types/get_voice.py +30 -0
- speechifyinc/tts/types/get_voice_gender.py +5 -0
- speechifyinc/tts/types/get_voice_language.py +20 -0
- speechifyinc/tts/types/get_voice_type.py +5 -0
- speechifyinc/tts/types/get_voices_model.py +22 -0
- speechifyinc/tts/types/get_voices_model_name.py +7 -0
- speechifyinc/tts/types/nested_chunk.py +28 -0
- speechifyinc/tts/types/o_auth_error.py +21 -0
- speechifyinc/tts/types/o_auth_error_error.py +10 -0
- speechifyinc/tts/types/speech_marks.py +34 -0
- speechifyinc/tts/voices/__init__.py +5 -0
- speechifyinc/tts/voices/client.py +559 -0
- speechifyinc/tts/voices/types/__init__.py +5 -0
- speechifyinc/tts/voices/types/voices_create_request_gender.py +5 -0
- speechifyinc/version.py +3 -0
|
@@ -0,0 +1,36 @@
|
|
|
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 .get_speech_response_audio_format import GetSpeechResponseAudioFormat
|
|
7
|
+
from .speech_marks import SpeechMarks
|
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GetSpeechResponse(UniversalBaseModel):
|
|
12
|
+
audio_data: typing.Optional[str] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Synthesized speech audio, Base64-encoded
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
audio_format: typing.Optional[GetSpeechResponseAudioFormat] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
The format of the audio data
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
billable_characters_count: typing.Optional[int] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
The number of billable characters processed in the request.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
speech_marks: typing.Optional[SpeechMarks] = None
|
|
28
|
+
|
|
29
|
+
if IS_PYDANTIC_V2:
|
|
30
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,32 @@
|
|
|
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 GetStreamOptionsRequest(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
GetStreamOptionsRequest is the wrapper for request parameters to the client
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
loudness_normalization: typing.Optional[bool] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
Determines whether to normalize the audio loudness to a standard level.
|
|
17
|
+
When enabled, loudness normalization aligns the audio output to the following standards:
|
|
18
|
+
Integrated loudness: -14 LUFS
|
|
19
|
+
True peak: -2 dBTP
|
|
20
|
+
Loudness range: 7 LU
|
|
21
|
+
If disabled, the audio loudness will match the original loudness of the selected voice, which may vary significantly and be either too quiet or too loud.
|
|
22
|
+
Enabling loudness normalization can increase latency due to additional processing required for audio level adjustments.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
if IS_PYDANTIC_V2:
|
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
27
|
+
else:
|
|
28
|
+
|
|
29
|
+
class Config:
|
|
30
|
+
frozen = True
|
|
31
|
+
smart_union = True
|
|
32
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .get_voice_gender import GetVoiceGender
|
|
6
|
+
from .get_voices_model import GetVoicesModel
|
|
7
|
+
from .get_voice_type import GetVoiceType
|
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
|
+
import pydantic
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetVoice(UniversalBaseModel):
|
|
13
|
+
avatar_image: typing.Optional[str] = None
|
|
14
|
+
display_name: typing.Optional[str] = None
|
|
15
|
+
gender: typing.Optional[GetVoiceGender] = None
|
|
16
|
+
locale: typing.Optional[str] = None
|
|
17
|
+
id: typing.Optional[str] = None
|
|
18
|
+
models: typing.Optional[typing.List[GetVoicesModel]] = None
|
|
19
|
+
preview_audio: typing.Optional[str] = None
|
|
20
|
+
tags: typing.Optional[typing.List[str]] = None
|
|
21
|
+
type: typing.Optional[GetVoiceType] = None
|
|
22
|
+
|
|
23
|
+
if IS_PYDANTIC_V2:
|
|
24
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
25
|
+
else:
|
|
26
|
+
|
|
27
|
+
class Config:
|
|
28
|
+
frozen = True
|
|
29
|
+
smart_union = True
|
|
30
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GetVoiceLanguage(UniversalBaseModel):
|
|
10
|
+
locale: typing.Optional[str] = None
|
|
11
|
+
preview_audio: typing.Optional[str] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .get_voice_language import GetVoiceLanguage
|
|
6
|
+
from .get_voices_model_name import GetVoicesModelName
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GetVoicesModel(UniversalBaseModel):
|
|
12
|
+
languages: typing.Optional[typing.List[GetVoiceLanguage]] = None
|
|
13
|
+
name: typing.Optional[GetVoicesModelName] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NestedChunk(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
It details the type of segment, its start and end points in the text, and its start and end times in the synthesized speech audio.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
end: typing.Optional[int] = None
|
|
15
|
+
end_time: typing.Optional[float] = None
|
|
16
|
+
start: typing.Optional[int] = None
|
|
17
|
+
start_time: typing.Optional[float] = None
|
|
18
|
+
type: typing.Optional[str] = None
|
|
19
|
+
value: typing.Optional[str] = None
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .o_auth_error_error import OAuthErrorError
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import pydantic
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthError(UniversalBaseModel):
|
|
11
|
+
error: typing.Optional[OAuthErrorError] = None
|
|
12
|
+
error_description: typing.Optional[str] = None
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
OAuthErrorError = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"invalid_client", "unauthorized_client", "invalid_request", "unsupported_grant_type", "invalid_scope"
|
|
8
|
+
],
|
|
9
|
+
typing.Any,
|
|
10
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .nested_chunk import NestedChunk
|
|
6
|
+
import pydantic
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SpeechMarks(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
It is used to annotate the audio data with metadata about the synthesis process, like word timing or phoneme details.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
chunks: typing.Optional[typing.List[NestedChunk]] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Array of NestedChunk, each providing detailed segment information within the synthesized speech.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
end: typing.Optional[int] = None
|
|
21
|
+
end_time: typing.Optional[float] = None
|
|
22
|
+
start: typing.Optional[int] = None
|
|
23
|
+
start_time: typing.Optional[float] = None
|
|
24
|
+
type: typing.Optional[str] = None
|
|
25
|
+
value: typing.Optional[str] = None
|
|
26
|
+
|
|
27
|
+
if IS_PYDANTIC_V2:
|
|
28
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
frozen = True
|
|
33
|
+
smart_union = True
|
|
34
|
+
extra = pydantic.Extra.allow
|