@wildix/wilma-voice-client 0.0.26 → 0.0.27

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.
@@ -6,24 +6,24 @@ import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/core/re
6
6
  import type { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
7
7
  import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
8
8
  import type { DescribeVoiceProtocolCommandInput, DescribeVoiceProtocolCommandOutput } from "./commands/DescribeVoiceProtocolCommand";
9
- import type { ListSpeechVoicesCommandInput, ListSpeechVoicesCommandOutput } from "./commands/ListSpeechVoicesCommand";
10
- import type { PreviewSpeechCommandInput, PreviewSpeechCommandOutput } from "./commands/PreviewSpeechCommand";
9
+ import type { ListVoicesCommandInput, ListVoicesCommandOutput } from "./commands/ListVoicesCommand";
11
10
  import type { SendHangupCommandInput, SendHangupCommandOutput } from "./commands/SendHangupCommand";
12
11
  import type { SendPlayCommandInput, SendPlayCommandOutput } from "./commands/SendPlayCommand";
13
12
  import type { SendSayCommandInput, SendSayCommandOutput } from "./commands/SendSayCommand";
14
13
  import type { SendStopCommandInput, SendStopCommandOutput } from "./commands/SendStopCommand";
15
14
  import type { SendTransferCommandInput, SendTransferCommandOutput } from "./commands/SendTransferCommand";
15
+ import type { TextToSpeechCommandInput, TextToSpeechCommandOutput } from "./commands/TextToSpeechCommand";
16
16
  import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
17
17
  import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
18
18
  export { __Client };
19
19
  /**
20
20
  * @public
21
21
  */
22
- export type ServiceInputTypes = DescribeVoiceProtocolCommandInput | ListSpeechVoicesCommandInput | PreviewSpeechCommandInput | SendHangupCommandInput | SendPlayCommandInput | SendSayCommandInput | SendStopCommandInput | SendTransferCommandInput;
22
+ export type ServiceInputTypes = DescribeVoiceProtocolCommandInput | ListVoicesCommandInput | SendHangupCommandInput | SendPlayCommandInput | SendSayCommandInput | SendStopCommandInput | SendTransferCommandInput | TextToSpeechCommandInput;
23
23
  /**
24
24
  * @public
25
25
  */
26
- export type ServiceOutputTypes = DescribeVoiceProtocolCommandOutput | ListSpeechVoicesCommandOutput | PreviewSpeechCommandOutput | SendHangupCommandOutput | SendPlayCommandOutput | SendSayCommandOutput | SendStopCommandOutput | SendTransferCommandOutput;
26
+ export type ServiceOutputTypes = DescribeVoiceProtocolCommandOutput | ListVoicesCommandOutput | SendHangupCommandOutput | SendPlayCommandOutput | SendSayCommandOutput | SendStopCommandOutput | SendTransferCommandOutput | TextToSpeechCommandOutput;
27
27
  /**
28
28
  * @public
29
29
  */
@@ -147,7 +147,7 @@ declare const DescribeVoiceProtocolCommand_base: {
147
147
  * // category: "STRING_VALUE",
148
148
  * // groupId: "STRING_VALUE",
149
149
  * // speech: { // VoiceSpeechPayload
150
- * // vendor: "aws", // required
150
+ * // engine: "STRING_VALUE", // required
151
151
  * // languages: [ // LanguageCodeList // required
152
152
  * // "STRING_VALUE",
153
153
  * // ],
@@ -0,0 +1,87 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ListVoicesInput, ListVoicesOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, WilmaVoiceClientResolvedConfig } from "../WilmaVoiceClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListVoicesCommand}.
14
+ */
15
+ export interface ListVoicesCommandInput extends ListVoicesInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListVoicesCommand}.
21
+ */
22
+ export interface ListVoicesCommandOutput extends ListVoicesOutput, __MetadataBearer {
23
+ }
24
+ declare const ListVoicesCommand_base: {
25
+ new (input: ListVoicesCommandInput): import("@smithy/core/client").CommandImpl<ListVoicesCommandInput, ListVoicesCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: ListVoicesCommandInput): import("@smithy/core/client").CommandImpl<ListVoicesCommandInput, ListVoicesCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Lists the voices a synthesis provider offers, read from the provider's own API and cached per company, provider, credential and language. Answers a URI per voice, so a picker stores what it selected rather than composing one.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WilmaVoiceClient, ListVoicesCommand } from "@wildix/wilma-voice-client"; // ES Modules import
35
+ * // const { WilmaVoiceClient, ListVoicesCommand } = require("@wildix/wilma-voice-client"); // CommonJS import
36
+ * // import type { WilmaVoiceClientConfig } from "@wildix/wilma-voice-client";
37
+ * const config = {}; // type is WilmaVoiceClientConfig
38
+ * const client = new WilmaVoiceClient(config);
39
+ * const input = { // ListVoicesInput
40
+ * provider: "STRING_VALUE", // required
41
+ * language: "STRING_VALUE",
42
+ * search: "STRING_VALUE",
43
+ * credential: "STRING_VALUE",
44
+ * };
45
+ * const command = new ListVoicesCommand(input);
46
+ * const response = await client.send(command);
47
+ * // { // ListVoicesOutput
48
+ * // voices: [ // VoiceList // required
49
+ * // { // Voice
50
+ * // uri: "STRING_VALUE", // required
51
+ * // name: "STRING_VALUE", // required
52
+ * // options: "DOCUMENT_VALUE",
53
+ * // },
54
+ * // ],
55
+ * // };
56
+ *
57
+ * ```
58
+ *
59
+ * @param ListVoicesCommandInput - {@link ListVoicesCommandInput}
60
+ * @returns {@link ListVoicesCommandOutput}
61
+ * @see {@link ListVoicesCommandInput} for command's `input` shape.
62
+ * @see {@link ListVoicesCommandOutput} for command's `response` shape.
63
+ * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
64
+ *
65
+ * @throws {@link ValidationException} (client fault)
66
+ *
67
+ * @throws {@link ForbiddenException} (client fault)
68
+ *
69
+ * @throws {@link WilmaVoiceServiceException}
70
+ * <p>Base exception class for all service exceptions from WilmaVoice service.</p>
71
+ *
72
+ *
73
+ * @public
74
+ */
75
+ export declare class ListVoicesCommand extends ListVoicesCommand_base {
76
+ /** @internal type navigation helper, not in runtime. */
77
+ protected static __types: {
78
+ api: {
79
+ input: ListVoicesInput;
80
+ output: ListVoicesOutput;
81
+ };
82
+ sdk: {
83
+ input: ListVoicesCommandInput;
84
+ output: ListVoicesCommandOutput;
85
+ };
86
+ };
87
+ }
@@ -0,0 +1,103 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import { Uint8ArrayBlobAdapter } from "@smithy/core/serde";
3
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
+ import type { TextToSpeechInput, TextToSpeechOutput } from "../models/models_0";
5
+ import type { ServiceInputTypes, ServiceOutputTypes, WilmaVoiceClientResolvedConfig } from "../WilmaVoiceClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export type { __MetadataBearer };
10
+ export { $Command };
11
+ /**
12
+ * @public
13
+ *
14
+ * The input for {@link TextToSpeechCommand}.
15
+ */
16
+ export interface TextToSpeechCommandInput extends TextToSpeechInput {
17
+ }
18
+ /**
19
+ * @public
20
+ */
21
+ export type TextToSpeechCommandOutputType = Omit<TextToSpeechOutput, "audio"> & {
22
+ audio: Uint8ArrayBlobAdapter;
23
+ };
24
+ /**
25
+ * @public
26
+ *
27
+ * The output of {@link TextToSpeechCommand}.
28
+ */
29
+ export interface TextToSpeechCommandOutput extends TextToSpeechCommandOutputType, __MetadataBearer {
30
+ }
31
+ declare const TextToSpeechCommand_base: {
32
+ new (input: TextToSpeechCommandInput): import("@smithy/core/client").CommandImpl<TextToSpeechCommandInput, TextToSpeechCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
33
+ new (input: TextToSpeechCommandInput): import("@smithy/core/client").CommandImpl<TextToSpeechCommandInput, TextToSpeechCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
34
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
35
+ };
36
+ /**
37
+ * Synthesizes one phrase and returns MP3.
38
+ *
39
+ * NOT NAMED FOR THE PREVIEW IT SERVES. Auditioning an unsaved voice in the console is the first
40
+ * caller, but nothing about the operation is preview-specific — it is the platform's
41
+ * text-to-speech, reachable by anything holding the scope, and a name naming one caller's screen
42
+ * would have to be worked around by the second one.
43
+ *
44
+ * EVERYTHING TRAVELS IN THE REQUEST and the operation reads no stored record — not the agent, and
45
+ * no dictionary behind it. The settings being auditioned are unsaved form state, and the rules
46
+ * that apply are the ones on `pronunciations`, so what is heard here is what the call would say.
47
+ * @example
48
+ * Use a bare-bones client and the command you need to make an API call.
49
+ * ```javascript
50
+ * import { WilmaVoiceClient, TextToSpeechCommand } from "@wildix/wilma-voice-client"; // ES Modules import
51
+ * // const { WilmaVoiceClient, TextToSpeechCommand } = require("@wildix/wilma-voice-client"); // CommonJS import
52
+ * // import type { WilmaVoiceClientConfig } from "@wildix/wilma-voice-client";
53
+ * const config = {}; // type is WilmaVoiceClientConfig
54
+ * const client = new WilmaVoiceClient(config);
55
+ * const input = { // TextToSpeechInput
56
+ * voice: "STRING_VALUE", // required
57
+ * language: "STRING_VALUE", // required
58
+ * text: "STRING_VALUE", // required
59
+ * pronunciations: [ // VoicePronunciationList
60
+ * { // VoicePronunciation
61
+ * phrase: "STRING_VALUE", // required
62
+ * as: "STRING_VALUE", // required
63
+ * encoding: "alias" || "ipa",
64
+ * },
65
+ * ],
66
+ * };
67
+ * const command = new TextToSpeechCommand(input);
68
+ * const response = await client.send(command);
69
+ * // { // TextToSpeechOutput
70
+ * // audio: new Uint8Array(), // required
71
+ * // };
72
+ *
73
+ * ```
74
+ *
75
+ * @param TextToSpeechCommandInput - {@link TextToSpeechCommandInput}
76
+ * @returns {@link TextToSpeechCommandOutput}
77
+ * @see {@link TextToSpeechCommandInput} for command's `input` shape.
78
+ * @see {@link TextToSpeechCommandOutput} for command's `response` shape.
79
+ * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
80
+ *
81
+ * @throws {@link ValidationException} (client fault)
82
+ *
83
+ * @throws {@link ForbiddenException} (client fault)
84
+ *
85
+ * @throws {@link WilmaVoiceServiceException}
86
+ * <p>Base exception class for all service exceptions from WilmaVoice service.</p>
87
+ *
88
+ *
89
+ * @public
90
+ */
91
+ export declare class TextToSpeechCommand extends TextToSpeechCommand_base {
92
+ /** @internal type navigation helper, not in runtime. */
93
+ protected static __types: {
94
+ api: {
95
+ input: TextToSpeechInput;
96
+ output: TextToSpeechOutput;
97
+ };
98
+ sdk: {
99
+ input: TextToSpeechCommandInput;
100
+ output: TextToSpeechCommandOutput;
101
+ };
102
+ };
103
+ }
@@ -1,8 +1,8 @@
1
1
  export * from "./DescribeVoiceProtocolCommand";
2
- export * from "./ListSpeechVoicesCommand";
3
- export * from "./PreviewSpeechCommand";
2
+ export * from "./ListVoicesCommand";
4
3
  export * from "./SendHangupCommand";
5
4
  export * from "./SendPlayCommand";
6
5
  export * from "./SendSayCommand";
7
6
  export * from "./SendStopCommand";
8
7
  export * from "./SendTransferCommand";
8
+ export * from "./TextToSpeechCommand";
@@ -16,30 +16,6 @@ export declare const VoicePronunciationEncoding: {
16
16
  * @public
17
17
  */
18
18
  export type VoicePronunciationEncoding = (typeof VoicePronunciationEncoding)[keyof typeof VoicePronunciationEncoding];
19
- /**
20
- * @public
21
- * @enum
22
- */
23
- export declare const VoiceSpeechProvider: {
24
- readonly AMAZON_POLLY: "amazon_polly";
25
- readonly ELEVENLABS: "elevenlabs";
26
- readonly GOOGLE: "google";
27
- };
28
- /**
29
- * @public
30
- */
31
- export type VoiceSpeechProvider = (typeof VoiceSpeechProvider)[keyof typeof VoiceSpeechProvider];
32
- /**
33
- * @public
34
- * @enum
35
- */
36
- export declare const VoiceTranscriptionVendor: {
37
- readonly AWS: "aws";
38
- };
39
- /**
40
- * @public
41
- */
42
- export type VoiceTranscriptionVendor = (typeof VoiceTranscriptionVendor)[keyof typeof VoiceTranscriptionVendor];
43
19
  /**
44
20
  * @public
45
21
  * @enum
@@ -1,9 +1,10 @@
1
- import type { VoiceAudioEncoding, VoiceCommandType, VoiceControlAction, VoiceEventType, VoiceInputMode, VoicePronunciationEncoding, VoiceSpeechProvider, VoiceTranscriptionVendor } from "./enums";
1
+ import type { DocumentType as __DocumentType } from "@smithy/types";
2
+ import type { VoiceAudioEncoding, VoiceCommandType, VoiceControlAction, VoiceEventType, VoiceInputMode, VoicePronunciationEncoding } from "./enums";
2
3
  /**
3
4
  * A pronunciation rule for one phrase. Belongs to a LANGUAGE, not to the agent: 'Wildix' is
4
- * respelled differently for an Italian and a German voice. A dictionary shared ACROSS languages
5
- * would fight itself, which is why the company dictionary is keyed by language too — see
6
- * PronunciationDictionary.
5
+ * respelled differently for an Italian and a German voice, so one list shared ACROSS languages
6
+ * would fight itself. That is why the rules hang off the language and nowhere else — there is no
7
+ * company-wide dictionary above them to inherit from, or to disagree with.
7
8
  * @public
8
9
  */
9
10
  export interface VoicePronunciation {
@@ -23,57 +24,6 @@ export interface VoicePronunciation {
23
24
  */
24
25
  encoding?: VoicePronunciationEncoding | undefined;
25
26
  }
26
- /**
27
- * Synthesis options, used at two levels: as provider-level defaults on VoiceSpeechSettings and as
28
- * per-language overrides on VoiceLanguage. Absent means inherit; there is no way to express
29
- * 'explicitly the same as the parent', which is the intended simplification — the merged result is
30
- * identical either way. Which members apply is a property of the provider AND the model (Chirp 3:
31
- * HD documents only speakingRate; eleven_v3 carries no stability, similarity or speaker boost), so
32
- * the console renders them from a catalog rather than unconditionally.
33
- * @public
34
- */
35
- export interface VoiceSynthesisOptions {
36
- /**
37
- * Provider model id, e.g. 'eleven_flash_v2_5'.
38
- * @public
39
- */
40
- model?: string | undefined;
41
- /**
42
- * Speaking rate. ElevenLabs 0.7-1.2 (default 1.0); Google 0.25-2.0 (default 1.0).
43
- * @public
44
- */
45
- speed?: number | undefined;
46
- /**
47
- * ElevenLabs stability, 0-1 (default 0.5). Our clamp, not a vendor-stated bound.
48
- * @public
49
- */
50
- stability?: number | undefined;
51
- /**
52
- * ElevenLabs similarity boost, 0-1 (default 0.75). Our clamp.
53
- * @public
54
- */
55
- similarity?: number | undefined;
56
- /**
57
- * ElevenLabs style exaggeration, 0-1 (default 0). Our clamp.
58
- * @public
59
- */
60
- style?: number | undefined;
61
- /**
62
- * ElevenLabs speaker boost (default true).
63
- * @public
64
- */
65
- speakerBoost?: boolean | undefined;
66
- /**
67
- * Google pitch in semitones, -20 to 20. Not offered for Chirp 3: HD voices.
68
- * @public
69
- */
70
- pitch?: number | undefined;
71
- /**
72
- * Google volume gain in dB, -96 to 16 (default 0); the vendor recommends staying under +10. Not offered for Chirp 3: HD voices.
73
- * @public
74
- */
75
- volumeGain?: number | undefined;
76
- }
77
27
  /**
78
28
  * A chunk of raw caller audio, base64-encoded in the session's negotiated input format
79
29
  * (inputAudio from the connect handshake). Used by web/app clients in AUDIO input mode; the
@@ -485,7 +435,7 @@ export interface SayCommandData {
485
435
  */
486
436
  interruptible?: boolean | undefined;
487
437
  /**
488
- * Polly voice the PBX should synthesize with. Set only for provider AMAZON_POLLY, whose synthesis runs on the PBX; ElevenLabs and Google stream PCM through `play` instead and leave this absent.
438
+ * Voice URI the PBX should synthesize with. Set only for a provider whose synthesis runs ON THE PBX (`amazon_polly://`); ElevenLabs and Google are synthesized in the cloud and streamed as PCM through `play` instead, and leave this absent.
489
439
  * @public
