8000 Update tts.py · thecodinghouse/cartesia-python@f5ada63 · GitHub
[go: up one dir, main page]

Skip to content

Commit f5ada63

Browse files
authored
Update tts.py
1 parent c2eaacf commit f5ada63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cartesia/tts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import List, Optional
22

33
from cartesia._sse import _SSE
4+
from cartesia._bytes import _BYTES
45
from cartesia._types import (
56
DeprecatedOutputFormatMapping,
67
OutputFormat,
@@ -24,6 +25,9 @@ def __init__(self, api_key: str, base_url: str, timeout: float):
2425
self._sse_class = _SSE(self._http_url(), self.headers, self.timeout)
2526
self.sse = self._sse_class.send
2627

28+
self._bytes_class = _BYTES(self._http_url(), self.headers, self.timeout)
29+
self.bytes = self._bytes_class.send
30+
2731
def websocket(self) -> _WebSocket:
2832
"""This method returns a WebSocket object that can be used to generate audio using WebSocket.
2933

0 commit comments

Comments
 (0)
0