@opencode/ai 2.0.31 → 2.1.0
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.
- package/dist/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +47 -0
- package/dist/experimental/realtime.js +99 -0
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.js +1 -0
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/gemini.js +11 -1
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
package/dist/transcription.d.ts
CHANGED
|
@@ -319,29 +319,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
319
319
|
}>]> & {
|
|
320
320
|
readonly discriminants: readonly ["generation-queued", "generation-progress", "text-delta", "segment", "finish"];
|
|
321
321
|
readonly cases: {
|
|
322
|
-
"generation-queued": Schema.Struct<{
|
|
323
|
-
readonly type: Schema.tag<"generation-queued">;
|
|
324
|
-
readonly id: Schema.String;
|
|
325
|
-
readonly position: Schema.optional<Schema.Number>;
|
|
326
|
-
}>;
|
|
327
|
-
"generation-progress": Schema.Struct<{
|
|
328
|
-
readonly type: Schema.tag<"generation-progress">;
|
|
329
|
-
readonly id: Schema.String;
|
|
330
|
-
readonly progress: Schema.optional<Schema.Number>;
|
|
331
|
-
}>;
|
|
332
|
-
"text-delta": Schema.Struct<{
|
|
333
|
-
readonly type: Schema.tag<"text-delta">;
|
|
334
|
-
readonly delta: Schema.String;
|
|
335
|
-
}>;
|
|
336
|
-
segment: Schema.Struct<{
|
|
337
|
-
readonly type: Schema.tag<"segment">;
|
|
338
|
-
readonly segment: Schema.Struct<{
|
|
339
|
-
readonly text: Schema.String;
|
|
340
|
-
readonly startSeconds: Schema.Number;
|
|
341
|
-
readonly endSeconds: Schema.Number;
|
|
342
|
-
readonly speaker: Schema.optional<Schema.String>;
|
|
343
|
-
}>;
|
|
344
|
-
}>;
|
|
345
322
|
finish: Schema.Struct<{
|
|
346
323
|
readonly text: Schema.String;
|
|
347
324
|
readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
@@ -386,14 +363,37 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
386
363
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
387
364
|
readonly type: Schema.tag<"finish">;
|
|
388
365
|
}>;
|
|
366
|
+
"generation-progress": Schema.Struct<{
|
|
367
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
368
|
+
readonly id: Schema.String;
|
|
369
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
370
|
+
}>;
|
|
371
|
+
"generation-queued": Schema.Struct<{
|
|
372
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
373
|
+
readonly id: Schema.String;
|
|
374
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
375
|
+
}>;
|
|
376
|
+
segment: Schema.Struct<{
|
|
377
|
+
readonly type: Schema.tag<"segment">;
|
|
378
|
+
readonly segment: Schema.Struct<{
|
|
379
|
+
readonly text: Schema.String;
|
|
380
|
+
readonly startSeconds: Schema.Number;
|
|
381
|
+
readonly endSeconds: Schema.Number;
|
|
382
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
383
|
+
}>;
|
|
384
|
+
}>;
|
|
385
|
+
"text-delta": Schema.Struct<{
|
|
386
|
+
readonly type: Schema.tag<"text-delta">;
|
|
387
|
+
readonly delta: Schema.String;
|
|
388
|
+
}>;
|
|
389
389
|
};
|
|
390
390
|
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: {
|
|
391
|
-
readonly id: string;
|
|
392
391
|
readonly type: "generation-queued";
|
|
392
|
+
readonly id: string;
|
|
393
393
|
readonly position?: number | undefined;
|
|
394
394
|
} | {
|
|
395
|
-
readonly id: string;
|
|
396
395
|
readonly type: "generation-progress";
|
|
396
|
+
readonly id: string;
|
|
397
397
|
readonly progress?: number | undefined;
|
|
398
398
|
} | {
|
|
399
399
|
readonly type: "text-delta";
|
|
@@ -407,14 +407,22 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
407
407
|
readonly speaker?: string | undefined;
|
|
408
408
|
};
|
|
409
409
|
} | {
|
|
410
|
-
readonly type: "finish";
|
|
411
410
|
readonly text: string;
|
|
411
|
+
readonly segments?: readonly {
|
|
412
|
+
readonly text: string;
|
|
413
|
+
readonly startSeconds: number;
|
|
414
|
+
readonly endSeconds: number;
|
|
415
|
+
readonly speaker?: string | undefined;
|
|
416
|
+
}[] | undefined;
|
|
417
|
+
readonly words?: readonly {
|
|
418
|
+
readonly text: string;
|
|
419
|
+
readonly startSeconds: number;
|
|
420
|
+
readonly endSeconds: number;
|
|
421
|
+
readonly speaker?: string | undefined;
|
|
422
|
+
readonly confidence?: number | undefined;
|
|
423
|
+
}[] | undefined;
|
|
424
|
+
readonly language?: string | undefined;
|
|
412
425
|
readonly durationSeconds?: number | undefined;
|
|
413
|
-
readonly providerMetadata?: {
|
|
414
|
-
readonly [x: string]: {
|
|
415
|
-
readonly [x: string]: unknown;
|
|
416
|
-
};
|
|
417
|
-
} | undefined;
|
|
418
426
|
readonly usage?: {
|
|
419
427
|
readonly type: "tokens";
|
|
420
428
|
readonly input?: number | undefined;
|
|
@@ -437,7 +445,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
437
445
|
readonly seconds: number;
|
|
438
446
|
} | undefined;
|
|
439
447
|
readonly notices?: readonly {
|
|
440
|
-
readonly type: "
|
|
448
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
441
449
|
readonly message: string;
|
|
442
450
|
readonly providerMetadata?: {
|
|
443
451
|
readonly [x: string]: {
|
|
@@ -445,29 +453,21 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
445
453
|
};
|
|
446
454
|
} | undefined;
|
|
447
455
|
}[] | undefined;
|
|
448
|
-
readonly
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}[] | undefined;
|
|
455
|
-
readonly words?: readonly {
|
|
456
|
-
readonly text: string;
|
|
457
|
-
readonly startSeconds: number;
|
|
458
|
-
readonly endSeconds: number;
|
|
459
|
-
readonly speaker?: string | undefined;
|
|
460
|
-
readonly confidence?: number | undefined;
|
|
461
|
-
}[] | undefined;
|
|
456
|
+
readonly providerMetadata?: {
|
|
457
|
+
readonly [x: string]: {
|
|
458
|
+
readonly [x: string]: unknown;
|
|
459
|
+
};
|
|
460
|
+
} | undefined;
|
|
461
|
+
readonly type: "finish";
|
|
462
462
|
}) => value is Extract<{
|
|
463
|
-
readonly id: string;
|
|
464
463
|
readonly type: "generation-queued";
|
|
464
|
+
readonly id: string;
|
|
465
465
|
readonly position?: number | undefined;
|
|
466
466
|
}, {
|
|
467
467
|
readonly type: Keys;
|
|
468
468
|
}> | Extract<{
|
|
469
|
-
readonly id: string;
|
|
470
469
|
readonly type: "generation-progress";
|
|
470
|
+
readonly id: string;
|
|
471
471
|
readonly progress?: number | undefined;
|
|
472
472
|
}, {
|
|
473
473
|
readonly type: Keys;
|
|
@@ -487,14 +487,22 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
487
487
|
}, {
|
|
488
488
|
readonly type: Keys;
|
|
489
489
|
}> | Extract<{
|
|
490
|
-
readonly type: "finish";
|
|
491
490
|
readonly text: string;
|
|
491
|
+
readonly segments?: readonly {
|
|
492
|
+
readonly text: string;
|
|
493
|
+
readonly startSeconds: number;
|
|
494
|
+
readonly endSeconds: number;
|
|
495
|
+
readonly speaker?: string | undefined;
|
|
496
|
+
}[] | undefined;
|
|
497
|
+
readonly words?: readonly {
|
|
498
|
+
readonly text: string;
|
|
499
|
+
readonly startSeconds: number;
|
|
500
|
+
readonly endSeconds: number;
|
|
501
|
+
readonly speaker?: string | undefined;
|
|
502
|
+
readonly confidence?: number | undefined;
|
|
503
|
+
}[] | undefined;
|
|
504
|
+
readonly language?: string | undefined;
|
|
492
505
|
readonly durationSeconds?: number | undefined;
|
|
493
|
-
readonly providerMetadata?: {
|
|
494
|
-
readonly [x: string]: {
|
|
495
|
-
readonly [x: string]: unknown;
|
|
496
|
-
};
|
|
497
|
-
} | undefined;
|
|
498
506
|
readonly usage?: {
|
|
499
507
|
readonly type: "tokens";
|
|
500
508
|
readonly input?: number | undefined;
|
|
@@ -517,7 +525,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
517
525
|
readonly seconds: number;
|
|
518
526
|
} | undefined;
|
|
519
527
|
readonly notices?: readonly {
|
|
520
|
-
readonly type: "
|
|
528
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
521
529
|
readonly message: string;
|
|
522
530
|
readonly providerMetadata?: {
|
|
523
531
|
readonly [x: string]: {
|
|
@@ -525,87 +533,18 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
525
533
|
};
|
|
526
534
|
} | undefined;
|
|
527
535
|
}[] | undefined;
|
|
528
|
-
readonly
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
}[] | undefined;
|
|
535
|
-
readonly words?: readonly {
|
|
536
|
-
readonly text: string;
|
|
537
|
-
readonly startSeconds: number;
|
|
538
|
-
readonly endSeconds: number;
|
|
539
|
-
readonly speaker?: string | undefined;
|
|
540
|
-
readonly confidence?: number | undefined;
|
|
541
|
-
}[] | undefined;
|
|
536
|
+
readonly providerMetadata?: {
|
|
537
|
+
readonly [x: string]: {
|
|
538
|
+
readonly [x: string]: unknown;
|
|
539
|
+
};
|
|
540
|
+
} | undefined;
|
|
541
|
+
readonly type: "finish";
|
|
542
542
|
}, {
|
|
543
543
|
readonly type: Keys;
|
|
544
544
|
}>;
|
|
545
545
|
readonly guards: {
|
|
546
|
-
"generation-queued": (u: unknown) => u is {
|
|
547
|
-
readonly id: string;
|
|
548
|
-
readonly type: "generation-queued";
|
|
549
|
-
readonly position?: number | undefined;
|
|
550
|
-
};
|
|
551
|
-
"generation-progress": (u: unknown) => u is {
|
|
552
|
-
readonly id: string;
|
|
553
|
-
readonly type: "generation-progress";
|
|
554
|
-
readonly progress?: number | undefined;
|
|
555
|
-
};
|
|
556
|
-
"text-delta": (u: unknown) => u is {
|
|
557
|
-
readonly type: "text-delta";
|
|
558
|
-
readonly delta: string;
|
|
559
|
-
};
|
|
560
|
-
segment: (u: unknown) => u is {
|
|
561
|
-
readonly type: "segment";
|
|
562
|
-
readonly segment: {
|
|
563
|
-
readonly text: string;
|
|
564
|
-
readonly startSeconds: number;
|
|
565
|
-
readonly endSeconds: number;
|
|
566
|
-
readonly speaker?: string | undefined;
|
|
567
|
-
};
|
|
568
|
-
};
|
|
569
546
|
finish: (u: unknown) => u is {
|
|
570
|
-
readonly type: "finish";
|
|
571
547
|
readonly text: string;
|
|
572
|
-
readonly durationSeconds?: number | undefined;
|
|
573
|
-
readonly providerMetadata?: {
|
|
574
|
-
readonly [x: string]: {
|
|
575
|
-
readonly [x: string]: unknown;
|
|
576
|
-
};
|
|
577
|
-
} | undefined;
|
|
578
|
-
readonly usage?: {
|
|
579
|
-
readonly type: "tokens";
|
|
580
|
-
readonly input?: number | undefined;
|
|
581
|
-
readonly output?: number | undefined;
|
|
582
|
-
readonly total?: number | undefined;
|
|
583
|
-
readonly details?: {
|
|
584
|
-
readonly [x: string]: unknown;
|
|
585
|
-
} | undefined;
|
|
586
|
-
} | {
|
|
587
|
-
readonly type: "seconds";
|
|
588
|
-
readonly seconds: number;
|
|
589
|
-
} | {
|
|
590
|
-
readonly type: "characters";
|
|
591
|
-
readonly characters: number;
|
|
592
|
-
} | {
|
|
593
|
-
readonly type: "credits";
|
|
594
|
-
readonly credits: number;
|
|
595
|
-
} | {
|
|
596
|
-
readonly type: "compute";
|
|
597
|
-
readonly seconds: number;
|
|
598
|
-
} | undefined;
|
|
599
|
-
readonly notices?: readonly {
|
|
600
|
-
readonly type: "other" | "moderated" | "filtered";
|
|
601
|
-
readonly message: string;
|
|
602
|
-
readonly providerMetadata?: {
|
|
603
|
-
readonly [x: string]: {
|
|
604
|
-
readonly [x: string]: unknown;
|
|
605
|
-
};
|
|
606
|
-
} | undefined;
|
|
607
|
-
}[] | undefined;
|
|
608
|
-
readonly language?: string | undefined;
|
|
609
548
|
readonly segments?: readonly {
|
|
610
549
|
readonly text: string;
|
|
611
550
|
readonly startSeconds: number;
|
|
@@ -619,115 +558,8 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
619
558
|
readonly speaker?: string | undefined;
|
|
620
559
|
readonly confidence?: number | undefined;
|
|
621
560
|
}[] | undefined;
|
|
622
|
-
|
|
623
|
-
};
|
|
624
|
-
readonly match: {
|
|
625
|
-
<Cases extends {
|
|
626
|
-
"generation-queued": (value: {
|
|
627
|
-
readonly id: string;
|
|
628
|
-
readonly type: "generation-queued";
|
|
629
|
-
readonly position?: number | undefined;
|
|
630
|
-
}) => any;
|
|
631
|
-
"generation-progress": (value: {
|
|
632
|
-
readonly id: string;
|
|
633
|
-
readonly type: "generation-progress";
|
|
634
|
-
readonly progress?: number | undefined;
|
|
635
|
-
}) => any;
|
|
636
|
-
"text-delta": (value: {
|
|
637
|
-
readonly type: "text-delta";
|
|
638
|
-
readonly delta: string;
|
|
639
|
-
}) => any;
|
|
640
|
-
segment: (value: {
|
|
641
|
-
readonly type: "segment";
|
|
642
|
-
readonly segment: {
|
|
643
|
-
readonly text: string;
|
|
644
|
-
readonly startSeconds: number;
|
|
645
|
-
readonly endSeconds: number;
|
|
646
|
-
readonly speaker?: string | undefined;
|
|
647
|
-
};
|
|
648
|
-
}) => any;
|
|
649
|
-
finish: (value: {
|
|
650
|
-
readonly type: "finish";
|
|
651
|
-
readonly text: string;
|
|
652
|
-
readonly durationSeconds?: number | undefined;
|
|
653
|
-
readonly providerMetadata?: {
|
|
654
|
-
readonly [x: string]: {
|
|
655
|
-
readonly [x: string]: unknown;
|
|
656
|
-
};
|
|
657
|
-
} | undefined;
|
|
658
|
-
readonly usage?: {
|
|
659
|
-
readonly type: "tokens";
|
|
660
|
-
readonly input?: number | undefined;
|
|
661
|
-
readonly output?: number | undefined;
|
|
662
|
-
readonly total?: number | undefined;
|
|
663
|
-
readonly details?: {
|
|
664
|
-
readonly [x: string]: unknown;
|
|
665
|
-
} | undefined;
|
|
666
|
-
} | {
|
|
667
|
-
readonly type: "seconds";
|
|
668
|
-
readonly seconds: number;
|
|
669
|
-
} | {
|
|
670
|
-
readonly type: "characters";
|
|
671
|
-
readonly characters: number;
|
|
672
|
-
} | {
|
|
673
|
-
readonly type: "credits";
|
|
674
|
-
readonly credits: number;
|
|
675
|
-
} | {
|
|
676
|
-
readonly type: "compute";
|
|
677
|
-
readonly seconds: number;
|
|
678
|
-
} | undefined;
|
|
679
|
-
readonly notices?: readonly {
|
|
680
|
-
readonly type: "other" | "moderated" | "filtered";
|
|
681
|
-
readonly message: string;
|
|
682
|
-
readonly providerMetadata?: {
|
|
683
|
-
readonly [x: string]: {
|
|
684
|
-
readonly [x: string]: unknown;
|
|
685
|
-
};
|
|
686
|
-
} | undefined;
|
|
687
|
-
}[] | undefined;
|
|
688
|
-
readonly language?: string | undefined;
|
|
689
|
-
readonly segments?: readonly {
|
|
690
|
-
readonly text: string;
|
|
691
|
-
readonly startSeconds: number;
|
|
692
|
-
readonly endSeconds: number;
|
|
693
|
-
readonly speaker?: string | undefined;
|
|
694
|
-
}[] | undefined;
|
|
695
|
-
readonly words?: readonly {
|
|
696
|
-
readonly text: string;
|
|
697
|
-
readonly startSeconds: number;
|
|
698
|
-
readonly endSeconds: number;
|
|
699
|
-
readonly speaker?: string | undefined;
|
|
700
|
-
readonly confidence?: number | undefined;
|
|
701
|
-
}[] | undefined;
|
|
702
|
-
}) => any;
|
|
703
|
-
}>(value: {
|
|
704
|
-
readonly id: string;
|
|
705
|
-
readonly type: "generation-queued";
|
|
706
|
-
readonly position?: number | undefined;
|
|
707
|
-
} | {
|
|
708
|
-
readonly id: string;
|
|
709
|
-
readonly type: "generation-progress";
|
|
710
|
-
readonly progress?: number | undefined;
|
|
711
|
-
} | {
|
|
712
|
-
readonly type: "text-delta";
|
|
713
|
-
readonly delta: string;
|
|
714
|
-
} | {
|
|
715
|
-
readonly type: "segment";
|
|
716
|
-
readonly segment: {
|
|
717
|
-
readonly text: string;
|
|
718
|
-
readonly startSeconds: number;
|
|
719
|
-
readonly endSeconds: number;
|
|
720
|
-
readonly speaker?: string | undefined;
|
|
721
|
-
};
|
|
722
|
-
} | {
|
|
723
|
-
readonly type: "finish";
|
|
724
|
-
readonly text: string;
|
|
561
|
+
readonly language?: string | undefined;
|
|
725
562
|
readonly durationSeconds?: number | undefined;
|
|
726
|
-
readonly providerMetadata?: {
|
|
727
|
-
readonly [x: string]: {
|
|
728
|
-
readonly [x: string]: unknown;
|
|
729
|
-
};
|
|
730
|
-
} | undefined;
|
|
731
563
|
readonly usage?: {
|
|
732
564
|
readonly type: "tokens";
|
|
733
565
|
readonly input?: number | undefined;
|
|
@@ -750,7 +582,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
750
582
|
readonly seconds: number;
|
|
751
583
|
} | undefined;
|
|
752
584
|
readonly notices?: readonly {
|
|
753
|
-
readonly type: "
|
|
585
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
754
586
|
readonly message: string;
|
|
755
587
|
readonly providerMetadata?: {
|
|
756
588
|
readonly [x: string]: {
|
|
@@ -758,106 +590,107 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
758
590
|
};
|
|
759
591
|
} | undefined;
|
|
760
592
|
}[] | undefined;
|
|
761
|
-
readonly
|
|
762
|
-
|
|
593
|
+
readonly providerMetadata?: {
|
|
594
|
+
readonly [x: string]: {
|
|
595
|
+
readonly [x: string]: unknown;
|
|
596
|
+
};
|
|
597
|
+
} | undefined;
|
|
598
|
+
readonly type: "finish";
|
|
599
|
+
};
|
|
600
|
+
"generation-progress": (u: unknown) => u is {
|
|
601
|
+
readonly type: "generation-progress";
|
|
602
|
+
readonly id: string;
|
|
603
|
+
readonly progress?: number | undefined;
|
|
604
|
+
};
|
|
605
|
+
"generation-queued": (u: unknown) => u is {
|
|
606
|
+
readonly type: "generation-queued";
|
|
607
|
+
readonly id: string;
|
|
608
|
+
readonly position?: number | undefined;
|
|
609
|
+
};
|
|
610
|
+
segment: (u: unknown) => u is {
|
|
611
|
+
readonly type: "segment";
|
|
612
|
+
readonly segment: {
|
|
763
613
|
readonly text: string;
|
|
764
614
|
readonly startSeconds: number;
|
|
765
615
|
readonly endSeconds: number;
|
|
766
616
|
readonly speaker?: string | undefined;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
readonly
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
readonly
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
readonly
|
|
804
|
-
readonly
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
}[] | undefined;
|
|
839
|
-
readonly language?: string | undefined;
|
|
840
|
-
readonly segments?: readonly {
|
|
841
|
-
readonly text: string;
|
|
842
|
-
readonly startSeconds: number;
|
|
843
|
-
readonly endSeconds: number;
|
|
844
|
-
readonly speaker?: string | undefined;
|
|
845
|
-
}[] | undefined;
|
|
846
|
-
readonly words?: readonly {
|
|
847
|
-
readonly text: string;
|
|
848
|
-
readonly startSeconds: number;
|
|
849
|
-
readonly endSeconds: number;
|
|
850
|
-
readonly speaker?: string | undefined;
|
|
851
|
-
readonly confidence?: number | undefined;
|
|
852
|
-
}[] | undefined;
|
|
853
|
-
}) => any;
|
|
854
|
-
}>(cases: Cases): (value: {
|
|
855
|
-
readonly id: string;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
"text-delta": (u: unknown) => u is {
|
|
620
|
+
readonly type: "text-delta";
|
|
621
|
+
readonly delta: string;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
readonly match: {
|
|
625
|
+
<Cases extends { [M in Schema.Struct<{
|
|
626
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
627
|
+
readonly id: Schema.String;
|
|
628
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
629
|
+
}> | Schema.Struct<{
|
|
630
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
631
|
+
readonly id: Schema.String;
|
|
632
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
633
|
+
}> | Schema.Struct<{
|
|
634
|
+
readonly type: Schema.tag<"text-delta">;
|
|
635
|
+
readonly delta: Schema.String;
|
|
636
|
+
}> | Schema.Struct<{
|
|
637
|
+
readonly type: Schema.tag<"segment">;
|
|
638
|
+
readonly segment: Schema.Struct<{
|
|
639
|
+
readonly text: Schema.String;
|
|
640
|
+
readonly startSeconds: Schema.Number;
|
|
641
|
+
readonly endSeconds: Schema.Number;
|
|
642
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
643
|
+
}>;
|
|
644
|
+
}> | Schema.Struct<{
|
|
645
|
+
readonly text: Schema.String;
|
|
646
|
+
readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
647
|
+
readonly text: Schema.String;
|
|
648
|
+
readonly startSeconds: Schema.Number;
|
|
649
|
+
readonly endSeconds: Schema.Number;
|
|
650
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
651
|
+
}>>>;
|
|
652
|
+
readonly words: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
653
|
+
readonly text: Schema.String;
|
|
654
|
+
readonly startSeconds: Schema.Number;
|
|
655
|
+
readonly endSeconds: Schema.Number;
|
|
656
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
657
|
+
readonly confidence: Schema.optional<Schema.Number>;
|
|
658
|
+
}>>>;
|
|
659
|
+
readonly language: Schema.optional<Schema.String>;
|
|
660
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
661
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
662
|
+
readonly type: Schema.Literal<"tokens">;
|
|
663
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
664
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
665
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
666
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
667
|
+
}>, Schema.Struct<{
|
|
668
|
+
readonly type: Schema.Literal<"seconds">;
|
|
669
|
+
readonly seconds: Schema.Number;
|
|
670
|
+
}>, Schema.Struct<{
|
|
671
|
+
readonly type: Schema.Literal<"characters">;
|
|
672
|
+
readonly characters: Schema.Number;
|
|
673
|
+
}>, Schema.Struct<{
|
|
674
|
+
readonly type: Schema.Literal<"credits">;
|
|
675
|
+
readonly credits: Schema.Number;
|
|
676
|
+
}>, Schema.Struct<{
|
|
677
|
+
readonly type: Schema.Literal<"compute">;
|
|
678
|
+
readonly seconds: Schema.Number;
|
|
679
|
+
}>]>>;
|
|
680
|
+
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
681
|
+
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
682
|
+
readonly message: Schema.String;
|
|
683
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
684
|
+
}>>>;
|
|
685
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
686
|
+
readonly type: Schema.tag<"finish">;
|
|
687
|
+
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(value: {
|
|
856
688
|
readonly type: "generation-queued";
|
|
689
|
+
readonly id: string;
|
|
857
690
|
readonly position?: number | undefined;
|
|
858
691
|
} | {
|
|
859
|
-
readonly id: string;
|
|
860
692
|
readonly type: "generation-progress";
|
|
693
|
+
readonly id: string;
|
|
861
694
|
readonly progress?: number | undefined;
|
|
862
695
|
} | {
|
|
863
696
|
readonly type: "text-delta";
|
|
@@ -871,14 +704,22 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
871
704
|
readonly speaker?: string | undefined;
|
|
872
705
|
};
|
|
873
706
|
} | {
|
|
874
|
-
readonly type: "finish";
|
|
875
707
|
readonly text: string;
|
|
708
|
+
readonly segments?: readonly {
|
|
709
|
+
readonly text: string;
|
|
710
|
+
readonly startSeconds: number;
|
|
711
|
+
readonly endSeconds: number;
|
|
712
|
+
readonly speaker?: string | undefined;
|
|
713
|
+
}[] | undefined;
|
|
714
|
+
readonly words?: readonly {
|
|
715
|
+
readonly text: string;
|
|
716
|
+
readonly startSeconds: number;
|
|
717
|
+
readonly endSeconds: number;
|
|
718
|
+
readonly speaker?: string | undefined;
|
|
719
|
+
readonly confidence?: number | undefined;
|
|
720
|
+
}[] | undefined;
|
|
721
|
+
readonly language?: string | undefined;
|
|
876
722
|
readonly durationSeconds?: number | undefined;
|
|
877
|
-
readonly providerMetadata?: {
|
|
878
|
-
readonly [x: string]: {
|
|
879
|
-
readonly [x: string]: unknown;
|
|
880
|
-
};
|
|
881
|
-
} | undefined;
|
|
882
723
|
readonly usage?: {
|
|
883
724
|
readonly type: "tokens";
|
|
884
725
|
readonly input?: number | undefined;
|
|
@@ -901,7 +742,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
901
742
|
readonly seconds: number;
|
|
902
743
|
} | undefined;
|
|
903
744
|
readonly notices?: readonly {
|
|
904
|
-
readonly type: "
|
|
745
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
905
746
|
readonly message: string;
|
|
906
747
|
readonly providerMetadata?: {
|
|
907
748
|
readonly [x: string]: {
|
|
@@ -909,119 +750,87 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
909
750
|
};
|
|
910
751
|
} | undefined;
|
|
911
752
|
}[] | undefined;
|
|
912
|
-
readonly
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
readonly startSeconds: number;
|
|
916
|
-
readonly endSeconds: number;
|
|
917
|
-
readonly speaker?: string | undefined;
|
|
918
|
-
}[] | undefined;
|
|
919
|
-
readonly words?: readonly {
|
|
920
|
-
readonly text: string;
|
|
921
|
-
readonly startSeconds: number;
|
|
922
|
-
readonly endSeconds: number;
|
|
923
|
-
readonly speaker?: string | undefined;
|
|
924
|
-
readonly confidence?: number | undefined;
|
|
925
|
-
}[] | undefined;
|
|
926
|
-
}) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
927
|
-
};
|
|
928
|
-
readonly matchOrElse: {
|
|
929
|
-
<Cases extends {
|
|
930
|
-
"generation-queued"?: ((value: {
|
|
931
|
-
readonly id: string;
|
|
932
|
-
readonly type: "generation-queued";
|
|
933
|
-
readonly position?: number | undefined;
|
|
934
|
-
}) => any) | undefined;
|
|
935
|
-
"generation-progress"?: ((value: {
|
|
936
|
-
readonly id: string;
|
|
937
|
-
readonly type: "generation-progress";
|
|
938
|
-
readonly progress?: number | undefined;
|
|
939
|
-
}) => any) | undefined;
|
|
940
|
-
"text-delta"?: ((value: {
|
|
941
|
-
readonly type: "text-delta";
|
|
942
|
-
readonly delta: string;
|
|
943
|
-
}) => any) | undefined;
|
|
944
|
-
segment?: ((value: {
|
|
945
|
-
readonly type: "segment";
|
|
946
|
-
readonly segment: {
|
|
947
|
-
readonly text: string;
|
|
948
|
-
readonly startSeconds: number;
|
|
949
|
-
readonly endSeconds: number;
|
|
950
|
-
readonly speaker?: string | undefined;
|
|
753
|
+
readonly providerMetadata?: {
|
|
754
|
+
readonly [x: string]: {
|
|
755
|
+
readonly [x: string]: unknown;
|
|
951
756
|
};
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
readonly
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
readonly
|
|
993
|
-
readonly
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
readonly
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
|
|
757
|
+
} | undefined;
|
|
758
|
+
readonly type: "finish";
|
|
759
|
+
}, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
760
|
+
<Cases extends { [M in Schema.Struct<{
|
|
761
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
762
|
+
readonly id: Schema.String;
|
|
763
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
764
|
+
}> | Schema.Struct<{
|
|
765
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
766
|
+
readonly id: Schema.String;
|
|
767
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
768
|
+
}> | Schema.Struct<{
|
|
769
|
+
readonly type: Schema.tag<"text-delta">;
|
|
770
|
+
readonly delta: Schema.String;
|
|
771
|
+
}> | Schema.Struct<{
|
|
772
|
+
readonly type: Schema.tag<"segment">;
|
|
773
|
+
readonly segment: Schema.Struct<{
|
|
774
|
+
readonly text: Schema.String;
|
|
775
|
+
readonly startSeconds: Schema.Number;
|
|
776
|
+
readonly endSeconds: Schema.Number;
|
|
777
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
778
|
+
}>;
|
|
779
|
+
}> | Schema.Struct<{
|
|
780
|
+
readonly text: Schema.String;
|
|
781
|
+
readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
782
|
+
readonly text: Schema.String;
|
|
783
|
+
readonly startSeconds: Schema.Number;
|
|
784
|
+
readonly endSeconds: Schema.Number;
|
|
785
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
786
|
+
}>>>;
|
|
787
|
+
readonly words: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
788
|
+
readonly text: Schema.String;
|
|
789
|
+
readonly startSeconds: Schema.Number;
|
|
790
|
+
readonly endSeconds: Schema.Number;
|
|
791
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
792
|
+
readonly confidence: Schema.optional<Schema.Number>;
|
|
793
|
+
}>>>;
|
|
794
|
+
readonly language: Schema.optional<Schema.String>;
|
|
795
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
796
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
797
|
+
readonly type: Schema.Literal<"tokens">;
|
|
798
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
799
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
800
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
801
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
802
|
+
}>, Schema.Struct<{
|
|
803
|
+
readonly type: Schema.Literal<"seconds">;
|
|
804
|
+
readonly seconds: Schema.Number;
|
|
805
|
+
}>, Schema.Struct<{
|
|
806
|
+
readonly type: Schema.Literal<"characters">;
|
|
807
|
+
readonly characters: Schema.Number;
|
|
808
|
+
}>, Schema.Struct<{
|
|
809
|
+
readonly type: Schema.Literal<"credits">;
|
|
810
|
+
readonly credits: Schema.Number;
|
|
811
|
+
}>, Schema.Struct<{
|
|
812
|
+
readonly type: Schema.Literal<"compute">;
|
|
813
|
+
readonly seconds: Schema.Number;
|
|
814
|
+
}>]>>;
|
|
815
|
+
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
816
|
+
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
817
|
+
readonly message: Schema.String;
|
|
818
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
819
|
+
}>>>;
|
|
820
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
821
|
+
readonly type: Schema.tag<"finish">;
|
|
822
|
+
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: {
|
|
1009
823
|
readonly type: "generation-queued";
|
|
1010
|
-
readonly position?: number | undefined;
|
|
1011
|
-
}, {
|
|
1012
|
-
readonly type: keyof Cases;
|
|
1013
|
-
}> | Exclude<{
|
|
1014
824
|
readonly id: string;
|
|
825
|
+
readonly position?: number | undefined;
|
|
826
|
+
} | {
|
|
1015
827
|
readonly type: "generation-progress";
|
|
828
|
+
readonly id: string;
|
|
1016
829
|
readonly progress?: number | undefined;
|
|
1017
|
-
}
|
|
1018
|
-
readonly type: keyof Cases;
|
|
1019
|
-
}> | Exclude<{
|
|
830
|
+
} | {
|
|
1020
831
|
readonly type: "text-delta";
|
|
1021
832
|
readonly delta: string;
|
|
1022
|
-
}
|
|
1023
|
-
readonly type: keyof Cases;
|
|
1024
|
-
}> | Exclude<{
|
|
833
|
+
} | {
|
|
1025
834
|
readonly type: "segment";
|
|
1026
835
|
readonly segment: {
|
|
1027
836
|
readonly text: string;
|
|
@@ -1029,17 +838,23 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1029
838
|
readonly endSeconds: number;
|
|
1030
839
|
readonly speaker?: string | undefined;
|
|
1031
840
|
};
|
|
1032
|
-
}
|
|
1033
|
-
readonly type: keyof Cases;
|
|
1034
|
-
}> | Exclude<{
|
|
1035
|
-
readonly type: "finish";
|
|
841
|
+
} | {
|
|
1036
842
|
readonly text: string;
|
|
843
|
+
readonly segments?: readonly {
|
|
844
|
+
readonly text: string;
|
|
845
|
+
readonly startSeconds: number;
|
|
846
|
+
readonly endSeconds: number;
|
|
847
|
+
readonly speaker?: string | undefined;
|
|
848
|
+
}[] | undefined;
|
|
849
|
+
readonly words?: readonly {
|
|
850
|
+
readonly text: string;
|
|
851
|
+
readonly startSeconds: number;
|
|
852
|
+
readonly endSeconds: number;
|
|
853
|
+
readonly speaker?: string | undefined;
|
|
854
|
+
readonly confidence?: number | undefined;
|
|
855
|
+
}[] | undefined;
|
|
856
|
+
readonly language?: string | undefined;
|
|
1037
857
|
readonly durationSeconds?: number | undefined;
|
|
1038
|
-
readonly providerMetadata?: {
|
|
1039
|
-
readonly [x: string]: {
|
|
1040
|
-
readonly [x: string]: unknown;
|
|
1041
|
-
};
|
|
1042
|
-
} | undefined;
|
|
1043
858
|
readonly usage?: {
|
|
1044
859
|
readonly type: "tokens";
|
|
1045
860
|
readonly input?: number | undefined;
|
|
@@ -1062,7 +877,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1062
877
|
readonly seconds: number;
|
|
1063
878
|
} | undefined;
|
|
1064
879
|
readonly notices?: readonly {
|
|
1065
|
-
readonly type: "
|
|
880
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
1066
881
|
readonly message: string;
|
|
1067
882
|
readonly providerMetadata?: {
|
|
1068
883
|
readonly [x: string]: {
|
|
@@ -1070,7 +885,98 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1070
885
|
};
|
|
1071
886
|
} | undefined;
|
|
1072
887
|
}[] | undefined;
|
|
1073
|
-
readonly
|
|
888
|
+
readonly providerMetadata?: {
|
|
889
|
+
readonly [x: string]: {
|
|
890
|
+
readonly [x: string]: unknown;
|
|
891
|
+
};
|
|
892
|
+
} | undefined;
|
|
893
|
+
readonly type: "finish";
|
|
894
|
+
}) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
895
|
+
};
|
|
896
|
+
readonly matchOrElse: {
|
|
897
|
+
<Cases extends { [M in Schema.Struct<{
|
|
898
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
899
|
+
readonly id: Schema.String;
|
|
900
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
901
|
+
}> | Schema.Struct<{
|
|
902
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
903
|
+
readonly id: Schema.String;
|
|
904
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
905
|
+
}> | Schema.Struct<{
|
|
906
|
+
readonly type: Schema.tag<"text-delta">;
|
|
907
|
+
readonly delta: Schema.String;
|
|
908
|
+
}> | Schema.Struct<{
|
|
909
|
+
readonly type: Schema.tag<"segment">;
|
|
910
|
+
readonly segment: Schema.Struct<{
|
|
911
|
+
readonly text: Schema.String;
|
|
912
|
+
readonly startSeconds: Schema.Number;
|
|
913
|
+
readonly endSeconds: Schema.Number;
|
|
914
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
915
|
+
}>;
|
|
916
|
+
}> | Schema.Struct<{
|
|
917
|
+
readonly text: Schema.String;
|
|
918
|
+
readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
919
|
+
readonly text: Schema.String;
|
|
920
|
+
readonly startSeconds: Schema.Number;
|
|
921
|
+
readonly endSeconds: Schema.Number;
|
|
922
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
923
|
+
}>>>;
|
|
924
|
+
readonly words: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
925
|
+
readonly text: Schema.String;
|
|
926
|
+
readonly startSeconds: Schema.Number;
|
|
927
|
+
readonly endSeconds: Schema.Number;
|
|
928
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
929
|
+
readonly confidence: Schema.optional<Schema.Number>;
|
|
930
|
+
}>>>;
|
|
931
|
+
readonly language: Schema.optional<Schema.String>;
|
|
932
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
933
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
934
|
+
readonly type: Schema.Literal<"tokens">;
|
|
935
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
936
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
937
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
938
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
939
|
+
}>, Schema.Struct<{
|
|
940
|
+
readonly type: Schema.Literal<"seconds">;
|
|
941
|
+
readonly seconds: Schema.Number;
|
|
942
|
+
}>, Schema.Struct<{
|
|
943
|
+
readonly type: Schema.Literal<"characters">;
|
|
944
|
+
readonly characters: Schema.Number;
|
|
945
|
+
}>, Schema.Struct<{
|
|
946
|
+
readonly type: Schema.Literal<"credits">;
|
|
947
|
+
readonly credits: Schema.Number;
|
|
948
|
+
}>, Schema.Struct<{
|
|
949
|
+
readonly type: Schema.Literal<"compute">;
|
|
950
|
+
readonly seconds: Schema.Number;
|
|
951
|
+
}>]>>;
|
|
952
|
+
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
953
|
+
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
954
|
+
readonly message: Schema.String;
|
|
955
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
956
|
+
}>>>;
|
|
957
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
958
|
+
readonly type: Schema.tag<"finish">;
|
|
959
|
+
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "segment" | "text-delta">]: never; }, OrElse extends (value: Exclude<{
|
|
960
|
+
readonly type: "generation-queued";
|
|
961
|
+
readonly id: string;
|
|
962
|
+
readonly position?: number | undefined;
|
|
963
|
+
} | {
|
|
964
|
+
readonly type: "generation-progress";
|
|
965
|
+
readonly id: string;
|
|
966
|
+
readonly progress?: number | undefined;
|
|
967
|
+
} | {
|
|
968
|
+
readonly type: "text-delta";
|
|
969
|
+
readonly delta: string;
|
|
970
|
+
} | {
|
|
971
|
+
readonly type: "segment";
|
|
972
|
+
readonly segment: {
|
|
973
|
+
readonly text: string;
|
|
974
|
+
readonly startSeconds: number;
|
|
975
|
+
readonly endSeconds: number;
|
|
976
|
+
readonly speaker?: string | undefined;
|
|
977
|
+
};
|
|
978
|
+
} | {
|
|
979
|
+
readonly text: string;
|
|
1074
980
|
readonly segments?: readonly {
|
|
1075
981
|
readonly text: string;
|
|
1076
982
|
readonly startSeconds: number;
|
|
@@ -1084,15 +990,51 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1084
990
|
readonly speaker?: string | undefined;
|
|
1085
991
|
readonly confidence?: number | undefined;
|
|
1086
992
|
}[] | undefined;
|
|
1087
|
-
|
|
1088
|
-
readonly
|
|
1089
|
-
|
|
1090
|
-
|
|
993
|
+
readonly language?: string | undefined;
|
|
994
|
+
readonly durationSeconds?: number | undefined;
|
|
995
|
+
readonly usage?: {
|
|
996
|
+
readonly type: "tokens";
|
|
997
|
+
readonly input?: number | undefined;
|
|
998
|
+
readonly output?: number | undefined;
|
|
999
|
+
readonly total?: number | undefined;
|
|
1000
|
+
readonly details?: {
|
|
1001
|
+
readonly [x: string]: unknown;
|
|
1002
|
+
} | undefined;
|
|
1003
|
+
} | {
|
|
1004
|
+
readonly type: "seconds";
|
|
1005
|
+
readonly seconds: number;
|
|
1006
|
+
} | {
|
|
1007
|
+
readonly type: "characters";
|
|
1008
|
+
readonly characters: number;
|
|
1009
|
+
} | {
|
|
1010
|
+
readonly type: "credits";
|
|
1011
|
+
readonly credits: number;
|
|
1012
|
+
} | {
|
|
1013
|
+
readonly type: "compute";
|
|
1014
|
+
readonly seconds: number;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
readonly notices?: readonly {
|
|
1017
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
1018
|
+
readonly message: string;
|
|
1019
|
+
readonly providerMetadata?: {
|
|
1020
|
+
readonly [x: string]: {
|
|
1021
|
+
readonly [x: string]: unknown;
|
|
1022
|
+
};
|
|
1023
|
+
} | undefined;
|
|
1024
|
+
}[] | undefined;
|
|
1025
|
+
readonly providerMetadata?: {
|
|
1026
|
+
readonly [x: string]: {
|
|
1027
|
+
readonly [x: string]: unknown;
|
|
1028
|
+
};
|
|
1029
|
+
} | undefined;
|
|
1030
|
+
readonly type: "finish";
|
|
1031
|
+
}, { readonly [K in "type"]: keyof Cases; }>) => any>(value: {
|
|
1091
1032
|
readonly type: "generation-queued";
|
|
1033
|
+
readonly id: string;
|
|
1092
1034
|
readonly position?: number | undefined;
|
|
1093
1035
|
} | {
|
|
1094
|
-
readonly id: string;
|
|
1095
1036
|
readonly type: "generation-progress";
|
|
1037
|
+
readonly id: string;
|
|
1096
1038
|
readonly progress?: number | undefined;
|
|
1097
1039
|
} | {
|
|
1098
1040
|
readonly type: "text-delta";
|
|
@@ -1106,14 +1048,22 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1106
1048
|
readonly speaker?: string | undefined;
|
|
1107
1049
|
};
|
|
1108
1050
|
} | {
|
|
1109
|
-
readonly type: "finish";
|
|
1110
1051
|
readonly text: string;
|
|
1052
|
+
readonly segments?: readonly {
|
|
1053
|
+
readonly text: string;
|
|
1054
|
+
readonly startSeconds: number;
|
|
1055
|
+
readonly endSeconds: number;
|
|
1056
|
+
readonly speaker?: string | undefined;
|
|
1057
|
+
}[] | undefined;
|
|
1058
|
+
readonly words?: readonly {
|
|
1059
|
+
readonly text: string;
|
|
1060
|
+
readonly startSeconds: number;
|
|
1061
|
+
readonly endSeconds: number;
|
|
1062
|
+
readonly speaker?: string | undefined;
|
|
1063
|
+
readonly confidence?: number | undefined;
|
|
1064
|
+
}[] | undefined;
|
|
1065
|
+
readonly language?: string | undefined;
|
|
1111
1066
|
readonly durationSeconds?: number | undefined;
|
|
1112
|
-
readonly providerMetadata?: {
|
|
1113
|
-
readonly [x: string]: {
|
|
1114
|
-
readonly [x: string]: unknown;
|
|
1115
|
-
};
|
|
1116
|
-
} | undefined;
|
|
1117
1067
|
readonly usage?: {
|
|
1118
1068
|
readonly type: "tokens";
|
|
1119
1069
|
readonly input?: number | undefined;
|
|
@@ -1136,7 +1086,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1136
1086
|
readonly seconds: number;
|
|
1137
1087
|
} | undefined;
|
|
1138
1088
|
readonly notices?: readonly {
|
|
1139
|
-
readonly type: "
|
|
1089
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
1140
1090
|
readonly message: string;
|
|
1141
1091
|
readonly providerMetadata?: {
|
|
1142
1092
|
readonly [x: string]: {
|
|
@@ -1144,117 +1094,87 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1144
1094
|
};
|
|
1145
1095
|
} | undefined;
|
|
1146
1096
|
}[] | undefined;
|
|
1147
|
-
readonly
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
readonly startSeconds: number;
|
|
1151
|
-
readonly endSeconds: number;
|
|
1152
|
-
readonly speaker?: string | undefined;
|
|
1153
|
-
}[] | undefined;
|
|
1154
|
-
readonly words?: readonly {
|
|
1155
|
-
readonly text: string;
|
|
1156
|
-
readonly startSeconds: number;
|
|
1157
|
-
readonly endSeconds: number;
|
|
1158
|
-
readonly speaker?: string | undefined;
|
|
1159
|
-
readonly confidence?: number | undefined;
|
|
1160
|
-
}[] | undefined;
|
|
1161
|
-
}, cases: Cases, orElse: OrElse): import("effect/Unify").Unify<{ [K_1 in keyof Cases]-?: NonNullable<Cases[K_1]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Cases] | ReturnType<OrElse>>;
|
|
1162
|
-
<Cases extends {
|
|
1163
|
-
"generation-queued"?: ((value: {
|
|
1164
|
-
readonly id: string;
|
|
1165
|
-
readonly type: "generation-queued";
|
|
1166
|
-
readonly position?: number | undefined;
|
|
1167
|
-
}) => any) | undefined;
|
|
1168
|
-
"generation-progress"?: ((value: {
|
|
1169
|
-
readonly id: string;
|
|
1170
|
-
readonly type: "generation-progress";
|
|
1171
|
-
readonly progress?: number | undefined;
|
|
1172
|
-
}) => any) | undefined;
|
|
1173
|
-
"text-delta"?: ((value: {
|
|
1174
|
-
readonly type: "text-delta";
|
|
1175
|
-
readonly delta: string;
|
|
1176
|
-
}) => any) | undefined;
|
|
1177
|
-
segment?: ((value: {
|
|
1178
|
-
readonly type: "segment";
|
|
1179
|
-
readonly segment: {
|
|
1180
|
-
readonly text: string;
|
|
1181
|
-
readonly startSeconds: number;
|
|
1182
|
-
readonly endSeconds: number;
|
|
1183
|
-
readonly speaker?: string | undefined;
|
|
1097
|
+
readonly providerMetadata?: {
|
|
1098
|
+
readonly [x: string]: {
|
|
1099
|
+
readonly [x: string]: unknown;
|
|
1184
1100
|
};
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
readonly
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
readonly
|
|
1226
|
-
readonly
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
readonly
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1101
|
+
} | undefined;
|
|
1102
|
+
readonly type: "finish";
|
|
1103
|
+
}, cases: Cases, orElse: OrElse): import("effect/Unify").Unify<{ [K in keyof Cases]-?: NonNullable<Cases[K]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Cases] | ReturnType<OrElse>>;
|
|
1104
|
+
<Cases extends { [M in Schema.Struct<{
|
|
1105
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
1106
|
+
readonly id: Schema.String;
|
|
1107
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
1108
|
+
}> | Schema.Struct<{
|
|
1109
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
1110
|
+
readonly id: Schema.String;
|
|
1111
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
1112
|
+
}> | Schema.Struct<{
|
|
1113
|
+
readonly type: Schema.tag<"text-delta">;
|
|
1114
|
+
readonly delta: Schema.String;
|
|
1115
|
+
}> | Schema.Struct<{
|
|
1116
|
+
readonly type: Schema.tag<"segment">;
|
|
1117
|
+
readonly segment: Schema.Struct<{
|
|
1118
|
+
readonly text: Schema.String;
|
|
1119
|
+
readonly startSeconds: Schema.Number;
|
|
1120
|
+
readonly endSeconds: Schema.Number;
|
|
1121
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
1122
|
+
}>;
|
|
1123
|
+
}> | Schema.Struct<{
|
|
1124
|
+
readonly text: Schema.String;
|
|
1125
|
+
readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1126
|
+
readonly text: Schema.String;
|
|
1127
|
+
readonly startSeconds: Schema.Number;
|
|
1128
|
+
readonly endSeconds: Schema.Number;
|
|
1129
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
1130
|
+
}>>>;
|
|
1131
|
+
readonly words: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1132
|
+
readonly text: Schema.String;
|
|
1133
|
+
readonly startSeconds: Schema.Number;
|
|
1134
|
+
readonly endSeconds: Schema.Number;
|
|
1135
|
+
readonly speaker: Schema.optional<Schema.String>;
|
|
1136
|
+
readonly confidence: Schema.optional<Schema.Number>;
|
|
1137
|
+
}>>>;
|
|
1138
|
+
readonly language: Schema.optional<Schema.String>;
|
|
1139
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
1140
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
1141
|
+
readonly type: Schema.Literal<"tokens">;
|
|
1142
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
1143
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
1144
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
1145
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1146
|
+
}>, Schema.Struct<{
|
|
1147
|
+
readonly type: Schema.Literal<"seconds">;
|
|
1148
|
+
readonly seconds: Schema.Number;
|
|
1149
|
+
}>, Schema.Struct<{
|
|
1150
|
+
readonly type: Schema.Literal<"characters">;
|
|
1151
|
+
readonly characters: Schema.Number;
|
|
1152
|
+
}>, Schema.Struct<{
|
|
1153
|
+
readonly type: Schema.Literal<"credits">;
|
|
1154
|
+
readonly credits: Schema.Number;
|
|
1155
|
+
}>, Schema.Struct<{
|
|
1156
|
+
readonly type: Schema.Literal<"compute">;
|
|
1157
|
+
readonly seconds: Schema.Number;
|
|
1158
|
+
}>]>>;
|
|
1159
|
+
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1160
|
+
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
1161
|
+
readonly message: Schema.String;
|
|
1162
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1163
|
+
}>>>;
|
|
1164
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1165
|
+
readonly type: Schema.tag<"finish">;
|
|
1166
|
+
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "segment" | "text-delta">]: never; }, OrElse extends (value: Exclude<{
|
|
1242
1167
|
readonly type: "generation-queued";
|
|
1243
|
-
readonly position?: number | undefined;
|
|
1244
|
-
}, {
|
|
1245
|
-
readonly type: keyof Cases;
|
|
1246
|
-
}> | Exclude<{
|
|
1247
1168
|
readonly id: string;
|
|
1169
|
+
readonly position?: number | undefined;
|
|
1170
|
+
} | {
|
|
1248
1171
|
readonly type: "generation-progress";
|
|
1172
|
+
readonly id: string;
|
|
1249
1173
|
readonly progress?: number | undefined;
|
|
1250
|
-
}
|
|
1251
|
-
readonly type: keyof Cases;
|
|
1252
|
-
}> | Exclude<{
|
|
1174
|
+
} | {
|
|
1253
1175
|
readonly type: "text-delta";
|
|
1254
1176
|
readonly delta: string;
|
|
1255
|
-
}
|
|
1256
|
-
readonly type: keyof Cases;
|
|
1257
|
-
}> | Exclude<{
|
|
1177
|
+
} | {
|
|
1258
1178
|
readonly type: "segment";
|
|
1259
1179
|
readonly segment: {
|
|
1260
1180
|
readonly text: string;
|
|
@@ -1262,17 +1182,23 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1262
1182
|
readonly endSeconds: number;
|
|
1263
1183
|
readonly speaker?: string | undefined;
|
|
1264
1184
|
};
|
|
1265
|
-
}
|
|
1266
|
-
readonly type: keyof Cases;
|
|
1267
|
-
}> | Exclude<{
|
|
1268
|
-
readonly type: "finish";
|
|
1185
|
+
} | {
|
|
1269
1186
|
readonly text: string;
|
|
1187
|
+
readonly segments?: readonly {
|
|
1188
|
+
readonly text: string;
|
|
1189
|
+
readonly startSeconds: number;
|
|
1190
|
+
readonly endSeconds: number;
|
|
1191
|
+
readonly speaker?: string | undefined;
|
|
1192
|
+
}[] | undefined;
|
|
1193
|
+
readonly words?: readonly {
|
|
1194
|
+
readonly text: string;
|
|
1195
|
+
readonly startSeconds: number;
|
|
1196
|
+
readonly endSeconds: number;
|
|
1197
|
+
readonly speaker?: string | undefined;
|
|
1198
|
+
readonly confidence?: number | undefined;
|
|
1199
|
+
}[] | undefined;
|
|
1200
|
+
readonly language?: string | undefined;
|
|
1270
1201
|
readonly durationSeconds?: number | undefined;
|
|
1271
|
-
readonly providerMetadata?: {
|
|
1272
|
-
readonly [x: string]: {
|
|
1273
|
-
readonly [x: string]: unknown;
|
|
1274
|
-
};
|
|
1275
|
-
} | undefined;
|
|
1276
1202
|
readonly usage?: {
|
|
1277
1203
|
readonly type: "tokens";
|
|
1278
1204
|
readonly input?: number | undefined;
|
|
@@ -1295,7 +1221,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1295
1221
|
readonly seconds: number;
|
|
1296
1222
|
} | undefined;
|
|
1297
1223
|
readonly notices?: readonly {
|
|
1298
|
-
readonly type: "
|
|
1224
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
1299
1225
|
readonly message: string;
|
|
1300
1226
|
readonly providerMetadata?: {
|
|
1301
1227
|
readonly [x: string]: {
|
|
@@ -1303,29 +1229,19 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1303
1229
|
};
|
|
1304
1230
|
} | undefined;
|
|
1305
1231
|
}[] | undefined;
|
|
1306
|
-
readonly
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
readonly words?: readonly {
|
|
1314
|
-
readonly text: string;
|
|
1315
|
-
readonly startSeconds: number;
|
|
1316
|
-
readonly endSeconds: number;
|
|
1317
|
-
readonly speaker?: string | undefined;
|
|
1318
|
-
readonly confidence?: number | undefined;
|
|
1319
|
-
}[] | undefined;
|
|
1320
|
-
}, {
|
|
1321
|
-
readonly type: keyof Cases;
|
|
1322
|
-
}>) => any>(cases: Cases, orElse: OrElse): (value: {
|
|
1323
|
-
readonly id: string;
|
|
1232
|
+
readonly providerMetadata?: {
|
|
1233
|
+
readonly [x: string]: {
|
|
1234
|
+
readonly [x: string]: unknown;
|
|
1235
|
+
};
|
|
1236
|
+
} | undefined;
|
|
1237
|
+
readonly type: "finish";
|
|
1238
|
+
}, { readonly [K in "type"]: keyof Cases; }>) => any>(cases: Cases, orElse: OrElse): (value: {
|
|
1324
1239
|
readonly type: "generation-queued";
|
|
1240
|
+
readonly id: string;
|
|
1325
1241
|
readonly position?: number | undefined;
|
|
1326
1242
|
} | {
|
|
1327
|
-
readonly id: string;
|
|
1328
1243
|
readonly type: "generation-progress";
|
|
1244
|
+
readonly id: string;
|
|
1329
1245
|
readonly progress?: number | undefined;
|
|
1330
1246
|
} | {
|
|
1331
1247
|
readonly type: "text-delta";
|
|
@@ -1339,14 +1255,22 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1339
1255
|
readonly speaker?: string | undefined;
|
|
1340
1256
|
};
|
|
1341
1257
|
} | {
|
|
1342
|
-
readonly type: "finish";
|
|
1343
1258
|
readonly text: string;
|
|
1259
|
+
readonly segments?: readonly {
|
|
1260
|
+
readonly text: string;
|
|
1261
|
+
readonly startSeconds: number;
|
|
1262
|
+
readonly endSeconds: number;
|
|
1263
|
+
readonly speaker?: string | undefined;
|
|
1264
|
+
}[] | undefined;
|
|
1265
|
+
readonly words?: readonly {
|
|
1266
|
+
readonly text: string;
|
|
1267
|
+
readonly startSeconds: number;
|
|
1268
|
+
readonly endSeconds: number;
|
|
1269
|
+
readonly speaker?: string | undefined;
|
|
1270
|
+
readonly confidence?: number | undefined;
|
|
1271
|
+
}[] | undefined;
|
|
1272
|
+
readonly language?: string | undefined;
|
|
1344
1273
|
readonly durationSeconds?: number | undefined;
|
|
1345
|
-
readonly providerMetadata?: {
|
|
1346
|
-
readonly [x: string]: {
|
|
1347
|
-
readonly [x: string]: unknown;
|
|
1348
|
-
};
|
|
1349
|
-
} | undefined;
|
|
1350
1274
|
readonly usage?: {
|
|
1351
1275
|
readonly type: "tokens";
|
|
1352
1276
|
readonly input?: number | undefined;
|
|
@@ -1369,7 +1293,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1369
1293
|
readonly seconds: number;
|
|
1370
1294
|
} | undefined;
|
|
1371
1295
|
readonly notices?: readonly {
|
|
1372
|
-
readonly type: "
|
|
1296
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
1373
1297
|
readonly message: string;
|
|
1374
1298
|
readonly providerMetadata?: {
|
|
1375
1299
|
readonly [x: string]: {
|
|
@@ -1377,32 +1301,24 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1377
1301
|
};
|
|
1378
1302
|
} | undefined;
|
|
1379
1303
|
}[] | undefined;
|
|
1380
|
-
readonly
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
readonly words?: readonly {
|
|
1388
|
-
readonly text: string;
|
|
1389
|
-
readonly startSeconds: number;
|
|
1390
|
-
readonly endSeconds: number;
|
|
1391
|
-
readonly speaker?: string | undefined;
|
|
1392
|
-
readonly confidence?: number | undefined;
|
|
1393
|
-
}[] | undefined;
|
|
1394
|
-
}) => import("effect/Unify").Unify<{ [K_1 in keyof Cases]-?: NonNullable<Cases[K_1]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Cases] | ReturnType<OrElse>>;
|
|
1304
|
+
readonly providerMetadata?: {
|
|
1305
|
+
readonly [x: string]: {
|
|
1306
|
+
readonly [x: string]: unknown;
|
|
1307
|
+
};
|
|
1308
|
+
} | undefined;
|
|
1309
|
+
readonly type: "finish";
|
|
1310
|
+
}) => import("effect/Unify").Unify<{ [K in keyof Cases]-?: NonNullable<Cases[K]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Cases] | ReturnType<OrElse>>;
|
|
1395
1311
|
};
|
|
1396
1312
|
} & {
|
|
1397
1313
|
is: {
|
|
1398
1314
|
generationQueued: (u: unknown) => u is {
|
|
1399
|
-
readonly id: string;
|
|
1400
1315
|
readonly type: "generation-queued";
|
|
1316
|
+
readonly id: string;
|
|
1401
1317
|
readonly position?: number | undefined;
|
|
1402
1318
|
};
|
|
1403
1319
|
generationProgress: (u: unknown) => u is {
|
|
1404
|
-
readonly id: string;
|
|
1405
1320
|
readonly type: "generation-progress";
|
|
1321
|
+
readonly id: string;
|
|
1406
1322
|
readonly progress?: number | undefined;
|
|
1407
1323
|
};
|
|
1408
1324
|
textDelta: (u: unknown) => u is {
|
|
@@ -1419,14 +1335,22 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1419
1335
|
};
|
|
1420
1336
|
};
|
|
1421
1337
|
finish: (u: unknown) => u is {
|
|
1422
|
-
readonly type: "finish";
|
|
1423
1338
|
readonly text: string;
|
|
1339
|
+
readonly segments?: readonly {
|
|
1340
|
+
readonly text: string;
|
|
1341
|
+
readonly startSeconds: number;
|
|
1342
|
+
readonly endSeconds: number;
|
|
1343
|
+
readonly speaker?: string | undefined;
|
|
1344
|
+
}[] | undefined;
|
|
1345
|
+
readonly words?: readonly {
|
|
1346
|
+
readonly text: string;
|
|
1347
|
+
readonly startSeconds: number;
|
|
1348
|
+
readonly endSeconds: number;
|
|
1349
|
+
readonly speaker?: string | undefined;
|
|
1350
|
+
readonly confidence?: number | undefined;
|
|
1351
|
+
}[] | undefined;
|
|
1352
|
+
readonly language?: string | undefined;
|
|
1424
1353
|
readonly durationSeconds?: number | undefined;
|
|
1425
|
-
readonly providerMetadata?: {
|
|
1426
|
-
readonly [x: string]: {
|
|
1427
|
-
readonly [x: string]: unknown;
|
|
1428
|
-
};
|
|
1429
|
-
} | undefined;
|
|
1430
1354
|
readonly usage?: {
|
|
1431
1355
|
readonly type: "tokens";
|
|
1432
1356
|
readonly input?: number | undefined;
|
|
@@ -1449,7 +1373,7 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1449
1373
|
readonly seconds: number;
|
|
1450
1374
|
} | undefined;
|
|
1451
1375
|
readonly notices?: readonly {
|
|
1452
|
-
readonly type: "
|
|
1376
|
+
readonly type: "filtered" | "moderated" | "other";
|
|
1453
1377
|
readonly message: string;
|
|
1454
1378
|
readonly providerMetadata?: {
|
|
1455
1379
|
readonly [x: string]: {
|
|
@@ -1457,20 +1381,12 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1457
1381
|
};
|
|
1458
1382
|
} | undefined;
|
|
1459
1383
|
}[] | undefined;
|
|
1460
|
-
readonly
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
}[] | undefined;
|
|
1467
|
-
readonly words?: readonly {
|
|
1468
|
-
readonly text: string;
|
|
1469
|
-
readonly startSeconds: number;
|
|
1470
|
-
readonly endSeconds: number;
|
|
1471
|
-
readonly speaker?: string | undefined;
|
|
1472
|
-
readonly confidence?: number | undefined;
|
|
1473
|
-
}[] | undefined;
|
|
1384
|
+
readonly providerMetadata?: {
|
|
1385
|
+
readonly [x: string]: {
|
|
1386
|
+
readonly [x: string]: unknown;
|
|
1387
|
+
};
|
|
1388
|
+
} | undefined;
|
|
1389
|
+
readonly type: "finish";
|
|
1474
1390
|
};
|
|
1475
1391
|
};
|
|
1476
1392
|
};
|
|
@@ -1487,6 +1403,6 @@ export declare const Transcription: {
|
|
|
1487
1403
|
readonly generate: typeof generate;
|
|
1488
1404
|
readonly stream: typeof stream;
|
|
1489
1405
|
readonly start: typeof start;
|
|
1490
|
-
readonly resume:
|
|
1406
|
+
readonly resume: typeof resume;
|
|
1491
1407
|
};
|
|
1492
1408
|
export {};
|