490
440
  */
491
441
  voice?: string | undefined;
@@ -544,23 +494,23 @@ export interface SessionEndedWebsocketEvent {
544
494
  }
545
495
  /**
546
496
  * Recognition intent for the call, sent on `started` at protocolVersion >= 2. NOT recogniser
547
- * parameters: the PBX translates it into its vendor's API. Against Amazon Transcribe with
497
+ * parameters: the PBX translates it into its provider's API. Against Amazon Transcribe with
548
498
  * autoDetect true that is identify-multiple-languages plus language-options and
549
499
  * preferred-language; with autoDetect false, a single-language stream on preferredLanguage.
550
500
  *
551
- * Both members the server can get wrong are resolved here rather than forwarded: `vendor` is
501
+ * Both members the server can get wrong are RESOLVED here rather than forwarded: `engine` is
552
502
  * always concrete (an absent one would let the PBX apply a different default than the console
553
503
  * built its language list for), and `autoDetect` is clamped to false whenever the language count
554
- * is below the vendor's minimum or the vendor cannot identify languages at all (forwarding true
555
- * with one candidate makes Amazon reject the stream outright — a dead call).
504
+ * is below the recogniser's minimum or the recogniser cannot identify languages at all
505
+ * (forwarding true with one candidate makes Amazon reject the stream outright — a dead call).
556
506
  * @public
557
507
  */
