Skip to content

Commit f794292

Browse files
authored
Merge pull request #30 from JigsawStack/feat/update
update STT types
2 parents d693a30 + a5c1d7a commit f794292

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

jigsawstack/audio.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, List, cast, Union
1+
from typing import Any, Dict, List, cast, Union, Optional
22
from typing_extensions import NotRequired, TypedDict
33
from .request import Request, RequestConfig
44
from .async_request import AsyncRequest, AsyncRequestConfig
@@ -31,10 +31,20 @@ class SpeechToTextParams(TypedDict):
3131
batch_size: NotRequired[int]
3232

3333

34+
class ChunkParams(TypedDict):
35+
text: str
36+
timestamp: tuple[int, int]
37+
38+
39+
class BySpeakerParams(ChunkParams):
40+
speaker: str
41+
42+
3443
class SpeechToTextResponse(TypedDict):
3544
success: bool
3645
text: str
37-
chunks: List[object]
46+
chunks: List[ChunkParams]
47+
speakers: Optional[List[BySpeakerParams]]
3848

3949

4050
class Audio(ClientConfig):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="jigsawstack",
9-
version="0.1.23",
9+
version="0.1.24",
1010
description="JigsawStack Python SDK",
1111
long_description=open("README.md", encoding="utf8").read(),
1212
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)