evo360-types 1.3.748 → 1.3.750
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.
|
@@ -1615,23 +1615,69 @@ export declare const zHubiaRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1615
1615
|
* para o provedor poder mudar sem novo contrato. */
|
|
1616
1616
|
export declare const HUBIA_VOICE_REPLY_OPENAI_VOICES: readonly ["alloy", "ash", "ballad", "coral", "echo", "fable", "nova", "onyx", "sage", "shimmer", "verse", "marin", "cedar"];
|
|
1617
1617
|
export declare const HUBIA_VOICE_REPLY_DEFAULT_VOICE = "coral";
|
|
1618
|
+
/** feat-303 F1.1: provedores de TTS. Ausente no binding = `openai`. */
|
|
1619
|
+
export declare const HUBIA_VOICE_REPLY_PROVIDERS: readonly ["openai", "elevenlabs"];
|
|
1620
|
+
export declare const zHubiaVoiceProviderSchema: z.ZodEnum<["openai", "elevenlabs"]>;
|
|
1621
|
+
export type HubiaVoiceProvider = z.infer<typeof zHubiaVoiceProviderSchema>;
|
|
1622
|
+
/** Modelo usado quando o binding não define `model`. */
|
|
1623
|
+
export declare const HUBIA_VOICE_REPLY_DEFAULT_MODEL: Record<HubiaVoiceProvider, string>;
|
|
1624
|
+
/** Modelos da ElevenLabs oferecidos na UI (o schema aceita qualquer string). */
|
|
1625
|
+
export declare const HUBIA_VOICE_REPLY_ELEVENLABS_MODELS: readonly ["eleven_v4", "eleven_v3", "eleven_multilingual_v2", "eleven_flash_v2_5"];
|
|
1626
|
+
/** Faixa de `speed` aceita pela ElevenLabs; o runtime limita a ela. */
|
|
1627
|
+
export declare const HUBIA_VOICE_REPLY_ELEVENLABS_SPEED: {
|
|
1628
|
+
readonly min: 0.7;
|
|
1629
|
+
readonly max: 1.2;
|
|
1630
|
+
};
|
|
1618
1631
|
/** Liga a resposta em áudio no binding. QUANDO usar áudio é regra do prompt do
|
|
1619
1632
|
* binding (o LLM decide por turno), não deste objeto. */
|
|
1620
1633
|
export declare const zHubiaVoiceReplySchema: z.ZodObject<{
|
|
1621
1634
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1635
|
+
/** Ausente = `openai` (bindings gravados antes da F1.1). */
|
|
1636
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1637
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
1638
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1639
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
1622
1640
|
voice: z.ZodDefault<z.ZodString>;
|
|
1623
|
-
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
1641
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
1624
1642
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1625
|
-
/** 1.0 = normal. */
|
|
1643
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
1626
1644
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
1645
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
1646
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
1647
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
1648
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
1649
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
1650
|
+
}, "strip", z.ZodTypeAny, {
|
|
1651
|
+
stability?: number | undefined;
|
|
1652
|
+
similarity_boost?: number | undefined;
|
|
1653
|
+
style?: number | undefined;
|
|
1654
|
+
}, {
|
|
1655
|
+
stability?: number | undefined;
|
|
1656
|
+
similarity_boost?: number | undefined;
|
|
1657
|
+
style?: number | undefined;
|
|
1658
|
+
}>>;
|
|
1627
1659
|
}, "strip", z.ZodTypeAny, {
|
|
1628
1660
|
enabled: boolean;
|
|
1629
1661
|
voice: string;
|
|
1662
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
1663
|
+
model?: string | undefined;
|
|
1664
|
+
elevenlabs?: {
|
|
1665
|
+
stability?: number | undefined;
|
|
1666
|
+
similarity_boost?: number | undefined;
|
|
1667
|
+
style?: number | undefined;
|
|
1668
|
+
} | undefined;
|
|
1630
1669
|
instructions?: string | undefined;
|
|
1631
1670
|
speed?: number | undefined;
|
|
1632
1671
|
}, {
|
|
1633
1672
|
enabled?: boolean | undefined;
|
|
1673
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
1674
|
+
model?: string | undefined;
|
|
1634
1675
|
voice?: string | undefined;
|
|
1676
|
+
elevenlabs?: {
|
|
1677
|
+
stability?: number | undefined;
|
|
1678
|
+
similarity_boost?: number | undefined;
|
|
1679
|
+
style?: number | undefined;
|
|
1680
|
+
} | undefined;
|
|
1635
1681
|
instructions?: string | undefined;
|
|
1636
1682
|
speed?: number | undefined;
|
|
1637
1683
|
}>;
|
|
@@ -1706,6 +1752,8 @@ export declare const zHubiaSuggestionOutcomeSchema: z.ZodObject<{
|
|
|
1706
1752
|
export type IHubiaSuggestionOutcome = z.infer<typeof zHubiaSuggestionOutcomeSchema>;
|
|
1707
1753
|
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
1708
1754
|
export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
1755
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
1756
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1709
1757
|
model: z.ZodString;
|
|
1710
1758
|
voice: z.ZodString;
|
|
1711
1759
|
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
@@ -1713,6 +1761,8 @@ export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
|
1713
1761
|
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1714
1762
|
execution_id: z.ZodOptional<z.ZodString>;
|
|
1715
1763
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1764
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
1765
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1716
1766
|
model: z.ZodString;
|
|
1717
1767
|
voice: z.ZodString;
|
|
1718
1768
|
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
@@ -1720,6 +1770,8 @@ export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
|
1720
1770
|
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1721
1771
|
execution_id: z.ZodOptional<z.ZodString>;
|
|
1722
1772
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1773
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
1774
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1723
1775
|
model: z.ZodString;
|
|
1724
1776
|
voice: z.ZodString;
|
|
1725
1777
|
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
@@ -2498,19 +2550,52 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
2498
2550
|
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
2499
2551
|
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
2500
2552
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2553
|
+
/** Ausente = `openai` (bindings gravados antes da F1.1). */
|
|
2554
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
2555
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
2556
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2557
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
2501
2558
|
voice: z.ZodDefault<z.ZodString>;
|
|
2502
|
-
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
2559
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
2503
2560
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2504
|
-
/** 1.0 = normal. */
|
|
2561
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
2505
2562
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
2563
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
2564
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
2565
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
2566
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
2567
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
2568
|
+
}, "strip", z.ZodTypeAny, {
|
|
2569
|
+
stability?: number | undefined;
|
|
2570
|
+
similarity_boost?: number | undefined;
|
|
2571
|
+
style?: number | undefined;
|
|
2572
|
+
}, {
|
|
2573
|
+
stability?: number | undefined;
|
|
2574
|
+
similarity_boost?: number | undefined;
|
|
2575
|
+
style?: number | undefined;
|
|
2576
|
+
}>>;
|
|
2506
2577
|
}, "strip", z.ZodTypeAny, {
|
|
2507
2578
|
enabled: boolean;
|
|
2508
2579
|
voice: string;
|
|
2580
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
2581
|
+
model?: string | undefined;
|
|
2582
|
+
elevenlabs?: {
|
|
2583
|
+
stability?: number | undefined;
|
|
2584
|
+
similarity_boost?: number | undefined;
|
|
2585
|
+
style?: number | undefined;
|
|
2586
|
+
} | undefined;
|
|
2509
2587
|
instructions?: string | undefined;
|
|
2510
2588
|
speed?: number | undefined;
|
|
2511
2589
|
}, {
|
|
2512
2590
|
enabled?: boolean | undefined;
|
|
2591
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
2592
|
+
model?: string | undefined;
|
|
2513
2593
|
voice?: string | undefined;
|
|
2594
|
+
elevenlabs?: {
|
|
2595
|
+
stability?: number | undefined;
|
|
2596
|
+
similarity_boost?: number | undefined;
|
|
2597
|
+
style?: number | undefined;
|
|
2598
|
+
} | undefined;
|
|
2514
2599
|
instructions?: string | undefined;
|
|
2515
2600
|
speed?: number | undefined;
|
|
2516
2601
|
}>>;
|
|
@@ -3284,19 +3369,52 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
3284
3369
|
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
3285
3370
|
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
3286
3371
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3372
|
+
/** Ausente = `openai` (bindings gravados antes da F1.1). */
|
|
3373
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
3374
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
3375
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3376
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
3287
3377
|
voice: z.ZodDefault<z.ZodString>;
|
|
3288
|
-
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
3378
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
3289
3379
|
instructions: z.ZodOptional<z.ZodString>;
|
|
3290
|
-
/** 1.0 = normal. */
|
|
3380
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
3291
3381
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
3382
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
3383
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
3384
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
3385
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
3386
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
3387
|
+
}, "strip", z.ZodTypeAny, {
|
|
3388
|
+
stability?: number | undefined;
|
|
3389
|
+
similarity_boost?: number | undefined;
|
|
3390
|
+
style?: number | undefined;
|
|
3391
|
+
}, {
|
|
3392
|
+
stability?: number | undefined;
|
|
3393
|
+
similarity_boost?: number | undefined;
|
|
3394
|
+
style?: number | undefined;
|
|
3395
|
+
}>>;
|
|
3292
3396
|
}, "strip", z.ZodTypeAny, {
|
|
3293
3397
|
enabled: boolean;
|
|
3294
3398
|
voice: string;
|
|
3399
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
3400
|
+
model?: string | undefined;
|
|
3401
|
+
elevenlabs?: {
|
|
3402
|
+
stability?: number | undefined;
|
|
3403
|
+
similarity_boost?: number | undefined;
|
|
3404
|
+
style?: number | undefined;
|
|
3405
|
+
} | undefined;
|
|
3295
3406
|
instructions?: string | undefined;
|
|
3296
3407
|
speed?: number | undefined;
|
|
3297
3408
|
}, {
|
|
3298
3409
|
enabled?: boolean | undefined;
|
|
3410
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
3411
|
+
model?: string | undefined;
|
|
3299
3412
|
voice?: string | undefined;
|
|
3413
|
+
elevenlabs?: {
|
|
3414
|
+
stability?: number | undefined;
|
|
3415
|
+
similarity_boost?: number | undefined;
|
|
3416
|
+
style?: number | undefined;
|
|
3417
|
+
} | undefined;
|
|
3300
3418
|
instructions?: string | undefined;
|
|
3301
3419
|
speed?: number | undefined;
|
|
3302
3420
|
}>>;
|
|
@@ -4070,19 +4188,52 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
4070
4188
|
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
4071
4189
|
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
4072
4190
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4191
|
+
/** Ausente = `openai` (bindings gravados antes da F1.1). */
|
|
4192
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
4193
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
4194
|
+
model: z.ZodOptional<z.ZodString>;
|
|
4195
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
4073
4196
|
voice: z.ZodDefault<z.ZodString>;
|
|
4074
|
-
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
4197
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
4075
4198
|
instructions: z.ZodOptional<z.ZodString>;
|
|
4076
|
-
/** 1.0 = normal. */
|
|
4199
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
4077
4200
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
4201
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
4202
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
4203
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
4204
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
4205
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
4206
|
+
}, "strip", z.ZodTypeAny, {
|
|
4207
|
+
stability?: number | undefined;
|
|
4208
|
+
similarity_boost?: number | undefined;
|
|
4209
|
+
style?: number | undefined;
|
|
4210
|
+
}, {
|
|
4211
|
+
stability?: number | undefined;
|
|
4212
|
+
similarity_boost?: number | undefined;
|
|
4213
|
+
style?: number | undefined;
|
|
4214
|
+
}>>;
|
|
4078
4215
|
}, "strip", z.ZodTypeAny, {
|
|
4079
4216
|
enabled: boolean;
|
|
4080
4217
|
voice: string;
|
|
4218
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
4219
|
+
model?: string | undefined;
|
|
4220
|
+
elevenlabs?: {
|
|
4221
|
+
stability?: number | undefined;
|
|
4222
|
+
similarity_boost?: number | undefined;
|
|
4223
|
+
style?: number | undefined;
|
|
4224
|
+
} | undefined;
|
|
4081
4225
|
instructions?: string | undefined;
|
|
4082
4226
|
speed?: number | undefined;
|
|
4083
4227
|
}, {
|
|
4084
4228
|
enabled?: boolean | undefined;
|
|
4229
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
4230
|
+
model?: string | undefined;
|
|
4085
4231
|
voice?: string | undefined;
|
|
4232
|
+
elevenlabs?: {
|
|
4233
|
+
stability?: number | undefined;
|
|
4234
|
+
similarity_boost?: number | undefined;
|
|
4235
|
+
style?: number | undefined;
|
|
4236
|
+
} | undefined;
|
|
4086
4237
|
instructions?: string | undefined;
|
|
4087
4238
|
speed?: number | undefined;
|
|
4088
4239
|
}>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zHubiaTicketClosedEventSchema = exports.zHubiaTicketClosedCloseSchema = exports.zAiBindingSchema = exports.zHubiaTtsMessageMetaSchema = exports.zHubiaSuggestionOutcomeSchema = exports.zHubiaSuggestionMessageRefSchema = exports.zHubiaPendingSuggestionSchema = exports.zHubiaResponseModeSchema = exports.zHubiaVoiceReplySchema = exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE = exports.HUBIA_VOICE_REPLY_OPENAI_VOICES = exports.zHubiaRuleSchema = exports.zHubiaRulesModeSchema = exports.zSendQuickReplyActionInputSchema = exports.zCreateTaskActionInputSchema = exports.zHubiaRuleActionSchema = exports.zHubiaRuleScopeSchema = exports.zHubiaConditionGroupSchema = exports.zHubiaConditionSchema = exports.zHubiaScheduleSchema = exports.zHubiaScheduleWindowSchema = exports.zHubiaConditionOpSchema = exports.zHubiaOutboundSourceSchema = exports.zHubiaRuleAppliesToSchema = exports.zHubiaRuleOutcomeSchema = exports.zHubiaRuleTriggerSchema = exports.zHubiaRulePhaseSchema = exports.zHubiaConversationModeSchema = exports.zHubiaConversationMessageSchema = exports.zHubiaV1ChannelConfigSchema = exports.zHubiaAttendanceModeSchema = void 0;
|
|
3
|
+
exports.zHubiaTicketClosedEventSchema = exports.zHubiaTicketClosedCloseSchema = exports.zAiBindingSchema = exports.zHubiaTtsMessageMetaSchema = exports.zHubiaSuggestionOutcomeSchema = exports.zHubiaSuggestionMessageRefSchema = exports.zHubiaPendingSuggestionSchema = exports.zHubiaResponseModeSchema = exports.zHubiaVoiceReplySchema = exports.HUBIA_VOICE_REPLY_ELEVENLABS_SPEED = exports.HUBIA_VOICE_REPLY_ELEVENLABS_MODELS = exports.HUBIA_VOICE_REPLY_DEFAULT_MODEL = exports.zHubiaVoiceProviderSchema = exports.HUBIA_VOICE_REPLY_PROVIDERS = exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE = exports.HUBIA_VOICE_REPLY_OPENAI_VOICES = exports.zHubiaRuleSchema = exports.zHubiaRulesModeSchema = exports.zSendQuickReplyActionInputSchema = exports.zCreateTaskActionInputSchema = exports.zHubiaRuleActionSchema = exports.zHubiaRuleScopeSchema = exports.zHubiaConditionGroupSchema = exports.zHubiaConditionSchema = exports.zHubiaScheduleSchema = exports.zHubiaScheduleWindowSchema = exports.zHubiaConditionOpSchema = exports.zHubiaOutboundSourceSchema = exports.zHubiaRuleAppliesToSchema = exports.zHubiaRuleOutcomeSchema = exports.zHubiaRuleTriggerSchema = exports.zHubiaRulePhaseSchema = exports.zHubiaConversationModeSchema = exports.zHubiaConversationMessageSchema = exports.zHubiaV1ChannelConfigSchema = exports.zHubiaAttendanceModeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
6
|
const zod_schemas_2 = require("../../evo-csq/zod-schemas");
|
|
@@ -358,15 +358,40 @@ exports.HUBIA_VOICE_REPLY_OPENAI_VOICES = [
|
|
|
358
358
|
'onyx', 'sage', 'shimmer', 'verse', 'marin', 'cedar',
|
|
359
359
|
];
|
|
360
360
|
exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE = 'coral';
|
|
361
|
+
/** feat-303 F1.1: provedores de TTS. Ausente no binding = `openai`. */
|
|
362
|
+
exports.HUBIA_VOICE_REPLY_PROVIDERS = ['openai', 'elevenlabs'];
|
|
363
|
+
exports.zHubiaVoiceProviderSchema = zod_1.z.enum(exports.HUBIA_VOICE_REPLY_PROVIDERS);
|
|
364
|
+
/** Modelo usado quando o binding não define `model`. */
|
|
365
|
+
exports.HUBIA_VOICE_REPLY_DEFAULT_MODEL = {
|
|
366
|
+
openai: 'gpt-4o-mini-tts',
|
|
367
|
+
elevenlabs: 'eleven_v4',
|
|
368
|
+
};
|
|
369
|
+
/** Modelos da ElevenLabs oferecidos na UI (o schema aceita qualquer string). */
|
|
370
|
+
exports.HUBIA_VOICE_REPLY_ELEVENLABS_MODELS = [
|
|
371
|
+
'eleven_v4', 'eleven_v3', 'eleven_multilingual_v2', 'eleven_flash_v2_5',
|
|
372
|
+
];
|
|
373
|
+
/** Faixa de `speed` aceita pela ElevenLabs; o runtime limita a ela. */
|
|
374
|
+
exports.HUBIA_VOICE_REPLY_ELEVENLABS_SPEED = { min: 0.7, max: 1.2 };
|
|
361
375
|
/** Liga a resposta em áudio no binding. QUANDO usar áudio é regra do prompt do
|
|
362
376
|
* binding (o LLM decide por turno), não deste objeto. */
|
|
363
377
|
exports.zHubiaVoiceReplySchema = zod_1.z.object({
|
|
364
378
|
enabled: zod_1.z.boolean().default(false),
|
|
379
|
+
/** Ausente = `openai` (bindings gravados antes da F1.1). */
|
|
380
|
+
provider: exports.zHubiaVoiceProviderSchema.optional(),
|
|
381
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
382
|
+
model: zod_1.z.string().min(1).max(60).optional(),
|
|
383
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
365
384
|
voice: zod_1.z.string().min(1).max(40).default(exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE),
|
|
366
|
-
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
385
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
367
386
|
instructions: zod_1.z.string().max(1000).optional(),
|
|
368
|
-
/** 1.0 = normal. */
|
|
387
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
369
388
|
speed: zod_1.z.number().min(0.75).max(1.5).optional(),
|
|
389
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
390
|
+
elevenlabs: zod_1.z.object({
|
|
391
|
+
stability: zod_1.z.number().min(0).max(1).optional(),
|
|
392
|
+
similarity_boost: zod_1.z.number().min(0).max(1).optional(),
|
|
393
|
+
style: zod_1.z.number().min(0).max(1).optional(),
|
|
394
|
+
}).optional(),
|
|
370
395
|
});
|
|
371
396
|
exports.zHubiaResponseModeSchema = zod_1.z.enum(['text', 'audio']);
|
|
372
397
|
/** `conversations/{id}.pending_suggestion` (modo hybrid_assist). */
|
|
@@ -396,6 +421,8 @@ exports.zHubiaSuggestionOutcomeSchema = zod_1.z.object({
|
|
|
396
421
|
}).passthrough();
|
|
397
422
|
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
398
423
|
exports.zHubiaTtsMessageMetaSchema = zod_1.z.object({
|
|
424
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
425
|
+
provider: exports.zHubiaVoiceProviderSchema.optional(),
|
|
399
426
|
model: zod_1.z.string(),
|
|
400
427
|
voice: zod_1.z.string(),
|
|
401
428
|
format: zod_1.z.enum(['ogg', 'mp3']),
|
|
@@ -408,15 +408,45 @@ export const HUBIA_VOICE_REPLY_OPENAI_VOICES = [
|
|
|
408
408
|
|
|
409
409
|
export const HUBIA_VOICE_REPLY_DEFAULT_VOICE = 'coral';
|
|
410
410
|
|
|
411
|
+
/** feat-303 F1.1: provedores de TTS. Ausente no binding = `openai`. */
|
|
412
|
+
export const HUBIA_VOICE_REPLY_PROVIDERS = ['openai', 'elevenlabs'] as const;
|
|
413
|
+
export const zHubiaVoiceProviderSchema = z.enum(HUBIA_VOICE_REPLY_PROVIDERS);
|
|
414
|
+
export type HubiaVoiceProvider = z.infer<typeof zHubiaVoiceProviderSchema>;
|
|
415
|
+
|
|
416
|
+
/** Modelo usado quando o binding não define `model`. */
|
|
417
|
+
export const HUBIA_VOICE_REPLY_DEFAULT_MODEL: Record<HubiaVoiceProvider, string> = {
|
|
418
|
+
openai: 'gpt-4o-mini-tts',
|
|
419
|
+
elevenlabs: 'eleven_v4',
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
/** Modelos da ElevenLabs oferecidos na UI (o schema aceita qualquer string). */
|
|
423
|
+
export const HUBIA_VOICE_REPLY_ELEVENLABS_MODELS = [
|
|
424
|
+
'eleven_v4', 'eleven_v3', 'eleven_multilingual_v2', 'eleven_flash_v2_5',
|
|
425
|
+
] as const;
|
|
426
|
+
|
|
427
|
+
/** Faixa de `speed` aceita pela ElevenLabs; o runtime limita a ela. */
|
|
428
|
+
export const HUBIA_VOICE_REPLY_ELEVENLABS_SPEED = { min: 0.7, max: 1.2 } as const;
|
|
429
|
+
|
|
411
430
|
/** Liga a resposta em áudio no binding. QUANDO usar áudio é regra do prompt do
|
|
412
431
|
* binding (o LLM decide por turno), não deste objeto. */
|
|
413
432
|
export const zHubiaVoiceReplySchema = z.object({
|
|
414
433
|
enabled: z.boolean().default(false),
|
|
434
|
+
/** Ausente = `openai` (bindings gravados antes da F1.1). */
|
|
435
|
+
provider: zHubiaVoiceProviderSchema.optional(),
|
|
436
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
437
|
+
model: z.string().min(1).max(60).optional(),
|
|
438
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
415
439
|
voice: z.string().min(1).max(40).default(HUBIA_VOICE_REPLY_DEFAULT_VOICE),
|
|
416
|
-
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
440
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
417
441
|
instructions: z.string().max(1000).optional(),
|
|
418
|
-
/** 1.0 = normal. */
|
|
442
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
419
443
|
speed: z.number().min(0.75).max(1.5).optional(),
|
|
444
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
445
|
+
elevenlabs: z.object({
|
|
446
|
+
stability: z.number().min(0).max(1).optional(),
|
|
447
|
+
similarity_boost: z.number().min(0).max(1).optional(),
|
|
448
|
+
style: z.number().min(0).max(1).optional(),
|
|
449
|
+
}).optional(),
|
|
420
450
|
});
|
|
421
451
|
export type IHubiaVoiceReply = z.infer<typeof zHubiaVoiceReplySchema>;
|
|
422
452
|
|
|
@@ -456,6 +486,8 @@ export type IHubiaSuggestionOutcome = z.infer<typeof zHubiaSuggestionOutcomeSche
|
|
|
456
486
|
|
|
457
487
|
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
458
488
|
export const zHubiaTtsMessageMetaSchema = z.object({
|
|
489
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
490
|
+
provider: zHubiaVoiceProviderSchema.optional(),
|
|
459
491
|
model: z.string(),
|
|
460
492
|
voice: z.string(),
|
|
461
493
|
format: z.enum(['ogg', 'mp3']),
|