558
508
  export interface VoiceSpeechPayload {
559
509
  /**
560
- * Concrete transcription vendor; never absent.
510
+ * Concrete recogniser URI, resolved from the agent or from the platform default; never absent. See TranscriptionUri.
561
511
  * @public
562
512
  */
563
- vendor: VoiceTranscriptionVendor;
513
+ engine: string;
564
514
  /**
565
515
  * Every configured language, as candidates for identification.
566
516
  * @public
@@ -572,7 +522,7 @@ export interface VoiceSpeechPayload {
572
522
  */
573
523
  preferredLanguage: string;
574
524
  /**
575
- * Whether to identify the spoken language per utterance. Already clamped by the server.
525
+ * Whether to identify the spoken language per utterance. Already clamped by the server — see the shape's documentation.
576
526
  * @public
577
527
  */
578
528
  autoDetect: boolean;
@@ -637,6 +587,10 @@ export interface SessionStartedEvent {
637
587
  /**
638
588
  * Music-on-hold class the PBX should play under the call as ambient background.
639
589
  *
590
+ * A BARE NAME, not the configuration object `VoiceBackgroundSoundSettings`: this is the RESOLVED
591
+ * outcome. The server has already applied `enabled` and the class default, so the PBX gets a name
592
+ * to play or nothing at all and needs no resolution rule of its own.
593
+ *
640
594
  * TOP LEVEL, NOT INSIDE `speech`, because it is not recognition intent and must not inherit
641
595
  * `speech`'s conditions: a call with no configured languages carries no `speech` payload and can
642
596
  * still have background audio.
@@ -846,12 +800,12 @@ export interface DescribeVoiceProtocolOutput {
846
800
  /**
847
801
  * @public
848
802
  */
849
- export interface ListSpeechVoicesInput {
803
+ export interface ListVoicesInput {
850
804
  /**
851
- * Text-to-speech provider used to synthesize the agent's replies.
805
+ * Provider whose catalog to read: 'elevenlabs', 'google', 'amazon_polly'. This is the scheme of the URIs answered on `voices`.
852
806
  * @public
853
807
  */
854
- provider: VoiceSpeechProvider;
808
+ provider: string;
855
809
  /**
856
810
  * Server-side filter for language-bound providers: only voices whose language SET CONTAINS this code. Ignored for ElevenLabs, whose voices are not language bound.
857
811
  * @public
@@ -859,124 +813,55 @@ export interface ListSpeechVoicesInput {
859
813
  language?: string | undefined;
860
814
  search?: string | undefined;
861
815
  /**
862
- * Id of the company's own provider credential, so the picker lists that account's voices including cloned ones. Resolved under the CALLER's company; an id that does not resolve there is rejected. Absent means the platform key.
816
+ * The company's own provider credential to read the catalog with, so the picker lists that
817
+ * account's voices including cloned ones. Absent means the platform key.
818
+ *
819
+ * EITHER A REFERENCE OR THE KEY ITSELF: `secrets:\{secretId\}` for a stored credential, resolved
820
+ * under the CALLER's company — an id that does not resolve there is rejected — or the provider
821
+ * key, for an account being configured whose key is not stored yet, which is the case this
822
+ * operation has to serve before there is anything to reference.
823
+ *
824
+ * A STORED VOICE URI is not the same latitude: its `apiKey` carries a reference, and a literal
825
+ * key in one is the legacy dialplan form that nothing new writes.
826
+ *
827
+ * A PLAIN KEY HERE IS IN A URL. `@sensitive` keeps it out of the generated clients' and servers'
828
+ * log filters, but it cannot keep it out of an access log, a proxy or a browser history, and the
829
+ * service must not put it in a cache identity. Send a reference wherever one exists.
863
830
  * @public
864
831
  */
865
832
  credential?: string | undefined;
866
833
  }
867
834
  /**
868
- * One voice offered by a synthesis provider.
869
- * @public
870
- */
871
- export interface SpeechVoice {
872
- /**
873
- * ElevenLabs voice_id, Google name, or Polly Id.
874
- * @public
875
- */
876
- id: string;
877
- name: string;
878
- /**
879
- * ElevenLabs verified_languages, Google languageCodes, or Polly LanguageCode plus AdditionalLanguageCodes. For an unbound provider this is metadata, not a constraint.
880
- * @public
881
- */
882
- languages?: string[] | undefined;
883
- gender?: string | undefined;
884
- accent?: string | undefined;
885
- /**
886
- * ElevenLabs category, Google tier, or the Polly engines the voice supports.
887
- * @public
888
- */
889
- category?: string | undefined;
890
- /**
891
- * Playable sample published by the provider. ElevenLabs only; the others publish none.
892
- * @public
893
- */
894
- previewUrl?: string | undefined;
895
- /**
896
- * ElevenLabs high_quality_base_model_ids — which models support this voice.
897
- * @public
898
- */
899
- models?: string[] | undefined;
900
- }
901
- /**
902
- * @public
903
- */
904
- export interface ListSpeechVoicesOutput {
905
- voices: SpeechVoice[];
906
- /**
907
- * The provider's FULL language set, independent of the `language` filter — this is what a form intersects with the transcription vendor's set to populate its language select. Empty when voices are not language bound, which means 'imposes no restriction'.
908
- * @public
909
- */
910
- languages?: string[] | undefined;
911
- /**
912
- * When this catalog was last read from the provider. `IsoTimestamp` rather than a bare `Timestamp`: restJson1 serialises the latter as epoch-seconds, which would make this the only Wilma operation answering with a numeric timestamp.
913
- * @public
914
- */
915
- refreshedAt: string;
916
- /**
917
- * True when the provider failed and an expired cache entry was served.
918
- * @public
919
- */
920
- stale?: boolean | undefined;
921
- }
922
- /**
835
+ * One voice a provider offers: the URI to store it by, a name to show, and the provider's own
836
+ * metadata.
837
+ *
838
+ * `uri` IS THE RESULT. It is exactly what goes into `VoiceLanguage.voice`, so a form stores what
839
+ * it was given instead of assembling a string out of a provider name and an id — the one place a
840
+ * client could get the convention wrong.
923
841
  * @public
924
842
  */
925
- export interface PreviewSpeechInput {
926
- /**
927
- * Text-to-speech provider used to synthesize the agent's replies.
928
- * @public
929
- */
930
- provider: VoiceSpeechProvider;
931
- voice: string;
932
- /**
933
- * BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
934
- * constrained string rather than an enum: the offerable set is a property of the selected
935
- * transcription vendor and changes with it, so an enumeration here would cap the set at whatever
936
- * was known when the model was released.
937
- * @public
938
- */
939
- language: string;
843
+ export interface Voice {
940
844
  /**
941
- * Text to speak, BEFORE pronunciation rules are applied.
845
+ * Voice URI, ready to store as `VoiceLanguage.voice` or send to TextToSpeech. Carries no parameters — the caller appends the synthesis parameters and, where applicable, the `apiKey=secrets:\{secretId\}` reference it wants.
942
846
  * @public
943
847
  */
944
- text: string;
848
+ uri: string;
945
849
  /**
946
- * Provider-level defaults. Merged SERVER-SIDE with the overrides below, by the same helper the call path uses — never pre-merged by the caller, or the form reimplements a rule the server owns and the preview can silently diverge from the call.
850
+ * Display name as the provider publishes it, e.g. 'Rachel'. A member rather than part of `options` because it is the one thing every provider has and every picker shows.
947
851
  * @public
948
852
  */
949
- synthesis?: VoiceSynthesisOptions | undefined;
950
- /**
951
- * The selected language's overrides of the above.
952
- * @public
953
- */
954
- languageSynthesis?: VoiceSynthesisOptions | undefined;
955
- /**
956
- * The agent's OWN rules for this language, unmerged. The company dictionary for `language` is applied server-side, for the reason given on `synthesis`.
957
- * @public
958
- */
959
- pronunciations?: VoicePronunciation[] | undefined;
960
- /**
961
- * Company-dictionary phrases this language declines. Applied SERVER-SIDE with the rules above, by the same helper the call path uses.
962
- * @public
963
- */
964
- suppressions?: string[] | undefined;
853
+ name: string;
965
854
  /**
966
- * Credential id, resolved under the CALLER's company. Absent means the platform key.
855
+ * The provider's own metadata for this voice, for rendering and filtering only. See VoiceOptions.
967
856
  * @public
968
857
  */
969
- credential?: string | undefined;
858
+ options?: __DocumentType | undefined;
970
859
  }
971
860
  /**
972
861
  * @public
973
862
  */
974
- export interface PreviewSpeechOutput {
975
- /**
976
- * audio/mpeg. The call path streams raw PCM to the PBX; the preview returns MP3 so a browser <audio> element plays it with no client-side decoding.
977
- * @public
978
- */
979
- audio: Uint8Array;
863
+ export interface ListVoicesOutput {
864
+ voices: Voice[];
980
865
  }
981
866
  /**
982
867
  * Terminate the session and hang up the call.
@@ -1039,7 +924,7 @@ export interface SendSayInput {
1039
924
  */
1040
925
  interruptible?: boolean | undefined;
1041
926
  /**
1042
- * Polly voice the PBX should synthesize with. Set only for provider AMAZON_POLLY, whose synthesis runs on the PBX; ElevenLabs and Google stream PCM through `play` instead and leave this absent.
927
+ * Voice URI the PBX should synthesize with. Set only for a provider whose synthesis runs ON THE PBX (`amazon_polly://`); ElevenLabs and Google are synthesized in the cloud and streamed as PCM through `play` instead, and leave this absent.
1043
928
  * @public
1044
929
  */
1045
930
  voice?: string | undefined;
@@ -1092,3 +977,38 @@ export interface SendTransferInput {
1092
977
  */
1093
978
  export interface SendTransferOutput {
1094
979
  }
980
+ /**
981
+ * @public
982
+ */
983
+ export interface TextToSpeechInput {
984
+ /**
985
+ * Voice to speak with, as the URI a call would use — provider, voice id, synthesis parameters and, for a company's own account, `apiKey=secrets:\{secretId\}`. Passing the call's own value is what keeps an audition from diverging from the call it is auditioning.
986
+ * @public
987
+ */
988
+ voice: string;
989
+ /**
990
+ * Language the phrase is in. Reaches the provider as the synthesis language, and is the language `pronunciations` was written for.
991
+ * @public
992
+ */
993
+ language: string;
994
+ /**
995
+ * Text to speak, BEFORE pronunciation rules are applied.
996
+ * @public
997
+ */
998
+ text: string;
999
+ /**
1000
+ * Rules to apply to `text`, applied SERVER-SIDE by the same helper the call path uses — never pre-applied by the caller, or the form reimplements a rule the server owns and can silently diverge from the call. Pass the language's own list to hear exactly what a call would say.
1001
+ * @public
1002
+ */
1003
+ pronunciations?: VoicePronunciation[] | undefined;
1004
+ }
1005
+ /**
1006
+ * @public
1007
+ */
1008
+ export interface TextToSpeechOutput {
1009
+ /**
1010
+ * audio/mpeg. The call path streams raw PCM to the PBX; this returns MP3 so a browser <audio> element plays it with no client-side decoding.
1011
+ * @public
1012
+ */
1013
+ audio: Uint8Array;
1014
+ }