vocalstack 1.0.0__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.
- vocalstack/SKILL.md +243 -0
- vocalstack/__init__.py +61 -0
- vocalstack/_http.py +166 -0
- vocalstack/_models.py +2347 -0
- vocalstack/client.py +113 -0
- vocalstack/errors.py +97 -0
- vocalstack/realtime.py +555 -0
- vocalstack/resources.py +1277 -0
- vocalstack-1.0.0.dist-info/METADATA +124 -0
- vocalstack-1.0.0.dist-info/RECORD +12 -0
- vocalstack-1.0.0.dist-info/WHEEL +4 -0
- vocalstack-1.0.0.dist-info/licenses/LICENSE +21 -0
vocalstack/_models.py
ADDED
|
@@ -0,0 +1,2347 @@
|
|
|
1
|
+
# GENERATED by @vocalstack/contract tools/generate.mjs — do not edit.
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
import logging
|
|
6
|
+
from typing import Annotated, Any, Dict, List, Literal, Optional, Union
|
|
7
|
+
|
|
8
|
+
from pydantic import BaseModel, ConfigDict, Field, TypeAdapter, ValidationError
|
|
9
|
+
|
|
10
|
+
_log = logging.getLogger("vocalstack")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class _Base(BaseModel):
|
|
14
|
+
# extra="ignore": additive contract changes must not break clients.
|
|
15
|
+
model_config = ConfigDict(populate_by_name=True, extra="ignore")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Access = Union[Literal["public", "private"], str]
|
|
19
|
+
|
|
20
|
+
ErrorCode = Union[Literal["invalid_audio", "invalid_options", "invalid_token", "capacity_exceeded", "slow_consumer", "engine_unavailable", "internal", "session_expired", "engine_lost", "forbidden", "broadcast_archived", "not_found", "conflict", "invalid_state", "password_required", "rate_limited", "preview_pending", "language_unavailable", "suspended", "key_expired", "key_revoked", "key_from_browser", "insufficient_credit", "usage_cap_reached", "payment_method_required", "terms_acceptance_required", "payment_method_in_use", "billing_details_required", "promo_code_invalid", "auto_top_up_off", "range_too_long", "quota_exceeded", "idempotency_key_reused", "method_not_allowed", "payload_too_large", "unsupported_media_type", "invalid_body", "timeout", "language_limit_reached", "unavailable"], str]
|
|
21
|
+
|
|
22
|
+
SampleWarning = Union[Literal["overlaps", "noisy", "weak_voice", "unclear", "cut_off"], str]
|
|
23
|
+
|
|
24
|
+
AudioEncoding = Union[Literal["pcm_f32le"], str]
|
|
25
|
+
|
|
26
|
+
FixKind = Union[Literal["extension", "scheme", "page_stream"], str]
|
|
27
|
+
|
|
28
|
+
SourceProblem = Union[Literal["not_found", "refused", "server_error", "unknown_host", "unreachable", "private_address", "timeout", "web_page", "bad_playlist", "not_audio", "unsupported", "youtube_upcoming", "youtube_not_live", "youtube_unavailable", "youtube_busy"], str]
|
|
29
|
+
|
|
30
|
+
AudioSourceState = Union[Literal["ready", "error"], str]
|
|
31
|
+
|
|
32
|
+
TranscriptionState = Union[Literal["idle", "pending", "live", "paused", "processing", "ended", "finalized"], str]
|
|
33
|
+
|
|
34
|
+
Lifecycle = Union[Literal["active", "archived", "purged"], str]
|
|
35
|
+
|
|
36
|
+
LatencyMode = Union[Literal["auto", "fast", "accuracy"], str]
|
|
37
|
+
|
|
38
|
+
SpeakerLabels = Union[Literal["auto", "on", "off"], str]
|
|
39
|
+
|
|
40
|
+
ClientApp = Union[Literal["mac_app"], str]
|
|
41
|
+
|
|
42
|
+
ClientKind = Union[Literal["dashboard", "chrome_extension", "mac_app", "obs_plugin", "sdk", "other"], str]
|
|
43
|
+
|
|
44
|
+
Decoder = Union[Literal["fast", "accuracy"], str]
|
|
45
|
+
|
|
46
|
+
Consent = Union[Literal["pending", "granted", "refused"], str]
|
|
47
|
+
|
|
48
|
+
NotVoicedReason = Union[Literal["rewrite"], str]
|
|
49
|
+
|
|
50
|
+
DoneReason = Union[Literal["eof", "max_duration", "cancelled"], str]
|
|
51
|
+
|
|
52
|
+
ExportFormat = Union[Literal["json", "srt", "vtt", "txt", "md", "xlsx", "pdf"], str]
|
|
53
|
+
|
|
54
|
+
ExportTimestamps = Union[Literal["off", "paragraph", "line"], str]
|
|
55
|
+
|
|
56
|
+
FileUploadState = Union[Literal["uploading", "complete"], str]
|
|
57
|
+
|
|
58
|
+
HealthStatus = Union[Literal["ok"], str]
|
|
59
|
+
|
|
60
|
+
IngestState = Union[Literal["connecting", "streaming", "reconnecting", "stopped", "failed"], str]
|
|
61
|
+
|
|
62
|
+
InputKind = Union[Literal["live", "file", "url", "stream"], str]
|
|
63
|
+
|
|
64
|
+
InviteState = Union[Literal["pending", "expired"], str]
|
|
65
|
+
|
|
66
|
+
QueueReason = Union[Literal["concurrency"], str]
|
|
67
|
+
|
|
68
|
+
JobState = Union[Literal["queued", "fetching", "transcribing", "done", "failed", "cropping", "stopped"], str]
|
|
69
|
+
|
|
70
|
+
LanguageStatusState = Union[Literal["matches", "mismatch", "unknown", "change_unsupported"], str]
|
|
71
|
+
|
|
72
|
+
LinkKind = Union[Literal["live", "file", "unknown"], str]
|
|
73
|
+
|
|
74
|
+
ProbeReason = Union[Literal["web_page", "site_not_fetched", "meeting", "not_found", "unreachable", "forbidden", "not_media", "copy_protected", "too_long", "unknown"], str]
|
|
75
|
+
|
|
76
|
+
LoadingStage = Union[Literal["download", "model"], str]
|
|
77
|
+
|
|
78
|
+
SourceKind = Union[Literal["file", "url"], str]
|
|
79
|
+
|
|
80
|
+
PullState = Union[Literal["connecting", "streaming", "reconnecting", "failed"], str]
|
|
81
|
+
|
|
82
|
+
RecordingState = Union[Literal["pending", "live", "paused", "processing", "ended", "finalized"], str]
|
|
83
|
+
|
|
84
|
+
SentenceStatus = Union[Literal["open", "closed", "dropped"], str]
|
|
85
|
+
|
|
86
|
+
VoiceStatusState = Union[Literal["preparing", "unavailable"], str]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class AccountClosing(_Base):
|
|
90
|
+
at: str
|
|
91
|
+
unspent_paid_credit_refunded: bool = Field(alias="unspentPaidCreditRefunded")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class Actor(_Base):
|
|
95
|
+
api_key_id: Optional[str] = Field(default=None, alias="apiKeyId")
|
|
96
|
+
display_name: Optional[str] = Field(default=None, alias="displayName")
|
|
97
|
+
user_id: Optional[str] = Field(default=None, alias="userId")
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class Allowance(_Base):
|
|
101
|
+
limit: Optional[int] = None
|
|
102
|
+
remaining: Optional[int] = None
|
|
103
|
+
resets_at: Optional[str] = Field(default=None, alias="resetsAt")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class WordAlt(_Base):
|
|
107
|
+
prob: float
|
|
108
|
+
text: str
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class Word(_Base):
|
|
112
|
+
alts: Optional[List["WordAlt"]] = None
|
|
113
|
+
end: float
|
|
114
|
+
prob: Optional[float] = None
|
|
115
|
+
recognized: Optional[str] = None
|
|
116
|
+
script: Optional[bool] = None
|
|
117
|
+
start: float
|
|
118
|
+
text: str
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class AmendTail(_Base):
|
|
122
|
+
"""The words an amend gave a segment's end: `words` replace its last
|
|
123
|
+
`replaced` words."""
|
|
124
|
+
|
|
125
|
+
replaced: int
|
|
126
|
+
words: List["Word"]
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class ErrorData(_Base):
|
|
130
|
+
details: Optional[Dict[str, Any]] = None
|
|
131
|
+
retryable: bool
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class ApiErrorBody(_Base):
|
|
135
|
+
code: ErrorCode
|
|
136
|
+
data: "ErrorData"
|
|
137
|
+
defined: bool
|
|
138
|
+
message: str
|
|
139
|
+
request_id: Optional[str] = Field(default=None, alias="requestId")
|
|
140
|
+
status: int
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class AppStreamKey(_Base):
|
|
144
|
+
"""An app stream key as it is listed: never in full."""
|
|
145
|
+
|
|
146
|
+
audio: Optional[str] = None
|
|
147
|
+
created_at: str = Field(alias="createdAt")
|
|
148
|
+
id: str
|
|
149
|
+
live: bool
|
|
150
|
+
masked_stream_key: str = Field(alias="maskedStreamKey")
|
|
151
|
+
name: str
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class PickedSamples(_Base):
|
|
155
|
+
"""Whether a set of samples holds enough speech to build a voice from."""
|
|
156
|
+
|
|
157
|
+
enough: bool
|
|
158
|
+
needed_s: float = Field(alias="neededS")
|
|
159
|
+
pitched_s: float = Field(alias="pitchedS")
|
|
160
|
+
seconds: float
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class SampleCandidate(_Base):
|
|
164
|
+
"""One sentence of a speaker that a voice could be cloned from."""
|
|
165
|
+
|
|
166
|
+
chosen: bool
|
|
167
|
+
end: float
|
|
168
|
+
snr_db: Optional[float] = Field(default=None, alias="snrDb")
|
|
169
|
+
speech_s: Optional[float] = Field(default=None, alias="speechS")
|
|
170
|
+
start: float
|
|
171
|
+
text: str
|
|
172
|
+
voiced: Optional[float] = None
|
|
173
|
+
warning: Optional[SampleWarning] = None
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class AppearanceSamples(_Base):
|
|
177
|
+
"""A speaker's sentences in one recording, judged as samples for a cloned
|
|
178
|
+
voice, and the ones the server would use."""
|
|
179
|
+
|
|
180
|
+
appearance: int
|
|
181
|
+
chosen_s: float = Field(alias="chosenS")
|
|
182
|
+
chosen_speech_s: float = Field(alias="chosenSpeechS")
|
|
183
|
+
picked: Optional["PickedSamples"] = None
|
|
184
|
+
samples: List["SampleCandidate"]
|
|
185
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class CloneRef(_Base):
|
|
189
|
+
id: str
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class AppearanceView(_Base):
|
|
193
|
+
gender: Optional[str] = None
|
|
194
|
+
gender_confidence: Optional[float] = Field(default=None, alias="genderConfidence")
|
|
195
|
+
identified: Optional[bool] = None
|
|
196
|
+
identified_confidence: Optional[float] = Field(default=None, alias="identifiedConfidence")
|
|
197
|
+
name: str
|
|
198
|
+
number: Optional[int] = None
|
|
199
|
+
returning: Optional[bool] = None
|
|
200
|
+
speaker: int
|
|
201
|
+
speaker_color: Optional[str] = Field(default=None, alias="speakerColor")
|
|
202
|
+
speaker_id: Optional[str] = Field(default=None, alias="speakerId")
|
|
203
|
+
speech_s: Optional[float] = Field(default=None, alias="speechS")
|
|
204
|
+
voice: Optional["CloneRef"] = None
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class AudioCapabilities(_Base):
|
|
208
|
+
channels: List[int]
|
|
209
|
+
encodings: List[AudioEncoding]
|
|
210
|
+
sample_rates: List[int] = Field(alias="sampleRates")
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
class AudioFormat(_Base):
|
|
214
|
+
channels: Optional[int] = None
|
|
215
|
+
encoding: Optional[AudioEncoding] = None
|
|
216
|
+
sample_rate: Optional[int] = Field(default=None, alias="sampleRate")
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class AudioSource(_Base):
|
|
220
|
+
"""A stream a broadcast can record from (`Broadcast.audioSources`, design
|
|
221
|
+
78): a YouTube live or an internet radio address kept with the
|
|
222
|
+
broadcast. `POST /v1/broadcasts/{id}/record` with `audioSource` set
|
|
223
|
+
to its id records it in a new live transcription."""
|
|
224
|
+
|
|
225
|
+
id: str
|
|
226
|
+
name: str
|
|
227
|
+
url: str
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class AudioSourceFix(_Base):
|
|
231
|
+
"""An address that was opened and gave audio, offered in place of the one
|
|
232
|
+
that did not."""
|
|
233
|
+
|
|
234
|
+
kind: FixKind
|
|
235
|
+
label: str
|
|
236
|
+
url: str
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
class AudioSourceCheck(_Base):
|
|
240
|
+
"""`GET /v1/broadcasts/{id}/audio-sources/{source}/check`."""
|
|
241
|
+
|
|
242
|
+
checked_at: str = Field(alias="checkedAt")
|
|
243
|
+
fix: Optional["AudioSourceFix"] = None
|
|
244
|
+
http_status: Optional[int] = Field(default=None, alias="httpStatus")
|
|
245
|
+
message: Optional[str] = None
|
|
246
|
+
problem: Optional[SourceProblem] = None
|
|
247
|
+
state: AudioSourceState
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class AutoTopUpAttempt(_Base):
|
|
251
|
+
amount: float
|
|
252
|
+
at: str
|
|
253
|
+
outcome: str
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
class MoneyRange(_Base):
|
|
257
|
+
"""Two amounts, both inclusive."""
|
|
258
|
+
|
|
259
|
+
max: float
|
|
260
|
+
min: float
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
class AutoTopUpChoices(_Base):
|
|
264
|
+
amount_range: "MoneyRange" = Field(alias="amountRange")
|
|
265
|
+
amounts: List[float]
|
|
266
|
+
auto_topup_max_per_day: int = Field(alias="autoTopupMaxPerDay")
|
|
267
|
+
threshold_range: "MoneyRange" = Field(alias="thresholdRange")
|
|
268
|
+
thresholds: List[float]
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
class AutoTopUpSettings(_Base):
|
|
272
|
+
"""`PUT /v1/billing/auto-top-up`."""
|
|
273
|
+
|
|
274
|
+
amount: Optional[float] = None
|
|
275
|
+
enabled: bool
|
|
276
|
+
threshold: Optional[float] = None
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
class SettingLowering(_Base):
|
|
280
|
+
"""A lowering of a billing setting that changes the account's terms (the
|
|
281
|
+
days data is kept after a downgrade, the auto top-up daily limit),
|
|
282
|
+
told with at least 30 days' notice."""
|
|
283
|
+
|
|
284
|
+
after_date: Optional[str] = Field(default=None, alias="afterDate")
|
|
285
|
+
applies_at: str = Field(alias="appliesAt")
|
|
286
|
+
refund_deadline: str = Field(alias="refundDeadline")
|
|
287
|
+
refund_window_open: bool = Field(alias="refundWindowOpen")
|
|
288
|
+
renewal_on: Optional[str] = Field(default=None, alias="renewalOn")
|
|
289
|
+
to: int
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class AutoTopUpView(_Base):
|
|
293
|
+
amount: Optional[float] = None
|
|
294
|
+
auto_topup_max_per_day: int = Field(alias="autoTopupMaxPerDay")
|
|
295
|
+
auto_topup_max_per_day_lowering: Optional["SettingLowering"] = Field(default=None, alias="autoTopupMaxPerDayLowering")
|
|
296
|
+
available: bool
|
|
297
|
+
enabled: bool
|
|
298
|
+
last: Optional["AutoTopUpAttempt"] = None
|
|
299
|
+
offered: bool
|
|
300
|
+
threshold: Optional[float] = None
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
class BillingDetails(_Base):
|
|
304
|
+
"""`GET / PUT /v1/billing/details`."""
|
|
305
|
+
|
|
306
|
+
city: Optional[str] = None
|
|
307
|
+
country: Optional[str] = None
|
|
308
|
+
email: Optional[str] = None
|
|
309
|
+
line1: Optional[str] = None
|
|
310
|
+
name: Optional[str] = None
|
|
311
|
+
postal_code: Optional[str] = Field(default=None, alias="postalCode")
|
|
312
|
+
tax_id: Optional[str] = Field(default=None, alias="taxId")
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
class CardView(_Base):
|
|
316
|
+
brand: str
|
|
317
|
+
declined: bool
|
|
318
|
+
exp_month: Optional[int] = Field(default=None, alias="expMonth")
|
|
319
|
+
exp_year: Optional[int] = Field(default=None, alias="expYear")
|
|
320
|
+
last4: str
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
class DowngradeKeepDays(_Base):
|
|
324
|
+
"""The account's days data is kept after a downgrade (Terms §14)."""
|
|
325
|
+
|
|
326
|
+
days: int
|
|
327
|
+
lowering: Optional["SettingLowering"] = None
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
class Limits2(_Base):
|
|
331
|
+
"""The limits of a version. `null` is unlimited."""
|
|
332
|
+
|
|
333
|
+
concurrent_transcriptions: Optional[int] = Field(default=None, alias="concurrentTranscriptions")
|
|
334
|
+
creates_per_hour: Optional[int] = Field(default=None, alias="createsPerHour")
|
|
335
|
+
creates_per_hour_unpaid: Optional[int] = Field(default=None, alias="createsPerHourUnpaid")
|
|
336
|
+
max_file_bytes: Optional[int] = Field(default=None, alias="maxFileBytes")
|
|
337
|
+
max_transcription_seconds: Optional[int] = Field(default=None, alias="maxTranscriptionSeconds")
|
|
338
|
+
questions_per_day: Optional[int] = Field(default=None, alias="questionsPerDay")
|
|
339
|
+
requests_per_min: Optional[int] = Field(default=None, alias="requestsPerMin")
|
|
340
|
+
retention_audio_days: Optional[int] = Field(default=None, alias="retentionAudioDays")
|
|
341
|
+
retention_speakers_days: Optional[int] = Field(default=None, alias="retentionSpeakersDays")
|
|
342
|
+
retention_transcriptions_days: Optional[int] = Field(default=None, alias="retentionTranscriptionsDays")
|
|
343
|
+
retention_video_days: Optional[int] = Field(default=None, alias="retentionVideoDays")
|
|
344
|
+
vector_searches_per_hour: Optional[int] = Field(default=None, alias="vectorSearchesPerHour")
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
class LimitsUsage(_Base):
|
|
348
|
+
"""The plan's counted limits, as used now."""
|
|
349
|
+
|
|
350
|
+
concurrent_limit: Optional[int] = Field(default=None, alias="concurrentLimit")
|
|
351
|
+
create_limit: Optional[int] = Field(default=None, alias="createLimit")
|
|
352
|
+
created_last_hour: int = Field(alias="createdLastHour")
|
|
353
|
+
resets_at: Optional[str] = Field(default=None, alias="resetsAt")
|
|
354
|
+
running: int
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
class LowBalanceAlertView(_Base):
|
|
358
|
+
enabled: bool
|
|
359
|
+
threshold: float
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
class MonthlyCreditView(_Base):
|
|
363
|
+
granted: float
|
|
364
|
+
granted_at: str = Field(alias="grantedAt")
|
|
365
|
+
remaining: float
|
|
366
|
+
renews_at: Optional[str] = Field(default=None, alias="renewsAt")
|
|
367
|
+
used: float
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
class PriceChange(_Base):
|
|
371
|
+
from_: float = Field(alias="from")
|
|
372
|
+
interval: str
|
|
373
|
+
to: float
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
class Rates(_Base):
|
|
377
|
+
"""The rate card of a version: dollars per hour, and the least a
|
|
378
|
+
transcription is billed."""
|
|
379
|
+
|
|
380
|
+
file_per_hour: float = Field(alias="filePerHour")
|
|
381
|
+
live_per_hour: float = Field(alias="livePerHour")
|
|
382
|
+
minimum_seconds: int = Field(alias="minimumSeconds")
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
class PendingChange(_Base):
|
|
386
|
+
after_date: Optional[str] = Field(default=None, alias="afterDate")
|
|
387
|
+
applies_at: str = Field(alias="appliesAt")
|
|
388
|
+
below_zero_limit_changes: bool = Field(alias="belowZeroLimitChanges")
|
|
389
|
+
cancel_before: Optional[str] = Field(default=None, alias="cancelBefore")
|
|
390
|
+
changes: str
|
|
391
|
+
price: Optional["PriceChange"] = None
|
|
392
|
+
rates: "Rates"
|
|
393
|
+
refund_deadline: Optional[str] = Field(default=None, alias="refundDeadline")
|
|
394
|
+
refund_window_open: bool = Field(alias="refundWindowOpen")
|
|
395
|
+
renewal_on: Optional[str] = Field(default=None, alias="renewalOn")
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
class PendingPayment(_Base):
|
|
399
|
+
amount: float
|
|
400
|
+
kind: str
|
|
401
|
+
since: str
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
class DateRange(_Base):
|
|
405
|
+
"""Two days, both inclusive (`YYYY-MM-DD`)."""
|
|
406
|
+
|
|
407
|
+
end: str
|
|
408
|
+
start: str
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
class PlanRef(_Base):
|
|
412
|
+
id: str
|
|
413
|
+
kind: str
|
|
414
|
+
name: str
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
class NextPayment(_Base):
|
|
418
|
+
amount: float
|
|
419
|
+
at: str
|
|
420
|
+
cancel_before: str = Field(alias="cancelBefore")
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
class PendingInterval(_Base):
|
|
424
|
+
applies_at: Optional[str] = Field(default=None, alias="appliesAt")
|
|
425
|
+
cancel_before: Optional[str] = Field(default=None, alias="cancelBefore")
|
|
426
|
+
interval: str
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
class ScheduledEnd(_Base):
|
|
430
|
+
at: str
|
|
431
|
+
reason: str
|
|
432
|
+
return_plan: Optional[str] = Field(default=None, alias="returnPlan")
|
|
433
|
+
unused_period_refunded: bool = Field(alias="unusedPeriodRefunded")
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
class SwitchPrices(_Base):
|
|
437
|
+
month: Optional[float] = None
|
|
438
|
+
year: Optional[float] = None
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
class SubscriptionView(_Base):
|
|
442
|
+
cancel_at_period_end: bool = Field(alias="cancelAtPeriodEnd")
|
|
443
|
+
cancel_reason: Optional[str] = Field(default=None, alias="cancelReason")
|
|
444
|
+
current_period_end: Optional[str] = Field(default=None, alias="currentPeriodEnd")
|
|
445
|
+
current_period_start: Optional[str] = Field(default=None, alias="currentPeriodStart")
|
|
446
|
+
interval: str
|
|
447
|
+
next_payment: Optional["NextPayment"] = Field(default=None, alias="nextPayment")
|
|
448
|
+
past_due_since: Optional[str] = Field(default=None, alias="pastDueSince")
|
|
449
|
+
pending_interval: Optional["PendingInterval"] = Field(default=None, alias="pendingInterval")
|
|
450
|
+
return_plan: Optional[str] = Field(default=None, alias="returnPlan")
|
|
451
|
+
scheduled_end: Optional["ScheduledEnd"] = Field(default=None, alias="scheduledEnd")
|
|
452
|
+
status: str
|
|
453
|
+
switch_prices: "SwitchPrices" = Field(alias="switchPrices")
|
|
454
|
+
yearly_opt_in: bool = Field(alias="yearlyOptIn")
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
class BillingView(_Base):
|
|
458
|
+
"""`GET /v1/billing`: the account as the Dashboard shows it. The plan's
|
|
459
|
+
below-zero limit (its amount) is never on it: `inBelowZero` says whether
|
|
460
|
+
running transcriptions go on below zero, never how far."""
|
|
461
|
+
|
|
462
|
+
account_closing: Optional["AccountClosing"] = Field(default=None, alias="accountClosing")
|
|
463
|
+
account_created: Optional[str] = Field(default=None, alias="accountCreated")
|
|
464
|
+
auto_top_up: "AutoTopUpView" = Field(alias="autoTopUp")
|
|
465
|
+
balance: float
|
|
466
|
+
below_zero_limit_changes_at: Optional[str] = Field(default=None, alias="belowZeroLimitChangesAt")
|
|
467
|
+
below_zero_limit_on: bool = Field(alias="belowZeroLimitOn")
|
|
468
|
+
can_start: bool = Field(alias="canStart")
|
|
469
|
+
can_start_live: bool = Field(alias="canStartLive")
|
|
470
|
+
card: Optional["CardView"] = None
|
|
471
|
+
downgrade_keep_days: "DowngradeKeepDays" = Field(alias="downgradeKeepDays")
|
|
472
|
+
enabled: bool
|
|
473
|
+
has_paid: bool = Field(alias="hasPaid")
|
|
474
|
+
in_below_zero: bool = Field(alias="inBelowZero")
|
|
475
|
+
limits: Optional["Limits2"] = None
|
|
476
|
+
limits_usage: Optional["LimitsUsage"] = Field(default=None, alias="limitsUsage")
|
|
477
|
+
low_balance_alert: "LowBalanceAlertView" = Field(alias="lowBalanceAlert")
|
|
478
|
+
monthly_credit: Optional["MonthlyCreditView"] = Field(default=None, alias="monthlyCredit")
|
|
479
|
+
pending_change: Optional["PendingChange"] = Field(default=None, alias="pendingChange")
|
|
480
|
+
pending_payment: Optional["PendingPayment"] = Field(default=None, alias="pendingPayment")
|
|
481
|
+
period: Optional["DateRange"] = None
|
|
482
|
+
plan: Optional["PlanRef"] = None
|
|
483
|
+
previous_period: Optional["DateRange"] = Field(default=None, alias="previousPeriod")
|
|
484
|
+
rates: Optional["Rates"] = None
|
|
485
|
+
retention_deadline: Optional[str] = Field(default=None, alias="retentionDeadline")
|
|
486
|
+
start_block: Optional[str] = Field(default=None, alias="startBlock")
|
|
487
|
+
start_block_live: Optional[str] = Field(default=None, alias="startBlockLive")
|
|
488
|
+
subscription: Optional["SubscriptionView"] = None
|
|
489
|
+
top_up_url: str = Field(alias="topUpUrl")
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
class Blocked(_Base):
|
|
493
|
+
at: str
|
|
494
|
+
contact: str
|
|
495
|
+
reason: str
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
class CurrentTranscription(_Base):
|
|
499
|
+
"""The transcription a broadcast's link is showing now
|
|
500
|
+
(`Broadcast.currentTranscription`): a live transcription feeding it,
|
|
501
|
+
while it records."""
|
|
502
|
+
|
|
503
|
+
started_at: Optional[str] = Field(default=None, alias="startedAt")
|
|
504
|
+
state: TranscriptionState
|
|
505
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
class LastTranscription(_Base):
|
|
509
|
+
"""The newest transcription among those feeding a broadcast
|
|
510
|
+
(`Broadcast.lastTranscription`)."""
|
|
511
|
+
|
|
512
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
513
|
+
started_at: Optional[str] = Field(default=None, alias="startedAt")
|
|
514
|
+
state: TranscriptionState
|
|
515
|
+
title: Optional[str] = None
|
|
516
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
class ConfidencePolicy(_Base):
|
|
520
|
+
"""Env defaults, overridden per broadcast, transcription or recording."""
|
|
521
|
+
|
|
522
|
+
hide_below: Optional[float] = Field(default=None, alias="hideBelow")
|
|
523
|
+
low_threshold: Optional[float] = Field(default=None, alias="lowThreshold")
|
|
524
|
+
# This many low-confidence words suppress a line for listeners.
|
|
525
|
+
suppress_count: Optional[int] = Field(default=None, alias="suppressCount")
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
class Settings(_Base):
|
|
529
|
+
"""A broadcast's, transcription's or recording's capture settings (the
|
|
530
|
+
design's settings sheet): what a recording made in it starts with."""
|
|
531
|
+
|
|
532
|
+
confidence: Optional["ConfidencePolicy"] = None
|
|
533
|
+
latency_mode: Optional[LatencyMode] = Field(default=None, alias="latencyMode")
|
|
534
|
+
max_duration_s: Optional[int] = Field(default=None, alias="maxDurationS")
|
|
535
|
+
max_pause_s: Optional[int] = Field(default=None, alias="maxPauseS")
|
|
536
|
+
silence_auto_pause_s: Optional[int] = Field(default=None, alias="silenceAutoPauseS")
|
|
537
|
+
speaker_labels: Optional[SpeakerLabels] = Field(default=None, alias="speakerLabels")
|
|
538
|
+
spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
|
|
539
|
+
summary: Optional[bool] = None
|
|
540
|
+
summary_translations: Optional[bool] = Field(default=None, alias="summaryTranslations")
|
|
541
|
+
title: Optional[bool] = None
|
|
542
|
+
translation_tts: Optional[bool] = Field(default=None, alias="translationTts")
|
|
543
|
+
# Accepted for compatibility and ignored: VocalStack picks the voice that reads each speaker, and the only choice is whether cloned voices are used (`voiceCloning`).
|
|
544
|
+
voice_by_lang: Optional[Dict[str, str]] = Field(default=None, alias="voiceByLang")
|
|
545
|
+
voice_cloning: Optional[bool] = Field(default=None, alias="voiceCloning")
|
|
546
|
+
voice_cloning_consent: Optional[bool] = Field(default=None, alias="voiceCloningConsent")
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
class TranscriptionRef(_Base):
|
|
550
|
+
"""A live transcription feeding a broadcast (`Broadcast.transcriptions`)."""
|
|
551
|
+
|
|
552
|
+
id: str
|
|
553
|
+
last_recorded_at: Optional[str] = Field(default=None, alias="lastRecordedAt")
|
|
554
|
+
made: Optional[bool] = None
|
|
555
|
+
name: str
|
|
556
|
+
recording: bool
|
|
557
|
+
source: "CaptureSource"
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
class Broadcast(_Base):
|
|
561
|
+
"""A broadcast: the link listeners open (`code`), fed by the live
|
|
562
|
+
transcriptions attached to it (`transcriptions`) or recording one of
|
|
563
|
+
its own audio sources (`audioSources`). Recording it makes a new live
|
|
564
|
+
transcription each time."""
|
|
565
|
+
|
|
566
|
+
access: Access
|
|
567
|
+
archived_at: Optional[str] = Field(default=None, alias="archivedAt")
|
|
568
|
+
audio_sources: Optional[List["AudioSource"]] = Field(default=None, alias="audioSources")
|
|
569
|
+
code: str
|
|
570
|
+
created_at: str = Field(alias="createdAt")
|
|
571
|
+
current_transcription: Optional["CurrentTranscription"] = Field(default=None, alias="currentTranscription")
|
|
572
|
+
id: str
|
|
573
|
+
kind: Literal["broadcast"] = "broadcast"
|
|
574
|
+
last_recorded_at: Optional[str] = Field(default=None, alias="lastRecordedAt")
|
|
575
|
+
last_transcription: Optional["LastTranscription"] = Field(default=None, alias="lastTranscription")
|
|
576
|
+
lifecycle: Lifecycle
|
|
577
|
+
listeners_now: Optional[int] = Field(default=None, alias="listenersNow")
|
|
578
|
+
name: str
|
|
579
|
+
owner_principal_id: str = Field(alias="ownerPrincipalId")
|
|
580
|
+
purge_after: Optional[str] = Field(default=None, alias="purgeAfter")
|
|
581
|
+
settings: "Settings"
|
|
582
|
+
share_url: str = Field(alias="shareUrl")
|
|
583
|
+
source: "CaptureSource"
|
|
584
|
+
transcription_count: int = Field(alias="transcriptionCount")
|
|
585
|
+
transcriptions: Optional[List["TranscriptionRef"]] = None
|
|
586
|
+
updated_at: str = Field(alias="updatedAt")
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
class BroadcastRef(_Base):
|
|
590
|
+
"""A broadcast a live transcription feeds (`Transcription.broadcasts`)."""
|
|
591
|
+
|
|
592
|
+
access: Access
|
|
593
|
+
code: str
|
|
594
|
+
id: str
|
|
595
|
+
made: Optional[bool] = None
|
|
596
|
+
name: str
|
|
597
|
+
share_url: str = Field(alias="shareUrl")
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
class Limits(_Base):
|
|
601
|
+
audio_buffer_s: int = Field(alias="audioBufferS")
|
|
602
|
+
max_duration_s: int = Field(alias="maxDurationS")
|
|
603
|
+
max_upload_bytes: int = Field(alias="maxUploadBytes")
|
|
604
|
+
recording_max_duration_s: Optional[int] = Field(default=None, alias="recordingMaxDurationS")
|
|
605
|
+
session_token_ttl_s: int = Field(alias="sessionTokenTtlS")
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
class Capabilities(_Base):
|
|
609
|
+
audio: "AudioCapabilities"
|
|
610
|
+
languages: List[str]
|
|
611
|
+
latency_modes: List[LatencyMode] = Field(alias="latencyModes")
|
|
612
|
+
limits: "Limits"
|
|
613
|
+
speaker_label_modes: List[SpeakerLabels] = Field(alias="speakerLabelModes")
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
class CapturePage(_Base):
|
|
617
|
+
"""The captured browser tab's address and title (`page`)."""
|
|
618
|
+
|
|
619
|
+
title: Optional[str] = None
|
|
620
|
+
url: Optional[str] = None
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
class CaptureSpan(_Base):
|
|
624
|
+
idx: int
|
|
625
|
+
media_end: Optional[float] = Field(default=None, alias="mediaEnd")
|
|
626
|
+
media_start: float = Field(alias="mediaStart")
|
|
627
|
+
reason: str
|
|
628
|
+
wall_end: Optional[float] = Field(default=None, alias="wallEnd")
|
|
629
|
+
wall_start: float = Field(alias="wallStart")
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
class TranscriptionCharge(_Base):
|
|
633
|
+
"""A charge on the wire (`GET /v1/billing/charges`)."""
|
|
634
|
+
|
|
635
|
+
amount: float
|
|
636
|
+
audio_seconds: float = Field(alias="audioSeconds")
|
|
637
|
+
covered_seconds: float = Field(alias="coveredSeconds")
|
|
638
|
+
kind: str
|
|
639
|
+
minimum_applied: bool = Field(alias="minimumApplied")
|
|
640
|
+
name: Optional[str] = None
|
|
641
|
+
opened_at: str = Field(alias="openedAt")
|
|
642
|
+
rate_per_hour: float = Field(alias="ratePerHour")
|
|
643
|
+
seconds_billed: float = Field(alias="secondsBilled")
|
|
644
|
+
settled_at: Optional[str] = Field(default=None, alias="settledAt")
|
|
645
|
+
state: str
|
|
646
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
class ChargePage(_Base):
|
|
650
|
+
"""`GET /v1/billing/charges`."""
|
|
651
|
+
|
|
652
|
+
charges: List["TranscriptionCharge"]
|
|
653
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
class CheckPromoCode(_Base):
|
|
657
|
+
"""`POST /v1/billing/promo-codes/check`."""
|
|
658
|
+
|
|
659
|
+
code: str
|
|
660
|
+
for_: str = Field(alias="for")
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
class CheckoutView(_Base):
|
|
664
|
+
"""A checkout as the Dashboard sees it."""
|
|
665
|
+
|
|
666
|
+
amount: Optional[float] = None
|
|
667
|
+
checkout_id: str = Field(alias="checkoutId")
|
|
668
|
+
completed_at: Optional[str] = Field(default=None, alias="completedAt")
|
|
669
|
+
created_at: str = Field(alias="createdAt")
|
|
670
|
+
expires_at: Optional[str] = Field(default=None, alias="expiresAt")
|
|
671
|
+
interval: Optional[str] = None
|
|
672
|
+
kind: str
|
|
673
|
+
plan_id: Optional[str] = Field(default=None, alias="planId")
|
|
674
|
+
status: str
|
|
675
|
+
url: Optional[str] = None
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
class ClientMessages(_Base):
|
|
679
|
+
"""Copy overrides; `null` keeps the app's own."""
|
|
680
|
+
|
|
681
|
+
deprecated: Optional[str] = None
|
|
682
|
+
unsupported: Optional[str] = None
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
class ClientRelease(_Base):
|
|
686
|
+
"""A build to update to."""
|
|
687
|
+
|
|
688
|
+
bytes: int
|
|
689
|
+
notes: Optional[str] = None
|
|
690
|
+
sha256: str
|
|
691
|
+
signature: str
|
|
692
|
+
url: str
|
|
693
|
+
version: str
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
class ClientPolicy(_Base):
|
|
697
|
+
"""An app's version policy."""
|
|
698
|
+
|
|
699
|
+
deprecated_below: Optional[str] = Field(default=None, alias="deprecatedBelow")
|
|
700
|
+
latest: Optional["ClientRelease"] = None
|
|
701
|
+
message: "ClientMessages"
|
|
702
|
+
unsupported_below: Optional[str] = Field(default=None, alias="unsupportedBelow")
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
class Clone(_Base):
|
|
706
|
+
"""A speaker's cloned voice: the sound, built from the speaker's sample.
|
|
707
|
+
Its id is the speaker's, so `clone:<id>` names it as a voice."""
|
|
708
|
+
|
|
709
|
+
disabled_at: Optional[str] = Field(default=None, alias="disabledAt")
|
|
710
|
+
enabled: bool
|
|
711
|
+
error: Optional[str] = None
|
|
712
|
+
id: str
|
|
713
|
+
preview_url: Optional[str] = Field(default=None, alias="previewUrl")
|
|
714
|
+
progress: int
|
|
715
|
+
sample_s: float = Field(alias="sampleS")
|
|
716
|
+
speech_s: Optional[float] = Field(default=None, alias="speechS")
|
|
717
|
+
state: str
|
|
718
|
+
uses: int
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
class CommittedSegment(_Base):
|
|
722
|
+
# `true` when the segment was decoded by the fast model: the `auto` transcription method catching up after falling behind real time, or the `fast` method.
|
|
723
|
+
catchup: Optional[bool] = None
|
|
724
|
+
confidence: Optional[float] = None
|
|
725
|
+
decoder: Optional[Decoder] = None
|
|
726
|
+
end: float
|
|
727
|
+
gap_before: Optional[float] = Field(default=None, alias="gapBefore")
|
|
728
|
+
language: Optional[str] = None
|
|
729
|
+
latency_s: Optional[float] = Field(default=None, alias="latencyS")
|
|
730
|
+
recognized_text: Optional[str] = Field(default=None, alias="recognizedText")
|
|
731
|
+
script_from: Optional[int] = Field(default=None, alias="scriptFrom")
|
|
732
|
+
script_pos: Optional[int] = Field(default=None, alias="scriptPos")
|
|
733
|
+
seq: int
|
|
734
|
+
speaker: int
|
|
735
|
+
speaker_confidence: Optional[float] = Field(default=None, alias="speakerConfidence")
|
|
736
|
+
speaker_provisional: Optional[bool] = Field(default=None, alias="speakerProvisional")
|
|
737
|
+
start: float
|
|
738
|
+
text: str
|
|
739
|
+
translation_sources: Optional[Dict[str, str]] = Field(default=None, alias="translationSources")
|
|
740
|
+
translations: Optional[Dict[str, str]] = None
|
|
741
|
+
words: List["Word"]
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
class FileUploadedPart(_Base):
|
|
745
|
+
etag: str
|
|
746
|
+
number: int
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
class CompleteFileUpload(_Base):
|
|
750
|
+
parts: List["FileUploadedPart"]
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
class Correction(_Base):
|
|
754
|
+
actor: "Actor"
|
|
755
|
+
applied_at: str = Field(alias="appliedAt")
|
|
756
|
+
batch_id: str = Field(alias="batchId")
|
|
757
|
+
from_: str = Field(alias="from")
|
|
758
|
+
id: str
|
|
759
|
+
kind: str
|
|
760
|
+
not_voiced_reason: Optional[NotVoicedReason] = Field(default=None, alias="notVoicedReason")
|
|
761
|
+
reverted_at: Optional[str] = Field(default=None, alias="revertedAt")
|
|
762
|
+
seq: Optional[int] = None
|
|
763
|
+
speaker: Optional[int] = None
|
|
764
|
+
to: str
|
|
765
|
+
voiced: Optional[bool] = None
|
|
766
|
+
word_idx: Optional[int] = Field(default=None, alias="wordIdx")
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
class WordEdit(_Base):
|
|
770
|
+
seq: int
|
|
771
|
+
to: str
|
|
772
|
+
word_idx: int = Field(alias="wordIdx")
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
class LineEdit(_Base):
|
|
776
|
+
"""Retype a whole segment. The word count may change; the new words are
|
|
777
|
+
timed evenly across the segment's span and all count as settled."""
|
|
778
|
+
|
|
779
|
+
seq: int
|
|
780
|
+
to: str
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
class CorrectionBatch(_Base):
|
|
784
|
+
edits: Optional[List["WordEdit"]] = None
|
|
785
|
+
lines: Optional[List["LineEdit"]] = None
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
class CorrectionPage(_Base):
|
|
789
|
+
"""`GET /v1/transcriptions/{id}/corrections`: one page, newest first."""
|
|
790
|
+
|
|
791
|
+
corrections: List["Correction"]
|
|
792
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
class CreateAppStreamKey(_Base):
|
|
796
|
+
"""`POST /v1/rtmp/keys`."""
|
|
797
|
+
|
|
798
|
+
name: str
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
class CreateAudioSource(_Base):
|
|
802
|
+
"""`POST /v1/broadcasts/{id}/audio-sources`."""
|
|
803
|
+
|
|
804
|
+
name: Optional[str] = None
|
|
805
|
+
url: str
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
class CreateBroadcast(_Base):
|
|
809
|
+
"""`POST /v1/broadcasts`."""
|
|
810
|
+
|
|
811
|
+
access: Optional[Access] = None
|
|
812
|
+
code: Optional[str] = None
|
|
813
|
+
name: str
|
|
814
|
+
password: Optional[str] = None
|
|
815
|
+
settings: Optional["Settings"] = None
|
|
816
|
+
source: Optional["CaptureSource"] = None
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
class CreateCheckout(_Base):
|
|
820
|
+
"""`POST /v1/billing/checkouts`."""
|
|
821
|
+
|
|
822
|
+
accept_terms: Optional[bool] = Field(default=None, alias="acceptTerms")
|
|
823
|
+
amount: Optional[float] = None
|
|
824
|
+
interval: Optional[str] = None
|
|
825
|
+
kind: str
|
|
826
|
+
plan_id: Optional[str] = Field(default=None, alias="planId")
|
|
827
|
+
promo_code: Optional[str] = Field(default=None, alias="promoCode")
|
|
828
|
+
# Deprecated and ignored: `acceptTerms` is the one consent.
|
|
829
|
+
waive_withdrawal: Optional[bool] = Field(default=None, alias="waiveWithdrawal")
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
class CreateFileUpload(_Base):
|
|
833
|
+
bytes: int
|
|
834
|
+
mime: Optional[str] = None
|
|
835
|
+
name: str
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
class CreateLiveTranscription(_Base):
|
|
839
|
+
"""`POST /v1/transcriptions/live`: a transcription captured as it is
|
|
840
|
+
spoken — this device's microphone, or a stream the server pulls.
|
|
841
|
+
It is created idle; `POST /v1/transcriptions/{id}/start` starts it."""
|
|
842
|
+
|
|
843
|
+
broadcasts: Optional[List[str]] = None
|
|
844
|
+
name: str
|
|
845
|
+
page: Optional["CapturePage"] = None
|
|
846
|
+
settings: Optional["Settings"] = None
|
|
847
|
+
source: Optional["CaptureSource"] = None
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
class CreateSessionResponse(_Base):
|
|
851
|
+
expires_at: str = Field(alias="expiresAt")
|
|
852
|
+
session_id: str = Field(alias="sessionId")
|
|
853
|
+
stream_url: str = Field(alias="streamUrl")
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
class CreateShareLink(_Base):
|
|
857
|
+
allow_download: Optional[bool] = Field(default=None, alias="allowDownload")
|
|
858
|
+
allow_export: Optional[bool] = Field(default=None, alias="allowExport")
|
|
859
|
+
allow_translate: Optional[bool] = Field(default=None, alias="allowTranslate")
|
|
860
|
+
label: str
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
class CreateSpeaker(_Base):
|
|
864
|
+
color: Optional[str] = None
|
|
865
|
+
consent: Optional[bool] = None
|
|
866
|
+
draft: Optional[bool] = None
|
|
867
|
+
gender: Optional[str] = None
|
|
868
|
+
name: str
|
|
869
|
+
sample_url: Optional[str] = Field(default=None, alias="sampleUrl")
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
class SampleSpan(_Base):
|
|
873
|
+
end: float
|
|
874
|
+
start: float
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
class CreateSpeakerFromAppearance(_Base):
|
|
878
|
+
appearance: int
|
|
879
|
+
color: Optional[str] = None
|
|
880
|
+
consent: Optional[bool] = None
|
|
881
|
+
draft: Optional[bool] = None
|
|
882
|
+
library: Optional[bool] = None
|
|
883
|
+
name: str
|
|
884
|
+
spans: Optional[List["SampleSpan"]] = None
|
|
885
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
class CreateSpeakerInvite(_Base):
|
|
889
|
+
color: Optional[str] = None
|
|
890
|
+
email: Optional[str] = None
|
|
891
|
+
gender: Optional[str] = None
|
|
892
|
+
name: str
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
class CreateTag(_Base):
|
|
896
|
+
color: Optional[Union[Literal["coral", "amber", "lime", "green", "teal", "blue", "violet", "pink"], str]] = None
|
|
897
|
+
name: str
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
class SettingsPatch(_Base):
|
|
901
|
+
"""Partial update (PATCH) — every field optional, `null` for
|
|
902
|
+
`spokenLanguage` means back to auto-detect."""
|
|
903
|
+
|
|
904
|
+
confidence: Optional["ConfidencePolicy"] = None
|
|
905
|
+
latency_mode: Optional[LatencyMode] = Field(default=None, alias="latencyMode")
|
|
906
|
+
max_duration_s: Optional[int] = Field(default=None, alias="maxDurationS")
|
|
907
|
+
max_pause_s: Optional[int] = Field(default=None, alias="maxPauseS")
|
|
908
|
+
silence_auto_pause_s: Optional[int] = Field(default=None, alias="silenceAutoPauseS")
|
|
909
|
+
speaker_labels: Optional[SpeakerLabels] = Field(default=None, alias="speakerLabels")
|
|
910
|
+
spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
|
|
911
|
+
summary: Optional[bool] = None
|
|
912
|
+
summary_translations: Optional[bool] = Field(default=None, alias="summaryTranslations")
|
|
913
|
+
title: Optional[bool] = None
|
|
914
|
+
translation_tts: Optional[bool] = Field(default=None, alias="translationTts")
|
|
915
|
+
# Accepted for compatibility and ignored: VocalStack picks the voice (see `Settings.voiceByLang`).
|
|
916
|
+
voice_by_lang: Optional[Dict[str, str]] = Field(default=None, alias="voiceByLang")
|
|
917
|
+
voice_cloning: Optional[bool] = Field(default=None, alias="voiceCloning")
|
|
918
|
+
voice_cloning_consent: Optional[bool] = Field(default=None, alias="voiceCloningConsent")
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
class CreateTranscription(_Base):
|
|
922
|
+
"""`POST /v1/transcriptions`: JSON for a URL, or the `options` part of a
|
|
923
|
+
multipart upload whose `file` part carries the media."""
|
|
924
|
+
|
|
925
|
+
crop: Optional[bool] = None
|
|
926
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
927
|
+
end_s: Optional[float] = Field(default=None, alias="endS")
|
|
928
|
+
name: Optional[str] = None
|
|
929
|
+
settings: Optional["SettingsPatch"] = None
|
|
930
|
+
share_link: Optional[bool] = Field(default=None, alias="shareLink")
|
|
931
|
+
start_s: Optional[float] = Field(default=None, alias="startS")
|
|
932
|
+
upload_id: Optional[str] = Field(default=None, alias="uploadId")
|
|
933
|
+
url: Optional[str] = None
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
class CreatedAppStreamKey(_Base):
|
|
937
|
+
"""The answer that made an app stream key: the one time it is in full."""
|
|
938
|
+
|
|
939
|
+
created_at: str = Field(alias="createdAt")
|
|
940
|
+
id: str
|
|
941
|
+
masked_stream_key: str = Field(alias="maskedStreamKey")
|
|
942
|
+
name: str
|
|
943
|
+
server_url: str = Field(alias="serverUrl")
|
|
944
|
+
stream_key: str = Field(alias="streamKey")
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
class CropRange(_Base):
|
|
948
|
+
"""A window of a file, in seconds into it. `end_s` absent = to the end."""
|
|
949
|
+
|
|
950
|
+
end_s: Optional[float] = Field(default=None, alias="endS")
|
|
951
|
+
start_s: Optional[float] = Field(default=None, alias="startS")
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
class CropWindow(_Base):
|
|
955
|
+
"""A window of the source, in seconds into it. `end_s` absent = to the end."""
|
|
956
|
+
|
|
957
|
+
end_s: Optional[float] = Field(default=None, alias="endS")
|
|
958
|
+
start_s: float = Field(alias="startS")
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
class DraftSegment(_Base):
|
|
962
|
+
speaker: int
|
|
963
|
+
start: float
|
|
964
|
+
tentative: bool
|
|
965
|
+
text: str
|
|
966
|
+
translations: Optional[Dict[str, str]] = None
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
class EventOptions(_Base):
|
|
970
|
+
drafts: Optional[bool] = None
|
|
971
|
+
words: Optional[bool] = None
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
class FileUploadPart(_Base):
|
|
975
|
+
bytes: int
|
|
976
|
+
number: int
|
|
977
|
+
url: str
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
class FileUpload(_Base):
|
|
981
|
+
bytes: int
|
|
982
|
+
expires_at: str = Field(alias="expiresAt")
|
|
983
|
+
id: str
|
|
984
|
+
mime: Optional[str] = None
|
|
985
|
+
name: str
|
|
986
|
+
part_bytes: int = Field(alias="partBytes")
|
|
987
|
+
parts: Optional[List["FileUploadPart"]] = None
|
|
988
|
+
state: FileUploadState
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
class Fix(_Base):
|
|
992
|
+
"""One word-level correction inside a `transcript.amended` frame."""
|
|
993
|
+
|
|
994
|
+
kind: str
|
|
995
|
+
orig: str
|
|
996
|
+
repl: str
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
class Health(_Base):
|
|
1000
|
+
status: HealthStatus
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
class HistoryEvent(_Base):
|
|
1004
|
+
"""One durable frame of a transcription, as the host's screen received it."""
|
|
1005
|
+
|
|
1006
|
+
at: str
|
|
1007
|
+
kind: str
|
|
1008
|
+
payload: Any
|
|
1009
|
+
seq: int
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
class InputOptions(_Base):
|
|
1013
|
+
crop: Optional["CropRange"] = None
|
|
1014
|
+
kind: Optional[InputKind] = None
|
|
1015
|
+
prepare: Optional[bool] = None
|
|
1016
|
+
url: Optional[str] = None
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
class JobProgress(_Base):
|
|
1020
|
+
fetch_total_bytes: Optional[int] = Field(default=None, alias="fetchTotalBytes")
|
|
1021
|
+
fetched_bytes: Optional[int] = Field(default=None, alias="fetchedBytes")
|
|
1022
|
+
pct: int
|
|
1023
|
+
phase: Optional[str] = None
|
|
1024
|
+
phase_pct: Optional[int] = Field(default=None, alias="phasePct")
|
|
1025
|
+
processed_s: float = Field(alias="processedS")
|
|
1026
|
+
segments_done: int = Field(alias="segmentsDone")
|
|
1027
|
+
segments_total: Optional[int] = Field(default=None, alias="segmentsTotal")
|
|
1028
|
+
total_s: Optional[float] = Field(default=None, alias="totalS")
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
class JobQueue(_Base):
|
|
1032
|
+
"""Why a `queued` job is waiting, and where it stands (`Job.queue`)."""
|
|
1033
|
+
|
|
1034
|
+
position: int
|
|
1035
|
+
reason: QueueReason
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
class KnownSpeaker(_Base):
|
|
1039
|
+
"""One saved speaker a realtime session may recognise a speaker as.
|
|
1040
|
+
|
|
1041
|
+
The `id` is a saved speaker's id (`GET /v1/speakers`); the server
|
|
1042
|
+
supplies their fingerprint, so a caller names the speaker and never
|
|
1043
|
+
carries a vector over the wire. `name` is what to call the person
|
|
1044
|
+
when they are recognised — the speaker's own name, ordinarily, but the
|
|
1045
|
+
caller's to choose."""
|
|
1046
|
+
|
|
1047
|
+
color: Optional[str] = None
|
|
1048
|
+
id: str
|
|
1049
|
+
name: str
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
class LanguageInfo(_Base):
|
|
1053
|
+
code: str
|
|
1054
|
+
flag: Optional[str] = None
|
|
1055
|
+
name: str
|
|
1056
|
+
native: str
|
|
1057
|
+
preview_line: Optional[str] = Field(default=None, alias="previewLine")
|
|
1058
|
+
speakers_m: Optional[int] = Field(default=None, alias="speakersM")
|
|
1059
|
+
transcription: bool
|
|
1060
|
+
translation: bool
|
|
1061
|
+
voice: bool
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
class LanguageLists(_Base):
|
|
1065
|
+
languages: List["LanguageInfo"]
|
|
1066
|
+
transcription: List[str]
|
|
1067
|
+
translation: List[str]
|
|
1068
|
+
voice: List[str]
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
class LanguageMismatch(_Base):
|
|
1072
|
+
"""`Transcription.languageMismatches`: a stretch where the speech was not the
|
|
1073
|
+
pinned spoken language."""
|
|
1074
|
+
|
|
1075
|
+
confidence: Optional[float] = None
|
|
1076
|
+
detected: Optional[str] = None
|
|
1077
|
+
from_media_s: Optional[float] = Field(default=None, alias="fromMediaS")
|
|
1078
|
+
to_media_s: Optional[float] = Field(default=None, alias="toMediaS")
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
class LedgerEntry(_Base):
|
|
1082
|
+
"""A ledger entry on the wire (`GET /v1/billing/ledger`)."""
|
|
1083
|
+
|
|
1084
|
+
amount: float
|
|
1085
|
+
balance_after: float = Field(alias="balanceAfter")
|
|
1086
|
+
created_at: str = Field(alias="createdAt")
|
|
1087
|
+
description: str
|
|
1088
|
+
id: str
|
|
1089
|
+
kind: str
|
|
1090
|
+
metadata: Any
|
|
1091
|
+
provider_order_id: Optional[str] = Field(default=None, alias="providerOrderId")
|
|
1092
|
+
realtime_session_id: Optional[str] = Field(default=None, alias="realtimeSessionId")
|
|
1093
|
+
staff_user: Optional[str] = Field(default=None, alias="staffUser")
|
|
1094
|
+
subscription_id: Optional[str] = Field(default=None, alias="subscriptionId")
|
|
1095
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
class LedgerPage(_Base):
|
|
1099
|
+
"""`GET /v1/billing/ledger`."""
|
|
1100
|
+
|
|
1101
|
+
entries: List["LedgerEntry"]
|
|
1102
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
class PageMedia(_Base):
|
|
1106
|
+
"""A recording or a live stream found on a page."""
|
|
1107
|
+
|
|
1108
|
+
kind: LinkKind
|
|
1109
|
+
title: Optional[str] = None
|
|
1110
|
+
url: str
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
class LinkProbe(_Base):
|
|
1114
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
1115
|
+
kind: LinkKind
|
|
1116
|
+
media: Optional[List["PageMedia"]] = None
|
|
1117
|
+
ok: bool
|
|
1118
|
+
problem: Optional[str] = None
|
|
1119
|
+
reason: Optional[ProbeReason] = None
|
|
1120
|
+
site: Optional[str] = None
|
|
1121
|
+
site_name: Optional[str] = Field(default=None, alias="siteName")
|
|
1122
|
+
source: str
|
|
1123
|
+
thumbnail_url: Optional[str] = Field(default=None, alias="thumbnailUrl")
|
|
1124
|
+
title: Optional[str] = None
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
class LowBalanceAlertChoices(_Base):
|
|
1128
|
+
default: float
|
|
1129
|
+
presets: List[float]
|
|
1130
|
+
range: "MoneyRange"
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
class LowBalanceAlertSettings(_Base):
|
|
1134
|
+
"""`PUT /v1/billing/low-balance-alert`."""
|
|
1135
|
+
|
|
1136
|
+
enabled: bool
|
|
1137
|
+
threshold: Optional[float] = None
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
class ManyFailure(_Base):
|
|
1141
|
+
code: ErrorCode
|
|
1142
|
+
id: str
|
|
1143
|
+
message: str
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
class ManyIds(_Base):
|
|
1147
|
+
ids: List[str]
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
class ManyResult(_Base):
|
|
1151
|
+
done: List[str]
|
|
1152
|
+
failed: List["ManyFailure"]
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
class MediaSummary(_Base):
|
|
1156
|
+
bytes: int
|
|
1157
|
+
codec: str
|
|
1158
|
+
container: str
|
|
1159
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
1160
|
+
kind: str
|
|
1161
|
+
state: str
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
class NameSpeaker(_Base):
|
|
1165
|
+
name: Optional[str] = None
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
class OpenSpeakerInvite(_Base):
|
|
1169
|
+
email: Optional[str] = None
|
|
1170
|
+
expired: bool
|
|
1171
|
+
expires_at: str = Field(alias="expiresAt")
|
|
1172
|
+
inviter_name: str = Field(alias="inviterName")
|
|
1173
|
+
max_seconds: float = Field(alias="maxSeconds")
|
|
1174
|
+
min_seconds: float = Field(alias="minSeconds")
|
|
1175
|
+
read_text: str = Field(alias="readText")
|
|
1176
|
+
speaker_name: str = Field(alias="speakerName")
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
class Passage(_Base):
|
|
1180
|
+
"""The whole paragraph the hit was found in, as spoken: give it to your own
|
|
1181
|
+
model as context, with `mediaStart` to cite or play the moment."""
|
|
1182
|
+
|
|
1183
|
+
media_end: float = Field(alias="mediaEnd")
|
|
1184
|
+
media_start: float = Field(alias="mediaStart")
|
|
1185
|
+
text: str
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
class PatchSpeaker(_Base):
|
|
1189
|
+
color: Optional[str] = None
|
|
1190
|
+
consent: Optional[bool] = None
|
|
1191
|
+
draft: Optional[bool] = None
|
|
1192
|
+
enabled: Optional[bool] = None
|
|
1193
|
+
gender: Optional[str] = None
|
|
1194
|
+
library: Optional[bool] = None
|
|
1195
|
+
name: Optional[str] = None
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
class Payment(_Base):
|
|
1199
|
+
"""One line of the history."""
|
|
1200
|
+
|
|
1201
|
+
amount: float
|
|
1202
|
+
at: str
|
|
1203
|
+
business_purchase: bool = Field(alias="businessPurchase")
|
|
1204
|
+
description: str
|
|
1205
|
+
document: Optional[str] = None
|
|
1206
|
+
id: str
|
|
1207
|
+
kind: str
|
|
1208
|
+
status: str
|
|
1209
|
+
tax_id: Optional[str] = Field(default=None, alias="taxId")
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
class PaymentDocument(_Base):
|
|
1213
|
+
"""`GET /v1/billing/payments/:id/document`: `url` when it is ready,
|
|
1214
|
+
`pending: true` (with `202`) while the provider makes it."""
|
|
1215
|
+
|
|
1216
|
+
pending: Optional[bool] = None
|
|
1217
|
+
url: Optional[str] = None
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
class PaymentMethodView(_Base):
|
|
1221
|
+
"""One saved method."""
|
|
1222
|
+
|
|
1223
|
+
brand: str
|
|
1224
|
+
declined: bool
|
|
1225
|
+
exp_month: Optional[int] = Field(default=None, alias="expMonth")
|
|
1226
|
+
exp_year: Optional[int] = Field(default=None, alias="expYear")
|
|
1227
|
+
id: str
|
|
1228
|
+
is_default: bool = Field(alias="isDefault")
|
|
1229
|
+
last4: str
|
|
1230
|
+
wallet: Optional[str] = None
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
class PaymentMethodList(_Base):
|
|
1234
|
+
"""`GET /v1/billing/payment-methods`."""
|
|
1235
|
+
|
|
1236
|
+
methods: List["PaymentMethodView"]
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
class PaymentPage(_Base):
|
|
1240
|
+
"""`GET /v1/billing/payments`."""
|
|
1241
|
+
|
|
1242
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
1243
|
+
payments: List["Payment"]
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
class PlanListing(_Base):
|
|
1247
|
+
"""One plan on the price list: its current version's rates, prices,
|
|
1248
|
+
credit, limits and features."""
|
|
1249
|
+
|
|
1250
|
+
below_zero_limit_on: bool = Field(alias="belowZeroLimitOn")
|
|
1251
|
+
billed_externally: bool = Field(alias="billedExternally")
|
|
1252
|
+
features: Any
|
|
1253
|
+
id: str
|
|
1254
|
+
kind: str
|
|
1255
|
+
limits: "Limits2"
|
|
1256
|
+
monthly_credit: float = Field(alias="monthlyCredit")
|
|
1257
|
+
name: str
|
|
1258
|
+
price_month: float = Field(alias="priceMonth")
|
|
1259
|
+
price_year: float = Field(alias="priceYear")
|
|
1260
|
+
rates: "Rates"
|
|
1261
|
+
warm_start: str = Field(alias="warmStart")
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
class PlanList(_Base):
|
|
1265
|
+
"""`GET /v1/billing/plans`."""
|
|
1266
|
+
|
|
1267
|
+
auto_top_up: "AutoTopUpChoices" = Field(alias="autoTopUp")
|
|
1268
|
+
downgrade_keep_days: int = Field(alias="downgradeKeepDays")
|
|
1269
|
+
enabled: bool
|
|
1270
|
+
low_balance_alert: "LowBalanceAlertChoices" = Field(alias="lowBalanceAlert")
|
|
1271
|
+
plans: List["PlanListing"]
|
|
1272
|
+
signup_credit: float = Field(alias="signupCredit")
|
|
1273
|
+
top_up_amounts: List[float] = Field(alias="topUpAmounts")
|
|
1274
|
+
top_up_range: "MoneyRange" = Field(alias="topUpRange")
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
class PortalLink(_Base):
|
|
1278
|
+
"""`GET /v1/billing/portal`."""
|
|
1279
|
+
|
|
1280
|
+
url: str
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
class PromoCodeView(_Base):
|
|
1284
|
+
"""What a promo code gives for the purchase it was checked for."""
|
|
1285
|
+
|
|
1286
|
+
bonus_credit: Optional[float] = Field(default=None, alias="bonusCredit")
|
|
1287
|
+
code: str
|
|
1288
|
+
description: str
|
|
1289
|
+
first_payment_discount: Optional[float] = Field(default=None, alias="firstPaymentDiscount")
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
class StreamIngest(_Base):
|
|
1293
|
+
"""The server-side publisher of a stream source, on
|
|
1294
|
+
`Transcription.ingest`."""
|
|
1295
|
+
|
|
1296
|
+
attempts: int
|
|
1297
|
+
bytes_in: int = Field(alias="bytesIn")
|
|
1298
|
+
detected: Optional[str] = None
|
|
1299
|
+
error: Optional[str] = None
|
|
1300
|
+
failures: int
|
|
1301
|
+
finished_at: Optional[str] = Field(default=None, alias="finishedAt")
|
|
1302
|
+
last_audio_at: Optional[str] = Field(default=None, alias="lastAudioAt")
|
|
1303
|
+
media_at: Optional[str] = Field(default=None, alias="mediaAt")
|
|
1304
|
+
media_s: float = Field(alias="mediaS")
|
|
1305
|
+
started_at: Optional[str] = Field(default=None, alias="startedAt")
|
|
1306
|
+
state: IngestState
|
|
1307
|
+
stream_started_at: Optional[str] = Field(default=None, alias="streamStartedAt")
|
|
1308
|
+
updated_at: str = Field(alias="updatedAt")
|
|
1309
|
+
url: str
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
class SourceInfo(_Base):
|
|
1313
|
+
"""What the recording was made from (design `j.meta`: "M4A · 34.2 MB",
|
|
1314
|
+
"Video URL")."""
|
|
1315
|
+
|
|
1316
|
+
bytes: Optional[int] = None
|
|
1317
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
1318
|
+
embed_id: Optional[str] = Field(default=None, alias="embedId")
|
|
1319
|
+
format: Optional[str] = None
|
|
1320
|
+
kind: SourceKind
|
|
1321
|
+
mime: Optional[str] = None
|
|
1322
|
+
name: str
|
|
1323
|
+
site: Optional[str] = None
|
|
1324
|
+
thumbnail_url: Optional[str] = Field(default=None, alias="thumbnailUrl")
|
|
1325
|
+
url: Optional[str] = None
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
class TranscriptionJob(_Base):
|
|
1329
|
+
attempts: int
|
|
1330
|
+
created_at: str = Field(alias="createdAt")
|
|
1331
|
+
crop: Optional["CropWindow"] = None
|
|
1332
|
+
error: Optional[str] = None
|
|
1333
|
+
error_code: Optional[str] = Field(default=None, alias="errorCode")
|
|
1334
|
+
finished_at: Optional[str] = Field(default=None, alias="finishedAt")
|
|
1335
|
+
has_audio: bool = Field(alias="hasAudio")
|
|
1336
|
+
has_video: Optional[bool] = Field(default=None, alias="hasVideo")
|
|
1337
|
+
peaks: Optional[List[float]] = None
|
|
1338
|
+
preview: Optional[bool] = None
|
|
1339
|
+
progress: "JobProgress"
|
|
1340
|
+
queue: Optional["JobQueue"] = None
|
|
1341
|
+
source: Optional["SourceInfo"] = None
|
|
1342
|
+
started_at: Optional[str] = Field(default=None, alias="startedAt")
|
|
1343
|
+
state: JobState
|
|
1344
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
1345
|
+
video_not_kept: Optional[bool] = Field(default=None, alias="videoNotKept")
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
class TranscriptionMetrics(_Base):
|
|
1349
|
+
settle_p50_s: Optional[float] = Field(default=None, alias="settleP50S")
|
|
1350
|
+
settle_p95_s: Optional[float] = Field(default=None, alias="settleP95S")
|
|
1351
|
+
silence_paused: int = Field(alias="silencePaused")
|
|
1352
|
+
suppressed_segments: Optional[int] = Field(default=None, alias="suppressedSegments")
|
|
1353
|
+
translation_latency_p50_s: Optional[float] = Field(default=None, alias="translationLatencyP50S")
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
class PublisherInfo(_Base):
|
|
1357
|
+
attached: bool
|
|
1358
|
+
lease_expires_at: Optional[str] = Field(default=None, alias="leaseExpiresAt")
|
|
1359
|
+
machine_id: Optional[str] = Field(default=None, alias="machineId")
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
class TagRef(_Base):
|
|
1363
|
+
"""A tag as a transcription lists it."""
|
|
1364
|
+
|
|
1365
|
+
color: Union[Literal["coral", "amber", "lime", "green", "teal", "blue", "violet", "pink"], str]
|
|
1366
|
+
id: str
|
|
1367
|
+
name: str
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
class Transcription(_Base):
|
|
1371
|
+
"""A transcription: a file, a link (with its `transcription` job), or
|
|
1372
|
+
something captured as it is spoken (`live: true`: a microphone, a
|
|
1373
|
+
stream, an RTMP encoder), which may feed broadcasts (`broadcasts`)."""
|
|
1374
|
+
|
|
1375
|
+
archived_at: Optional[str] = Field(default=None, alias="archivedAt")
|
|
1376
|
+
blocked: Optional["Blocked"] = None
|
|
1377
|
+
broadcasts: Optional[List["BroadcastRef"]] = None
|
|
1378
|
+
code: str
|
|
1379
|
+
created_at: str = Field(alias="createdAt")
|
|
1380
|
+
created_by_api_key_id: Optional[str] = Field(default=None, alias="createdByApiKeyId")
|
|
1381
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
1382
|
+
end_reason: Optional[str] = Field(default=None, alias="endReason")
|
|
1383
|
+
ended_at: Optional[str] = Field(default=None, alias="endedAt")
|
|
1384
|
+
finalized_at: Optional[str] = Field(default=None, alias="finalizedAt")
|
|
1385
|
+
id: str
|
|
1386
|
+
ingest: Optional["StreamIngest"] = None
|
|
1387
|
+
job: Optional["TranscriptionJob"] = None
|
|
1388
|
+
kind: Literal["transcription"] = "transcription"
|
|
1389
|
+
language_mismatches: Optional[List["LanguageMismatch"]] = Field(default=None, alias="languageMismatches")
|
|
1390
|
+
last_seq: Optional[int] = Field(default=None, alias="lastSeq")
|
|
1391
|
+
lifecycle: Lifecycle
|
|
1392
|
+
live: Optional[bool] = None
|
|
1393
|
+
locked: Optional[bool] = None
|
|
1394
|
+
max_duration_s: Optional[int] = Field(default=None, alias="maxDurationS")
|
|
1395
|
+
max_pause_s: Optional[int] = Field(default=None, alias="maxPauseS")
|
|
1396
|
+
media: Optional[List["MediaSummary"]] = None
|
|
1397
|
+
metrics: Optional["TranscriptionMetrics"] = None
|
|
1398
|
+
name: str
|
|
1399
|
+
origin: Union[Literal["dashboard", "api", "extension", "desktop_app", "obs", "wordpress", "payload", "strapi", "sanity", "contentful", "mcp", "broadcast", "unknown"], str]
|
|
1400
|
+
owner_principal_id: str = Field(alias="ownerPrincipalId")
|
|
1401
|
+
peak_latency_s: Optional[float] = Field(default=None, alias="peakLatencyS")
|
|
1402
|
+
peak_listeners: Optional[int] = Field(default=None, alias="peakListeners")
|
|
1403
|
+
publisher: Optional["PublisherInfo"] = None
|
|
1404
|
+
purge_after: Optional[str] = Field(default=None, alias="purgeAfter")
|
|
1405
|
+
script_id: Optional[str] = Field(default=None, alias="scriptId")
|
|
1406
|
+
script_text: Optional[str] = Field(default=None, alias="scriptText")
|
|
1407
|
+
settings: "Settings"
|
|
1408
|
+
share_code: Optional[str] = Field(default=None, alias="shareCode")
|
|
1409
|
+
share_url: str = Field(alias="shareUrl")
|
|
1410
|
+
source: "CaptureSource"
|
|
1411
|
+
spans: Optional[List["CaptureSpan"]] = None
|
|
1412
|
+
speaker_count: Optional[int] = Field(default=None, alias="speakerCount")
|
|
1413
|
+
spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
|
|
1414
|
+
started_at: Optional[str] = Field(default=None, alias="startedAt")
|
|
1415
|
+
state: TranscriptionState
|
|
1416
|
+
summarized_at: Optional[str] = Field(default=None, alias="summarizedAt")
|
|
1417
|
+
summary: Optional[str] = None
|
|
1418
|
+
summary_language: Optional[str] = Field(default=None, alias="summaryLanguage")
|
|
1419
|
+
tags: Optional[List["TagRef"]] = None
|
|
1420
|
+
title: Optional[str] = None
|
|
1421
|
+
updated_at: str = Field(alias="updatedAt")
|
|
1422
|
+
wall_duration_s: Optional[float] = Field(default=None, alias="wallDurationS")
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
class PublishGrant(_Base):
|
|
1426
|
+
expires_at: Optional[str] = Field(default=None, alias="expiresAt")
|
|
1427
|
+
session_id: Optional[str] = Field(default=None, alias="sessionId")
|
|
1428
|
+
stream_url: Optional[str] = Field(default=None, alias="streamUrl")
|
|
1429
|
+
transcription: "Transcription"
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
class RetranscribeLine(_Base):
|
|
1433
|
+
"""Design 50: read one line's audio again in a named language.
|
|
1434
|
+
|
|
1435
|
+
Not an edit the caller writes — an edit the caller ASKS FOR: the text
|
|
1436
|
+
comes from the recognizer, and lands as the same `line` corrections a
|
|
1437
|
+
hand-typed rewrite would."""
|
|
1438
|
+
|
|
1439
|
+
lang: str
|
|
1440
|
+
seqs: List[int]
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
class RtmpStatus(_Base):
|
|
1444
|
+
"""`GET /v1/rtmp`: what the setup panel shows."""
|
|
1445
|
+
|
|
1446
|
+
audio: Optional[str] = None
|
|
1447
|
+
enabled: bool
|
|
1448
|
+
live: bool
|
|
1449
|
+
masked_stream_key: str = Field(alias="maskedStreamKey")
|
|
1450
|
+
monitor_url: str = Field(alias="monitorUrl")
|
|
1451
|
+
server_url: str = Field(alias="serverUrl")
|
|
1452
|
+
stream_key: Optional[str] = Field(default=None, alias="streamKey")
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
class Script(_Base):
|
|
1456
|
+
"""The broadcast or transcription something belongs to (a script, a share
|
|
1457
|
+
link): exactly one of `broadcastId` and `transcriptionId` is set.
|
|
1458
|
+
Flattened into its owner."""
|
|
1459
|
+
|
|
1460
|
+
broadcast_id: Optional[str] = Field(default=None, alias="broadcastId")
|
|
1461
|
+
created_at: str = Field(alias="createdAt")
|
|
1462
|
+
id: str
|
|
1463
|
+
locked: bool
|
|
1464
|
+
scheduled_at: Optional[str] = Field(default=None, alias="scheduledAt")
|
|
1465
|
+
started_transcription_id: Optional[str] = Field(default=None, alias="startedTranscriptionId")
|
|
1466
|
+
text: str
|
|
1467
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
1468
|
+
updated_at: str = Field(alias="updatedAt")
|
|
1469
|
+
word_count: int = Field(alias="wordCount")
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
class SearchHit(_Base):
|
|
1473
|
+
link_code: str = Field(alias="linkCode")
|
|
1474
|
+
link_name: str = Field(alias="linkName")
|
|
1475
|
+
live: bool
|
|
1476
|
+
media_start: float = Field(alias="mediaStart")
|
|
1477
|
+
recorded_at: Optional[str] = Field(default=None, alias="recordedAt")
|
|
1478
|
+
rendered: Optional[str] = None
|
|
1479
|
+
score: float
|
|
1480
|
+
sentence_id: int = Field(alias="sentenceId")
|
|
1481
|
+
share_code: Optional[str] = Field(default=None, alias="shareCode")
|
|
1482
|
+
speaker: int
|
|
1483
|
+
text: str
|
|
1484
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
1485
|
+
wall_start: float = Field(alias="wallStart")
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
class SearchResults(_Base):
|
|
1489
|
+
hits: List["SearchHit"]
|
|
1490
|
+
more: Optional[bool] = None
|
|
1491
|
+
query: str
|
|
1492
|
+
query_en: str = Field(alias="queryEn")
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
class SegmentView(_Base):
|
|
1496
|
+
# Deprecated: read `decoder` (`fast`), which says the same.
|
|
1497
|
+
catchup: bool
|
|
1498
|
+
confidence: Optional[float] = None
|
|
1499
|
+
corrected: bool
|
|
1500
|
+
decoder: Optional[str] = None
|
|
1501
|
+
end: float
|
|
1502
|
+
gap_before: Optional[float] = Field(default=None, alias="gapBefore")
|
|
1503
|
+
language: Optional[str] = None
|
|
1504
|
+
latency_s: Optional[float] = Field(default=None, alias="latencyS")
|
|
1505
|
+
script_from: Optional[int] = Field(default=None, alias="scriptFrom")
|
|
1506
|
+
script_pos: Optional[int] = Field(default=None, alias="scriptPos")
|
|
1507
|
+
seq: int
|
|
1508
|
+
settled: bool
|
|
1509
|
+
speaker: int
|
|
1510
|
+
speaker_confidence: Optional[float] = Field(default=None, alias="speakerConfidence")
|
|
1511
|
+
start: float
|
|
1512
|
+
suppressed: Optional[bool] = None
|
|
1513
|
+
text: str
|
|
1514
|
+
translations: Optional[Dict[str, str]] = None
|
|
1515
|
+
unclear: Optional[bool] = None
|
|
1516
|
+
wall_start: float = Field(alias="wallStart")
|
|
1517
|
+
words: Optional[List["Word"]] = None
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
class SentenceOptions(_Base):
|
|
1521
|
+
enabled: Optional[bool] = None
|
|
1522
|
+
idle_close_s: Optional[float] = Field(default=None, alias="idleCloseS")
|
|
1523
|
+
provisional_translations: Optional[bool] = Field(default=None, alias="provisionalTranslations")
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
class SentenceSegment(_Base):
|
|
1527
|
+
close_reason: Optional[str] = Field(default=None, alias="closeReason")
|
|
1528
|
+
end: float
|
|
1529
|
+
language: Optional[str] = None
|
|
1530
|
+
provisional: Optional[bool] = None
|
|
1531
|
+
sentence_id: int = Field(alias="sentenceId")
|
|
1532
|
+
seqs: List[int]
|
|
1533
|
+
settled: Optional[bool] = None
|
|
1534
|
+
speaker: int
|
|
1535
|
+
start: float
|
|
1536
|
+
status: SentenceStatus
|
|
1537
|
+
text: str
|
|
1538
|
+
translation_latency_s: Optional[Dict[str, float]] = Field(default=None, alias="translationLatencyS")
|
|
1539
|
+
translation_sources: Optional[Dict[str, str]] = Field(default=None, alias="translationSources")
|
|
1540
|
+
translations: Optional[Dict[str, str]] = None
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
class SentenceView(_Base):
|
|
1544
|
+
end: float
|
|
1545
|
+
language: Optional[str] = None
|
|
1546
|
+
provisional: Optional[bool] = None
|
|
1547
|
+
sentence_id: int = Field(alias="sentenceId")
|
|
1548
|
+
seqs: List[int]
|
|
1549
|
+
settled: bool
|
|
1550
|
+
speaker: int
|
|
1551
|
+
start: float
|
|
1552
|
+
status: str
|
|
1553
|
+
suppressed: Optional[bool] = None
|
|
1554
|
+
text: str
|
|
1555
|
+
translations: Optional[Dict[str, str]] = None
|
|
1556
|
+
unclear: Optional[bool] = None
|
|
1557
|
+
wall_start: float = Field(alias="wallStart")
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
class SpeakerNumber(_Base):
|
|
1561
|
+
name: Optional[str] = None
|
|
1562
|
+
number: int
|
|
1563
|
+
returning: Optional[bool] = None
|
|
1564
|
+
speaker: int
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
class SessionStats(_Base):
|
|
1568
|
+
audio_s: float = Field(alias="audioS")
|
|
1569
|
+
processing_s: float = Field(alias="processingS")
|
|
1570
|
+
realtime_factor: float = Field(alias="realtimeFactor")
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
class SessionOptions(_Base):
|
|
1574
|
+
audio: Optional["AudioFormat"] = None
|
|
1575
|
+
events: Optional["EventOptions"] = None
|
|
1576
|
+
identify_speakers: Optional[List["KnownSpeaker"]] = Field(default=None, alias="identifySpeakers")
|
|
1577
|
+
input: Optional["InputOptions"] = None
|
|
1578
|
+
latency_mode: Optional[LatencyMode] = Field(default=None, alias="latencyMode")
|
|
1579
|
+
page: Optional["CapturePage"] = None
|
|
1580
|
+
sentences: Optional["SentenceOptions"] = None
|
|
1581
|
+
speaker_labels: Optional[SpeakerLabels] = Field(default=None, alias="speakerLabels")
|
|
1582
|
+
spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
|
|
1583
|
+
translate: Optional[List[str]] = None
|
|
1584
|
+
voice: Optional[List[str]] = None
|
|
1585
|
+
# Accepted for compatibility and ignored: VocalStack picks the voice (see `voice`).
|
|
1586
|
+
voice_by_lang: Optional[Dict[str, str]] = Field(default=None, alias="voiceByLang")
|
|
1587
|
+
voice_cloning: Optional[bool] = Field(default=None, alias="voiceCloning")
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
class SetConsent(_Base):
|
|
1591
|
+
"""`POST /v1/speakers/{id}/consent`: the owner records whether the speaker
|
|
1592
|
+
agreed to have their voice cloned."""
|
|
1593
|
+
|
|
1594
|
+
consent: Consent
|
|
1595
|
+
name: Optional[str] = None
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
class SetInterval(_Base):
|
|
1599
|
+
"""`POST /v1/billing/subscription/interval`."""
|
|
1600
|
+
|
|
1601
|
+
accept_terms: Optional[bool] = Field(default=None, alias="acceptTerms")
|
|
1602
|
+
expected_price: Optional[float] = Field(default=None, alias="expectedPrice")
|
|
1603
|
+
interval: str
|
|
1604
|
+
no_new_withdrawal_period_shown: Optional[bool] = Field(default=None, alias="noNewWithdrawalPeriodShown")
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
class ShareLink(_Base):
|
|
1608
|
+
"""The broadcast or transcription something belongs to (a script, a share
|
|
1609
|
+
link): exactly one of `broadcastId` and `transcriptionId` is set.
|
|
1610
|
+
Flattened into its owner."""
|
|
1611
|
+
|
|
1612
|
+
allow_download: bool = Field(alias="allowDownload")
|
|
1613
|
+
allow_export: bool = Field(alias="allowExport")
|
|
1614
|
+
allow_translate: bool = Field(alias="allowTranslate")
|
|
1615
|
+
broadcast_id: Optional[str] = Field(default=None, alias="broadcastId")
|
|
1616
|
+
code: str
|
|
1617
|
+
created_at: str = Field(alias="createdAt")
|
|
1618
|
+
id: str
|
|
1619
|
+
label: str
|
|
1620
|
+
last_viewed_at: Optional[str] = Field(default=None, alias="lastViewedAt")
|
|
1621
|
+
revoked_at: Optional[str] = Field(default=None, alias="revokedAt")
|
|
1622
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
1623
|
+
url: str
|
|
1624
|
+
views: int
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
class SharedTranscript(_Base):
|
|
1628
|
+
"""What the public page learns from a code: the transcript's name, who
|
|
1629
|
+
shared it (display name only), what the link allows, and the
|
|
1630
|
+
transcription (with its job) to read from."""
|
|
1631
|
+
|
|
1632
|
+
allow_download: bool = Field(alias="allowDownload")
|
|
1633
|
+
allow_export: bool = Field(alias="allowExport")
|
|
1634
|
+
allow_translate: bool = Field(alias="allowTranslate")
|
|
1635
|
+
broadcast_id: Optional[str] = Field(default=None, alias="broadcastId")
|
|
1636
|
+
code: str
|
|
1637
|
+
created_at: str = Field(alias="createdAt")
|
|
1638
|
+
job: Optional["TranscriptionJob"] = None
|
|
1639
|
+
name: str
|
|
1640
|
+
shared_by: str = Field(alias="sharedBy")
|
|
1641
|
+
transcription: "Transcription"
|
|
1642
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
class Speaker(_Base):
|
|
1646
|
+
archived_at: Optional[str] = Field(default=None, alias="archivedAt")
|
|
1647
|
+
color: Optional[str] = None
|
|
1648
|
+
consent: Consent
|
|
1649
|
+
consent_at: Optional[str] = Field(default=None, alias="consentAt")
|
|
1650
|
+
created_at: str = Field(alias="createdAt")
|
|
1651
|
+
draft: bool
|
|
1652
|
+
gender: Optional[str] = None
|
|
1653
|
+
id: str
|
|
1654
|
+
library: Optional[bool] = None
|
|
1655
|
+
name: str
|
|
1656
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
1657
|
+
updated_at: str = Field(alias="updatedAt")
|
|
1658
|
+
voice: Optional["Clone"] = None
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
class SpeakerConsentWithdrawal(_Base):
|
|
1662
|
+
inviter_name: str = Field(alias="inviterName")
|
|
1663
|
+
speaker_name: str = Field(alias="speakerName")
|
|
1664
|
+
withdrawn: bool
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
class SpeakerInvite(_Base):
|
|
1668
|
+
created_at: str = Field(alias="createdAt")
|
|
1669
|
+
email: Optional[str] = None
|
|
1670
|
+
expires_at: str = Field(alias="expiresAt")
|
|
1671
|
+
id: str
|
|
1672
|
+
speaker_id: str = Field(alias="speakerId")
|
|
1673
|
+
state: InviteState
|
|
1674
|
+
url: Optional[str] = None
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
class SpeakerInviteList(_Base):
|
|
1678
|
+
invites: List["SpeakerInvite"]
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
class StartJob(_Base):
|
|
1682
|
+
"""`POST /v1/transcriptions/{id}/job/start`: the window a job in
|
|
1683
|
+
`cropping` should transcribe. Both bounds optional: the start of the
|
|
1684
|
+
file and its end."""
|
|
1685
|
+
|
|
1686
|
+
end_s: Optional[float] = Field(default=None, alias="endS")
|
|
1687
|
+
start_s: Optional[float] = Field(default=None, alias="startS")
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
class StartLiveTranscription(_Base):
|
|
1691
|
+
audio_source: Optional[str] = Field(default=None, alias="audioSource")
|
|
1692
|
+
device_id: Optional[str] = Field(default=None, alias="deviceId")
|
|
1693
|
+
page: Optional["CapturePage"] = None
|
|
1694
|
+
script_id: Optional[str] = Field(default=None, alias="scriptId")
|
|
1695
|
+
script_text: Optional[str] = Field(default=None, alias="scriptText")
|
|
1696
|
+
settings: Optional["SettingsPatch"] = None
|
|
1697
|
+
takeover: Optional[bool] = None
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
class StopRequest(_Base):
|
|
1701
|
+
reason: Optional[str] = None
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
class SubmitSpeakerInvite(_Base):
|
|
1705
|
+
consent: bool
|
|
1706
|
+
email: Optional[str] = None
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
class SummaryStatus(_Base):
|
|
1710
|
+
"""Where a recording's summary stands, for `POST /v1/transcriptions/:id/summarize`."""
|
|
1711
|
+
|
|
1712
|
+
lang: Optional[str] = None
|
|
1713
|
+
state: str
|
|
1714
|
+
summary: Optional[str] = None
|
|
1715
|
+
title: Optional[str] = None
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
class Tag(_Base):
|
|
1719
|
+
color: Union[Literal["coral", "amber", "lime", "green", "teal", "blue", "violet", "pink"], str]
|
|
1720
|
+
created_at: str = Field(alias="createdAt")
|
|
1721
|
+
id: str
|
|
1722
|
+
name: str
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
class TagList(_Base):
|
|
1726
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
1727
|
+
tags: List["Tag"]
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
class TagTranscriptions(_Base):
|
|
1731
|
+
"""Transcriptions to put the tag on and to take it off, by id."""
|
|
1732
|
+
|
|
1733
|
+
add: Optional[List[str]] = None
|
|
1734
|
+
remove: Optional[List[str]] = None
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
class TranscriptSnapshot(_Base):
|
|
1738
|
+
lang: Optional[str] = None
|
|
1739
|
+
last_seq: int = Field(alias="lastSeq")
|
|
1740
|
+
segments: List["SegmentView"]
|
|
1741
|
+
sentences: List["SentenceView"]
|
|
1742
|
+
spans: List["CaptureSpan"]
|
|
1743
|
+
speaker_labels: Optional[SpeakerLabels] = Field(default=None, alias="speakerLabels")
|
|
1744
|
+
speakers: List["AppearanceView"]
|
|
1745
|
+
state: RecordingState
|
|
1746
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
1747
|
+
translation_pending: Optional[bool] = Field(default=None, alias="translationPending")
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
class TranscriptionHistory(_Base):
|
|
1751
|
+
"""`GET /v1/transcriptions/{id}/history`: one page of the log, in order."""
|
|
1752
|
+
|
|
1753
|
+
events: List["HistoryEvent"]
|
|
1754
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
class TranscriptionLookup(_Base):
|
|
1758
|
+
transcription: Optional["Transcription"] = None
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
class TranscriptionPage(_Base):
|
|
1762
|
+
"""`GET /v1/transcriptions`: one page, newest first."""
|
|
1763
|
+
|
|
1764
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
1765
|
+
total: Optional[int] = None
|
|
1766
|
+
transcriptions: List["Transcription"]
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
class UpdateBroadcast(_Base):
|
|
1770
|
+
"""`PATCH /v1/broadcasts/{id}`: fields left out are unchanged."""
|
|
1771
|
+
|
|
1772
|
+
access: Optional[Access] = None
|
|
1773
|
+
code: Optional[str] = None
|
|
1774
|
+
name: Optional[str] = None
|
|
1775
|
+
password: Optional[str] = None
|
|
1776
|
+
settings: Optional["SettingsPatch"] = None
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
class UpdateShareLink(_Base):
|
|
1780
|
+
allow_download: Optional[bool] = Field(default=None, alias="allowDownload")
|
|
1781
|
+
allow_export: Optional[bool] = Field(default=None, alias="allowExport")
|
|
1782
|
+
allow_translate: Optional[bool] = Field(default=None, alias="allowTranslate")
|
|
1783
|
+
label: Optional[str] = None
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
class UpdateTag(_Base):
|
|
1787
|
+
color: Optional[Union[Literal["coral", "amber", "lime", "green", "teal", "blue", "violet", "pink"], str]] = None
|
|
1788
|
+
name: Optional[str] = None
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
class UpdateTranscription(_Base):
|
|
1792
|
+
"""`PATCH /v1/transcriptions/{id}`: fields left out are unchanged. A
|
|
1793
|
+
transcription is shared through its share links, so it has no access,
|
|
1794
|
+
password or link to change here."""
|
|
1795
|
+
|
|
1796
|
+
locked: Optional[bool] = None
|
|
1797
|
+
name: Optional[str] = None
|
|
1798
|
+
settings: Optional["SettingsPatch"] = None
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
class UsageCharge(_Base):
|
|
1802
|
+
"""One charge as the usage report counts it (`GET /v1/billing/usage/charges`):
|
|
1803
|
+
a settled `charge` ledger entry, a `charge_correction` (money given
|
|
1804
|
+
back: `correction`, a negative amount), or a charge still open at its
|
|
1805
|
+
current amount."""
|
|
1806
|
+
|
|
1807
|
+
amount: float
|
|
1808
|
+
correction: bool
|
|
1809
|
+
date: str
|
|
1810
|
+
kind: str
|
|
1811
|
+
name: Optional[str] = None
|
|
1812
|
+
opened_at: str = Field(alias="openedAt")
|
|
1813
|
+
rate_per_hour: float = Field(alias="ratePerHour")
|
|
1814
|
+
realtime_session_id: Optional[str] = Field(default=None, alias="realtimeSessionId")
|
|
1815
|
+
seconds: float
|
|
1816
|
+
source: str
|
|
1817
|
+
state: str
|
|
1818
|
+
transcription_id: Optional[str] = Field(default=None, alias="transcriptionId")
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
class UsageChargePage(_Base):
|
|
1822
|
+
"""`GET /v1/billing/usage/charges`."""
|
|
1823
|
+
|
|
1824
|
+
charges: List["UsageCharge"]
|
|
1825
|
+
count: int
|
|
1826
|
+
next_cursor: Optional[str] = Field(default=None, alias="nextCursor")
|
|
1827
|
+
total: float
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
class UsageRow(_Base):
|
|
1831
|
+
"""One day, source and kind."""
|
|
1832
|
+
|
|
1833
|
+
amount: float
|
|
1834
|
+
date: str
|
|
1835
|
+
kind: str
|
|
1836
|
+
seconds: float
|
|
1837
|
+
source: str
|
|
1838
|
+
|
|
1839
|
+
|
|
1840
|
+
class UsageSource(_Base):
|
|
1841
|
+
"""Where usage came from."""
|
|
1842
|
+
|
|
1843
|
+
id: str
|
|
1844
|
+
name: str
|
|
1845
|
+
prefix: Optional[str] = None
|
|
1846
|
+
revoked: bool
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
class UsageReport(_Base):
|
|
1850
|
+
"""`GET /v1/billing/usage`."""
|
|
1851
|
+
|
|
1852
|
+
end_date: str = Field(alias="endDate")
|
|
1853
|
+
rows: List["UsageRow"]
|
|
1854
|
+
sources: List["UsageSource"]
|
|
1855
|
+
start_date: str = Field(alias="startDate")
|
|
1856
|
+
total: float
|
|
1857
|
+
tz: str
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
class VectorHit(_Base):
|
|
1861
|
+
link_code: str = Field(alias="linkCode")
|
|
1862
|
+
link_name: str = Field(alias="linkName")
|
|
1863
|
+
live: bool
|
|
1864
|
+
media_start: float = Field(alias="mediaStart")
|
|
1865
|
+
passage: "Passage"
|
|
1866
|
+
recorded_at: Optional[str] = Field(default=None, alias="recordedAt")
|
|
1867
|
+
rendered: Optional[str] = None
|
|
1868
|
+
score: float
|
|
1869
|
+
sentence_id: int = Field(alias="sentenceId")
|
|
1870
|
+
share_code: Optional[str] = Field(default=None, alias="shareCode")
|
|
1871
|
+
similarity: float
|
|
1872
|
+
speaker: int
|
|
1873
|
+
text: str
|
|
1874
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
1875
|
+
vector: bool
|
|
1876
|
+
wall_start: float = Field(alias="wallStart")
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
class VectorResults(_Base):
|
|
1880
|
+
allowance: "Allowance"
|
|
1881
|
+
hits: List["VectorHit"]
|
|
1882
|
+
query: str
|
|
1883
|
+
state: str
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
class VoiceOption(_Base):
|
|
1887
|
+
accent: Optional[str] = None
|
|
1888
|
+
auto: Optional[bool] = None
|
|
1889
|
+
cloned: bool
|
|
1890
|
+
consent: Optional[Consent] = None
|
|
1891
|
+
default: bool
|
|
1892
|
+
gender: Optional[str] = None
|
|
1893
|
+
id: str
|
|
1894
|
+
lag_s: Optional[float] = Field(default=None, alias="lagS")
|
|
1895
|
+
library: Optional[bool] = None
|
|
1896
|
+
name: str
|
|
1897
|
+
preview_url: Optional[str] = Field(default=None, alias="previewUrl")
|
|
1898
|
+
quality: int
|
|
1899
|
+
ready: Optional[bool] = None
|
|
1900
|
+
speaker: Optional[int] = None
|
|
1901
|
+
speakers: Optional[int] = None
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
class VoiceCatalogue(_Base):
|
|
1905
|
+
lang: str
|
|
1906
|
+
voices: List["VoiceOption"]
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
class VoiceTrack(_Base):
|
|
1910
|
+
chosen_for: Optional[List[str]] = Field(default=None, alias="chosenFor")
|
|
1911
|
+
clip_dur: Optional[Dict[str, float]] = Field(default=None, alias="clipDur")
|
|
1912
|
+
clip_parts: Optional[Dict[str, int]] = Field(default=None, alias="clipParts")
|
|
1913
|
+
clip_rev: Optional[Dict[str, str]] = Field(default=None, alias="clipRev")
|
|
1914
|
+
clips: List[int]
|
|
1915
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
1916
|
+
error: Optional[str] = None
|
|
1917
|
+
lang: str
|
|
1918
|
+
original: Optional[List[int]] = None
|
|
1919
|
+
state: str
|
|
1920
|
+
voice: Optional[str] = None
|
|
1921
|
+
voice_key: str = Field(alias="voiceKey")
|
|
1922
|
+
voices: Optional[str] = None
|
|
1923
|
+
word_times: Optional[Dict[str, List[List[float]]]] = Field(default=None, alias="wordTimes")
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
class WarmRequest(_Base):
|
|
1927
|
+
"""What a client says on activity."""
|
|
1928
|
+
|
|
1929
|
+
can_start: bool = Field(alias="canStart")
|
|
1930
|
+
client_kind: ClientKind = Field(alias="clientKind")
|
|
1931
|
+
spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
class YearlyOptIn(_Base):
|
|
1935
|
+
"""`POST /v1/billing/subscription/yearly-opt-in`."""
|
|
1936
|
+
|
|
1937
|
+
accept_terms: Optional[bool] = Field(default=None, alias="acceptTerms")
|
|
1938
|
+
expected_price: Optional[float] = Field(default=None, alias="expectedPrice")
|
|
1939
|
+
no_new_withdrawal_period_shown: Optional[bool] = Field(default=None, alias="noNewWithdrawalPeriodShown")
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
class CaptureSourceMic(_Base):
|
|
1943
|
+
kind: Literal["mic"] = "mic"
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
class CaptureSourceStream(_Base):
|
|
1947
|
+
kind: Literal["stream"] = "stream"
|
|
1948
|
+
url: str
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
CaptureSource = Annotated[Union[Annotated[Union[CaptureSourceMic, CaptureSourceStream], Field(discriminator="kind")], Dict[str, Any]], Field(union_mode="left_to_right")]
|
|
1952
|
+
|
|
1953
|
+
class Eof(_Base):
|
|
1954
|
+
type: Literal["eof"] = "eof"
|
|
1955
|
+
|
|
1956
|
+
|
|
1957
|
+
class Cancel(_Base):
|
|
1958
|
+
type: Literal["cancel"] = "cancel"
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
class SessionUpdate(_Base):
|
|
1962
|
+
latency_mode: Optional[LatencyMode] = Field(default=None, alias="latencyMode")
|
|
1963
|
+
speaker_labels: Optional[SpeakerLabels] = Field(default=None, alias="speakerLabels")
|
|
1964
|
+
spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
|
|
1965
|
+
translate: Optional[List[str]] = None
|
|
1966
|
+
type: Literal["session.update"] = "session.update"
|
|
1967
|
+
voice: Optional[List[str]] = None
|
|
1968
|
+
# Accepted for compatibility and ignored: VocalStack picks the voice.
|
|
1969
|
+
voice_by_lang: Optional[Dict[str, str]] = Field(default=None, alias="voiceByLang")
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
class Clock(_Base):
|
|
1973
|
+
pcm: int
|
|
1974
|
+
type: Literal["clock"] = "clock"
|
|
1975
|
+
wall: float
|
|
1976
|
+
|
|
1977
|
+
|
|
1978
|
+
ClientFrame = Annotated[Union[Eof, Cancel, SessionUpdate, Clock], Field(discriminator="type")]
|
|
1979
|
+
|
|
1980
|
+
class SessionLoading(_Base):
|
|
1981
|
+
stage: LoadingStage
|
|
1982
|
+
type: Literal["session.loading"] = "session.loading"
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
class SessionQueued(_Base):
|
|
1986
|
+
buffered_s: Optional[float] = Field(default=None, alias="bufferedS")
|
|
1987
|
+
dropped_s: Optional[float] = Field(default=None, alias="droppedS")
|
|
1988
|
+
position: Optional[int] = None
|
|
1989
|
+
type: Literal["session.queued"] = "session.queued"
|
|
1990
|
+
waited_s: float = Field(alias="waitedS")
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
class SessionReady(_Base):
|
|
1994
|
+
type: Literal["session.ready"] = "session.ready"
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
class TranscriptCommitted(_Base):
|
|
1998
|
+
segment: "CommittedSegment"
|
|
1999
|
+
type: Literal["transcript.committed"] = "transcript.committed"
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
class TranscriptDraft(_Base):
|
|
2003
|
+
segments: List["DraftSegment"]
|
|
2004
|
+
type: Literal["transcript.draft"] = "transcript.draft"
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
class TranscriptWords(_Base):
|
|
2008
|
+
type: Literal["transcript.words"] = "transcript.words"
|
|
2009
|
+
words: List["Word"]
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
class TranscriptAmended(_Base):
|
|
2013
|
+
fixes: Optional[List["Fix"]] = None
|
|
2014
|
+
language: Optional[str] = None
|
|
2015
|
+
script_words: Optional[List[int]] = Field(default=None, alias="scriptWords")
|
|
2016
|
+
seq: int
|
|
2017
|
+
speaker: int
|
|
2018
|
+
speaker_confidence: Optional[float] = Field(default=None, alias="speakerConfidence")
|
|
2019
|
+
tail: Optional["AmendTail"] = None
|
|
2020
|
+
text: str
|
|
2021
|
+
type: Literal["transcript.amended"] = "transcript.amended"
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
class TranscriptLatency(_Base):
|
|
2025
|
+
latency_s: float = Field(alias="latencyS")
|
|
2026
|
+
seq: int
|
|
2027
|
+
type: Literal["transcript.latency"] = "transcript.latency"
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
class TranscriptSpeaker(_Base):
|
|
2031
|
+
seq: int
|
|
2032
|
+
speaker: int
|
|
2033
|
+
speaker_confidence: Optional[float] = Field(default=None, alias="speakerConfidence")
|
|
2034
|
+
type: Literal["transcript.speaker"] = "transcript.speaker"
|
|
2035
|
+
verdict: str
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
class TranscriptSpeakerGender(_Base):
|
|
2039
|
+
confidence: Optional[float] = None
|
|
2040
|
+
gender: str
|
|
2041
|
+
speaker: int
|
|
2042
|
+
type: Literal["transcript.speakerGender"] = "transcript.speakerGender"
|
|
2043
|
+
|
|
2044
|
+
|
|
2045
|
+
class TranscriptSpeakerIdentified(_Base):
|
|
2046
|
+
color: Optional[str] = None
|
|
2047
|
+
confidence: Optional[float] = None
|
|
2048
|
+
name: str
|
|
2049
|
+
speaker: int
|
|
2050
|
+
speaker_id: Optional[str] = Field(default=None, alias="speakerId")
|
|
2051
|
+
tone: Optional[bool] = None
|
|
2052
|
+
type: Literal["transcript.speakerIdentified"] = "transcript.speakerIdentified"
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
class TranscriptSpeakerNumbers(_Base):
|
|
2056
|
+
speakers: List["SpeakerNumber"]
|
|
2057
|
+
type: Literal["transcript.speakerNumbers"] = "transcript.speakerNumbers"
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
class TranscriptSentence(_Base):
|
|
2061
|
+
sentence: "SentenceSegment"
|
|
2062
|
+
type: Literal["transcript.sentence"] = "transcript.sentence"
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
class TranscriptTranslated(_Base):
|
|
2066
|
+
seq: int
|
|
2067
|
+
sources: Optional[Dict[str, str]] = None
|
|
2068
|
+
translations: Dict[str, str]
|
|
2069
|
+
type: Literal["transcript.translated"] = "transcript.translated"
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
class TranscriptVoice(_Base):
|
|
2073
|
+
audio: Optional[str] = None
|
|
2074
|
+
caf_url: Optional[str] = Field(default=None, alias="cafUrl")
|
|
2075
|
+
cloned: Optional[bool] = None
|
|
2076
|
+
duration_s: float = Field(alias="durationS")
|
|
2077
|
+
format: str
|
|
2078
|
+
generation: int
|
|
2079
|
+
lang: str
|
|
2080
|
+
latency_s: Optional[float] = Field(default=None, alias="latencyS")
|
|
2081
|
+
ogg_url: Optional[str] = Field(default=None, alias="oggUrl")
|
|
2082
|
+
part: Optional[int] = None
|
|
2083
|
+
parts: Optional[int] = None
|
|
2084
|
+
queue_wait_s: Optional[float] = Field(default=None, alias="queueWaitS")
|
|
2085
|
+
sentence_id: int = Field(alias="sentenceId")
|
|
2086
|
+
speaker_to_audio_s: Optional[float] = Field(default=None, alias="speakerToAudioS")
|
|
2087
|
+
synth_s: float = Field(alias="synthS")
|
|
2088
|
+
translation_latency_s: Optional[float] = Field(default=None, alias="translationLatencyS")
|
|
2089
|
+
type: Literal["transcript.voice"] = "transcript.voice"
|
|
2090
|
+
url: Optional[str] = None
|
|
2091
|
+
voice: Optional[str] = None
|
|
2092
|
+
voice_key: Optional[str] = Field(default=None, alias="voiceKey")
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
class TranscriptVoiceStatus(_Base):
|
|
2096
|
+
detail: str
|
|
2097
|
+
lang: str
|
|
2098
|
+
state: VoiceStatusState
|
|
2099
|
+
type: Literal["transcript.voiceStatus"] = "transcript.voiceStatus"
|
|
2100
|
+
voice_key: Optional[str] = Field(default=None, alias="voiceKey")
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
class TranscriptLanguageStatus(_Base):
|
|
2104
|
+
confidence: Optional[float] = None
|
|
2105
|
+
detected: Optional[str] = None
|
|
2106
|
+
expected: str
|
|
2107
|
+
from_media_s: Optional[float] = Field(default=None, alias="fromMediaS")
|
|
2108
|
+
message: str
|
|
2109
|
+
state: LanguageStatusState
|
|
2110
|
+
type: Literal["transcript.languageStatus"] = "transcript.languageStatus"
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
class TranscriptRetracted(_Base):
|
|
2114
|
+
from_media_s: float = Field(alias="fromMediaS")
|
|
2115
|
+
seqs: List[int]
|
|
2116
|
+
type: Literal["transcript.retracted"] = "transcript.retracted"
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
class TranscriptHeld(_Base):
|
|
2120
|
+
from_media_s: float = Field(alias="fromMediaS")
|
|
2121
|
+
held: bool
|
|
2122
|
+
language: Optional[str] = None
|
|
2123
|
+
outcome: Optional[str] = None
|
|
2124
|
+
type: Literal["transcript.held"] = "transcript.held"
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
class TranscriptProgress(_Base):
|
|
2128
|
+
processed_s: float = Field(alias="processedS")
|
|
2129
|
+
total_s: Optional[float] = Field(default=None, alias="totalS")
|
|
2130
|
+
type: Literal["transcript.progress"] = "transcript.progress"
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
class StreamPull(_Base):
|
|
2134
|
+
bytes_in: int = Field(alias="bytesIn")
|
|
2135
|
+
detected: Optional[str] = None
|
|
2136
|
+
error: Optional[str] = None
|
|
2137
|
+
failures: int
|
|
2138
|
+
media_s: float = Field(alias="mediaS")
|
|
2139
|
+
program_at: Optional[str] = Field(default=None, alias="programAt")
|
|
2140
|
+
sequence_offset_s: Optional[float] = Field(default=None, alias="sequenceOffsetS")
|
|
2141
|
+
state: PullState
|
|
2142
|
+
type: Literal["stream.pull"] = "stream.pull"
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
class SourceProgress(_Base):
|
|
2146
|
+
bytes: int
|
|
2147
|
+
done_s: float = Field(alias="doneS")
|
|
2148
|
+
phase: str
|
|
2149
|
+
total: Optional[int] = None
|
|
2150
|
+
total_s: Optional[float] = Field(default=None, alias="totalS")
|
|
2151
|
+
type: Literal["source.progress"] = "source.progress"
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
class SourcePrepared(_Base):
|
|
2155
|
+
duration_s: Optional[float] = Field(default=None, alias="durationS")
|
|
2156
|
+
peaks: Optional[List[float]] = None
|
|
2157
|
+
type: Literal["source.prepared"] = "source.prepared"
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
class SessionDone(_Base):
|
|
2161
|
+
reason: DoneReason
|
|
2162
|
+
stats: "SessionStats"
|
|
2163
|
+
type: Literal["session.done"] = "session.done"
|
|
2164
|
+
|
|
2165
|
+
|
|
2166
|
+
class ErrorFrame(_Base):
|
|
2167
|
+
code: ErrorCode
|
|
2168
|
+
message: str
|
|
2169
|
+
retryable: bool
|
|
2170
|
+
type: Literal["error"] = "error"
|
|
2171
|
+
|
|
2172
|
+
|
|
2173
|
+
ServerFrame = Annotated[Union[SessionLoading, SessionQueued, SessionReady, TranscriptCommitted, TranscriptDraft, TranscriptWords, TranscriptAmended, TranscriptLatency, TranscriptSpeaker, TranscriptSpeakerGender, TranscriptSpeakerIdentified, TranscriptSpeakerNumbers, TranscriptSentence, TranscriptTranslated, TranscriptVoice, TranscriptVoiceStatus, TranscriptLanguageStatus, TranscriptRetracted, TranscriptHeld, TranscriptProgress, StreamPull, SourceProgress, SourcePrepared, SessionDone, ErrorFrame], Field(discriminator="type")]
|
|
2174
|
+
|
|
2175
|
+
class SubscribeUpdate(_Base):
|
|
2176
|
+
audio: Optional[bool] = None
|
|
2177
|
+
lang: Optional[str] = None
|
|
2178
|
+
type: Literal["subscribe.update"] = "subscribe.update"
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
class Ping(_Base):
|
|
2182
|
+
type: Literal["ping"] = "ping"
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
SubscriberClientFrame = Annotated[Union[SubscribeUpdate, Ping], Field(discriminator="type")]
|
|
2186
|
+
|
|
2187
|
+
class SubscribeReady(_Base):
|
|
2188
|
+
instance: str
|
|
2189
|
+
last_seq: int = Field(alias="lastSeq")
|
|
2190
|
+
state: RecordingState
|
|
2191
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2192
|
+
type: Literal["subscribe.ready"] = "subscribe.ready"
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
class RecordingState(_Base):
|
|
2196
|
+
media_s: Optional[float] = Field(default=None, alias="mediaS")
|
|
2197
|
+
reason: Optional[str] = None
|
|
2198
|
+
state: RecordingState
|
|
2199
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2200
|
+
type: Literal["recording.state"] = "recording.state"
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
class RecordingSettings(_Base):
|
|
2204
|
+
settings: Any
|
|
2205
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2206
|
+
type: Literal["recording.settings"] = "recording.settings"
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
class RecordingSilence(_Base):
|
|
2210
|
+
pauses_in_s: float = Field(alias="pausesInS")
|
|
2211
|
+
silent_s: float = Field(alias="silentS")
|
|
2212
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2213
|
+
type: Literal["recording.silence"] = "recording.silence"
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
class RecordingExpiring(_Base):
|
|
2217
|
+
ends_in_s: float = Field(alias="endsInS")
|
|
2218
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2219
|
+
type: Literal["recording.expiring"] = "recording.expiring"
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
class TranscriptCorrected(_Base):
|
|
2223
|
+
actor: Optional["Actor"] = None
|
|
2224
|
+
from_: str = Field(alias="from")
|
|
2225
|
+
reverted: bool
|
|
2226
|
+
sentence_id: Optional[int] = Field(default=None, alias="sentenceId")
|
|
2227
|
+
sentence_text: Optional[str] = Field(default=None, alias="sentenceText")
|
|
2228
|
+
seq: int
|
|
2229
|
+
text: str
|
|
2230
|
+
to: str
|
|
2231
|
+
type: Literal["transcript.corrected"] = "transcript.corrected"
|
|
2232
|
+
word_idx: int = Field(alias="wordIdx")
|
|
2233
|
+
words: Optional[List["Word"]] = None
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
class TranscriptSpeakerGender(_Base):
|
|
2237
|
+
confidence: Optional[float] = None
|
|
2238
|
+
gender: str
|
|
2239
|
+
speaker: int
|
|
2240
|
+
type: Literal["transcript.speakerGender"] = "transcript.speakerGender"
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
class TranscriptSpeakerIdentified(_Base):
|
|
2244
|
+
color: Optional[str] = None
|
|
2245
|
+
confidence: Optional[float] = None
|
|
2246
|
+
name: str
|
|
2247
|
+
speaker: int
|
|
2248
|
+
speaker_id: Optional[str] = Field(default=None, alias="speakerId")
|
|
2249
|
+
type: Literal["transcript.speakerIdentified"] = "transcript.speakerIdentified"
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
class TranscriptSpeakerNamed(_Base):
|
|
2253
|
+
name: Optional[str] = None
|
|
2254
|
+
speaker: int
|
|
2255
|
+
type: Literal["transcript.speakerNamed"] = "transcript.speakerNamed"
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
class TranscriptSpeakerNumbers(_Base):
|
|
2259
|
+
speakers: List["SpeakerNumber"]
|
|
2260
|
+
type: Literal["transcript.speakerNumbers"] = "transcript.speakerNumbers"
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
class TranscriptionStarted(_Base):
|
|
2264
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2265
|
+
type: Literal["transcription.started"] = "transcription.started"
|
|
2266
|
+
|
|
2267
|
+
|
|
2268
|
+
class JobProgress(_Base):
|
|
2269
|
+
error: Optional[str] = None
|
|
2270
|
+
fetch_total_bytes: Optional[int] = Field(default=None, alias="fetchTotalBytes")
|
|
2271
|
+
fetched_bytes: Optional[int] = Field(default=None, alias="fetchedBytes")
|
|
2272
|
+
pct: int
|
|
2273
|
+
phase: Optional[str] = None
|
|
2274
|
+
phase_pct: Optional[int] = Field(default=None, alias="phasePct")
|
|
2275
|
+
preview: Optional[bool] = None
|
|
2276
|
+
processed_s: float = Field(alias="processedS")
|
|
2277
|
+
segments_done: int = Field(alias="segmentsDone")
|
|
2278
|
+
segments_total: Optional[int] = Field(default=None, alias="segmentsTotal")
|
|
2279
|
+
state: JobState
|
|
2280
|
+
total_s: Optional[float] = Field(default=None, alias="totalS")
|
|
2281
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2282
|
+
type: Literal["job.progress"] = "job.progress"
|
|
2283
|
+
|
|
2284
|
+
|
|
2285
|
+
class SpeakerVoice(_Base):
|
|
2286
|
+
error: Optional[str] = None
|
|
2287
|
+
progress: int
|
|
2288
|
+
speaker: int
|
|
2289
|
+
speaker_id: Optional[str] = Field(default=None, alias="speakerId")
|
|
2290
|
+
state: str
|
|
2291
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2292
|
+
type: Literal["speaker.voice"] = "speaker.voice"
|
|
2293
|
+
|
|
2294
|
+
|
|
2295
|
+
class StreamIngest(_Base):
|
|
2296
|
+
detected: Optional[str] = None
|
|
2297
|
+
error: Optional[str] = None
|
|
2298
|
+
failures: Optional[int] = None
|
|
2299
|
+
last_audio_at: Optional[str] = Field(default=None, alias="lastAudioAt")
|
|
2300
|
+
state: IngestState
|
|
2301
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2302
|
+
type: Literal["stream.ingest"] = "stream.ingest"
|
|
2303
|
+
url: str
|
|
2304
|
+
|
|
2305
|
+
|
|
2306
|
+
class TranscriptionEnded(_Base):
|
|
2307
|
+
transcription_id: str = Field(alias="transcriptionId")
|
|
2308
|
+
type: Literal["transcription.ended"] = "transcription.ended"
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
class Audience(_Base):
|
|
2312
|
+
languages: Any
|
|
2313
|
+
listeners: int
|
|
2314
|
+
type: Literal["audience"] = "audience"
|
|
2315
|
+
|
|
2316
|
+
|
|
2317
|
+
class SubscribeGap(_Base):
|
|
2318
|
+
expected: int
|
|
2319
|
+
got: int
|
|
2320
|
+
type: Literal["subscribe.gap"] = "subscribe.gap"
|
|
2321
|
+
|
|
2322
|
+
|
|
2323
|
+
SubscriberFrame = Annotated[Union[SubscribeReady, RecordingState, RecordingSettings, RecordingSilence, RecordingExpiring, TranscriptCorrected, TranscriptSpeakerGender, TranscriptSpeakerIdentified, TranscriptSpeakerNamed, TranscriptSpeakerNumbers, TranscriptionStarted, JobProgress, SpeakerVoice, StreamIngest, TranscriptionEnded, Audience, SubscribeGap], Field(discriminator="type")]
|
|
2324
|
+
|
|
2325
|
+
SERVER_FRAME_TYPES = frozenset(["session.loading", "session.queued", "session.ready", "transcript.committed", "transcript.draft", "transcript.words", "transcript.amended", "transcript.latency", "transcript.speaker", "transcript.speakerGender", "transcript.speakerIdentified", "transcript.speakerNumbers", "transcript.sentence", "transcript.translated", "transcript.voice", "transcript.voiceStatus", "transcript.languageStatus", "transcript.retracted", "transcript.held", "transcript.progress", "stream.pull", "source.progress", "source.prepared", "session.done", "error"])
|
|
2326
|
+
|
|
2327
|
+
_server_frame_adapter: TypeAdapter[ServerFrame] = TypeAdapter(ServerFrame)
|
|
2328
|
+
|
|
2329
|
+
_SERVER_FRAME_CLASSES: Dict[str, Any] = {"session.loading": SessionLoading, "session.queued": SessionQueued, "session.ready": SessionReady, "transcript.committed": TranscriptCommitted, "transcript.draft": TranscriptDraft, "transcript.words": TranscriptWords, "transcript.amended": TranscriptAmended, "transcript.latency": TranscriptLatency, "transcript.speaker": TranscriptSpeaker, "transcript.speakerGender": TranscriptSpeakerGender, "transcript.speakerIdentified": TranscriptSpeakerIdentified, "transcript.speakerNumbers": TranscriptSpeakerNumbers, "transcript.sentence": TranscriptSentence, "transcript.translated": TranscriptTranslated, "transcript.voice": TranscriptVoice, "transcript.voiceStatus": TranscriptVoiceStatus, "transcript.languageStatus": TranscriptLanguageStatus, "transcript.retracted": TranscriptRetracted, "transcript.held": TranscriptHeld, "transcript.progress": TranscriptProgress, "stream.pull": StreamPull, "source.progress": SourceProgress, "source.prepared": SourcePrepared, "session.done": SessionDone, "error": ErrorFrame}
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
TranscriptEvent = Union[TranscriptCommitted, TranscriptDraft, TranscriptWords, TranscriptAmended, TranscriptLatency, TranscriptSpeaker, TranscriptSpeakerGender, TranscriptSpeakerIdentified, TranscriptSpeakerNumbers, TranscriptSentence, TranscriptTranslated, TranscriptVoice, TranscriptVoiceStatus, TranscriptLanguageStatus, TranscriptRetracted, TranscriptHeld, TranscriptProgress]
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
def parse_server_frame(text: str) -> Optional[ServerFrame]:
|
|
2336
|
+
"""Parse one WS text frame. Returns None for unknown frame types
|
|
2337
|
+
(forward compatibility); a known frame that does not match its model
|
|
2338
|
+
is still returned, built from its fields unchecked."""
|
|
2339
|
+
raw = json.loads(text)
|
|
2340
|
+
if not isinstance(raw, dict) or raw.get("type") not in SERVER_FRAME_TYPES:
|
|
2341
|
+
_log.debug("ignoring server frame of unknown type %r", raw.get("type") if isinstance(raw, dict) else None)
|
|
2342
|
+
return None
|
|
2343
|
+
try:
|
|
2344
|
+
return _server_frame_adapter.validate_python(raw)
|
|
2345
|
+
except ValidationError as e:
|
|
2346
|
+
_log.debug("server frame %r does not match the contract: %s", raw["type"], e)
|
|
2347
|
+
return _SERVER_FRAME_CLASSES[raw["type"]].model_construct(**raw)
|