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 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
+ ]