You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The language to transcribe or translate the file into. Use “auto” for automatic language detection, or specify a language code. If not specified, defaults to automatic detection. All supported language codes can be found
25
+
"""
26
+
15
27
translate: NotRequired[bool]
28
+
"""
29
+
When set to true, translates the content into English (or the specified language if language parameter is provided)
30
+
"""
31
+
16
32
by_speaker: NotRequired[bool]
33
+
"""
34
+
Identifies and separates different speakers in the audio file. When enabled, the response will include a speakers array with speaker-segmented transcripts.
35
+
"""
36
+
17
37
webhook_url: NotRequired[str]
38
+
"""
39
+
Webhook URL to send result to. When provided, the API will process asynchronously and send results to this URL when completed.
40
+
"""
41
+
18
42
batch_size: NotRequired[int]
43
+
"""
44
+
The batch size to return. Maximum value is 40. This controls how the audio is chunked for processing.
45
+
"""
46
+
19
47
chunk_duration: NotRequired[int]
48
+
"""
49
+
the duration of each chunk in seconds, maximum value is 15, defaults to 3
50
+
"""
20
51
21
52
22
53
classChunkParams(TypedDict):
@@ -32,8 +63,29 @@ class BySpeakerParams(ChunkParams):
32
63
33
64
classSpeechToTextResponse(BaseResponse):
34
65
text: str
66
+
"""
67
+
the text of the transcription
68
+
"""
69
+
35
70
chunks: List[ChunkParams]
71
+
"""
72
+
the chunks of the transcription
73
+
"""
74
+
36
75
speakers: Optional[List[BySpeakerParams]]
76
+
"""
77
+
the speakers of the transcription, available if by_speaker is set to true
78
+
"""
79
+
80
+
language_detected: Optional[str]
81
+
"""
82
+
the language detected in the transcription, available if language is set to auto
83
+
"""
84
+
85
+
confidence: Optional[float]
86
+
"""
87
+
the confidence of the transcription language detection, available if language is set to auto
0 commit comments