Skip to content

Commit 62e492e

Browse files
fix: udpate v1/ai/transcribe response schema
1 parent 3272b44 commit 62e492e

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

jigsawstack/audio.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,10 @@ class SpeechToTextParams(TypedDict):
5050
"""
5151

5252

53-
class ChunkParams(TypedDict):
53+
class ChunkResponse(TypedDict):
5454
text: str
5555
timestamp: tuple[int, int]
56-
57-
58-
class BySpeakerParams(ChunkParams):
59-
speaker: str
60-
timestamp: tuple[int, int]
61-
text: str
56+
speaker: Optional[str]
6257

6358

6459
class SpeechToTextResponse(BaseResponse):
@@ -67,16 +62,11 @@ class SpeechToTextResponse(BaseResponse):
6762
the text of the transcription
6863
"""
6964

70-
chunks: List[ChunkParams]
65+
chunks: List[ChunkResponse]
7166
"""
7267
the chunks of the transcription
7368
"""
7469

75-
speakers: Optional[List[BySpeakerParams]]
76-
"""
77-
the speakers of the transcription, available if by_speaker is set to true
78-
"""
79-
8070
language_detected: Optional[Dict[str, Any]]
8171
"""
8272
the language detected in the transcription, available if language is set to auto

0 commit comments

Comments
 (0)