bakbak-python 1.0.0rc2__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.
- bakbak/__init__.py +77 -0
- bakbak/_base_client.py +642 -0
- bakbak/_client.py +219 -0
- bakbak/_constants.py +43 -0
- bakbak/_exceptions.py +410 -0
- bakbak/_models.py +93 -0
- bakbak/_response.py +51 -0
- bakbak/_retry.py +52 -0
- bakbak/_sse.py +68 -0
- bakbak/_streaming.py +432 -0
- bakbak/_types.py +79 -0
- bakbak/_utils.py +62 -0
- bakbak/_version.py +3 -0
- bakbak/_ws/__init__.py +1 -0
- bakbak/_ws/_async.py +657 -0
- bakbak/_ws/_common.py +176 -0
- bakbak/_ws/_core.py +819 -0
- bakbak/_ws/_sync.py +649 -0
- bakbak/_ws/events.py +67 -0
- bakbak/audio.py +75 -0
- bakbak/py.typed +0 -0
- bakbak/resources/__init__.py +6 -0
- bakbak/resources/tts.py +339 -0
- bakbak/resources/voices.py +139 -0
- bakbak/text.py +463 -0
- bakbak/types.py +100 -0
- bakbak/websocket.py +23 -0
- bakbak_python-1.0.0rc2.dist-info/METADATA +416 -0
- bakbak_python-1.0.0rc2.dist-info/RECORD +31 -0
- bakbak_python-1.0.0rc2.dist-info/WHEEL +4 -0
- bakbak_python-1.0.0rc2.dist-info/licenses/LICENSE +202 -0
bakbak/__init__.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""The official Python SDK for the Bakbak text-to-speech API by Raya.
|
|
2
|
+
|
|
3
|
+
::
|
|
4
|
+
|
|
5
|
+
from bakbak import Bakbak
|
|
6
|
+
|
|
7
|
+
client = Bakbak() # reads BAKBAK_API_KEY
|
|
8
|
+
audio = client.tts.generate(text="नमस्ते, आप कैसे हैं?", voice_id="…", language="hi")
|
|
9
|
+
audio.save("hello.wav")
|
|
10
|
+
|
|
11
|
+
``AsyncBakbak`` has the same surface for asyncio. ``bakbak.text`` splits text
|
|
12
|
+
into sentences, ``bakbak.audio`` wraps raw audio in WAV, and
|
|
13
|
+
``bakbak.websocket`` holds the WebSocket types.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from . import audio, text, types, websocket
|
|
17
|
+
from ._client import AsyncBakbak, Bakbak
|
|
18
|
+
from ._exceptions import (
|
|
19
|
+
APIConnectionError,
|
|
20
|
+
APIError,
|
|
21
|
+
APIStatusError,
|
|
22
|
+
APITimeoutError,
|
|
23
|
+
AuthenticationError,
|
|
24
|
+
BadRequestError,
|
|
25
|
+
BakbakError,
|
|
26
|
+
InsufficientCreditsError,
|
|
27
|
+
InternalServerError,
|
|
28
|
+
NotFoundError,
|
|
29
|
+
PermissionDeniedError,
|
|
30
|
+
RateLimitError,
|
|
31
|
+
RequestTooLargeError,
|
|
32
|
+
StreamInterruptedError,
|
|
33
|
+
UnprocessableEntityError,
|
|
34
|
+
WebSocketClosedError,
|
|
35
|
+
)
|
|
36
|
+
from ._models import Audio, AudioChunk
|
|
37
|
+
from ._response import RawResponse
|
|
38
|
+
from ._streaming import AsyncAudioStream, AudioStream
|
|
39
|
+
from ._types import NOT_GIVEN, NotGiven, Timeout
|
|
40
|
+
from ._version import __version__
|
|
41
|
+
from .types import OutputFormat, Voice
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"NOT_GIVEN",
|
|
45
|
+
"APIConnectionError",
|
|
46
|
+
"APIError",
|
|
47
|
+
"APIStatusError",
|
|
48
|
+
"APITimeoutError",
|
|
49
|
+
"AsyncAudioStream",
|
|
50
|
+
"AsyncBakbak",
|
|
51
|
+
"Audio",
|
|
52
|
+
"AudioChunk",
|
|
53
|
+
"AudioStream",
|
|
54
|
+
"AuthenticationError",
|
|
55
|
+
"BadRequestError",
|
|
56
|
+
"Bakbak",
|
|
57
|
+
"BakbakError",
|
|
58
|
+
"InsufficientCreditsError",
|
|
59
|
+
"InternalServerError",
|
|
60
|
+
"NotFoundError",
|
|
61
|
+
"NotGiven",
|
|
62
|
+
"OutputFormat",
|
|
63
|
+
"PermissionDeniedError",
|
|
64
|
+
"RateLimitError",
|
|
65
|
+
"RawResponse",
|
|
66
|
+
"RequestTooLargeError",
|
|
67
|
+
"StreamInterruptedError",
|
|
68
|
+
"Timeout",
|
|
69
|
+
"UnprocessableEntityError",
|
|
70
|
+
"Voice",
|
|
71
|
+
"WebSocketClosedError",
|
|
72
|
+
"__version__",
|
|
73
|
+
"audio",
|
|
74
|
+
"text",
|
|
75
|
+
"types",
|
|
76
|
+
"websocket",
|
|
77
|
+
]
|