beplus-mcp 0.42.0 → 0.43.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/README.md +3 -3
- package/dist/index.js +27 -14
- package/dist/index.js.map +1 -1
- package/dist/remote-server.js +27 -14
- package/dist/remote-server.js.map +1 -1
- package/package.json +1 -1
package/dist/remote-server.js
CHANGED
|
@@ -24773,12 +24773,14 @@ function registerAudioTools(server, client, cfg) {
|
|
|
24773
24773
|
"generate_audio",
|
|
24774
24774
|
{
|
|
24775
24775
|
title: "Gerar \xE1udio (TTS)",
|
|
24776
|
-
description: 'Sintetiza fala a partir de texto e retorna a URL usando o IA Lab da BePlus. SeedAudio 1.0 (seed-audio-1.0) aceita dire\xE7\xE3o e
|
|
24776
|
+
description: 'Sintetiza fala a partir de texto e retorna a URL usando o IA Lab da BePlus. SeedAudio 1.0 (seed-audio-1.0) aceita dire\xE7\xE3o, volume e at\xE9 3 refer\xEAncias de voz em seed_references (ou seed_reference legado), com seed_consent. Para v\xE1rias vozes, marque todas no texto: @Audio1: Ol\xE1. @Audio2: Oi. Um ID pr\xF3prio em seed_reference_generation_id reutiliza todas as refer\xEAncias. Texto e dire\xE7\xE3o somados at\xE9 2700 caracteres. N\xE3o aceita multi_speaker nem vozes Gemini. Modelos Gemini 3.8 (`gemini-3.8-flash-lite-tts`, padr\xE3o, r\xE1pido e barato; `gemini-3.8-flash-tts`, qualidade de est\xFAdio, melhor para di\xE1logo e narra\xE7\xE3o longa) aceitam: vozes da biblioteca (milhares, por idioma; liste com `list_tts_voices` e passe o id em `voice`), tags vocais no texto como <laugh> <chuckle> <sigh> <breath> <gasp> <cough> <sneeze> <throat-clearing> <yawn> <groan> <scream> <whimper> <argh> <short pause> <long pause> (viram som de verdade), e estilo por locutor (`style` em cada speaker). No 3.8, `style_instruction` \xE9 dire\xE7\xE3o e N\xC3O \xE9 lida em voz alta. Os modelos legados (`gemini-3.1-flash-tts-preview`, `gemini-2.5-pro-preview-tts`) s\xF3 aceitam as 30 vozes cl\xE1ssicas (Kore, Puck, Charon...) e n\xE3o t\xEAm voz da biblioteca. Vozes pr\xF3prias (voice_xxx; liste com `list_custom_voices`, crie com `design_voice`) s\xF3 no 3.8 e sem `multi_speaker`. No 3.8, dire\xE7\xE3o por linha: `(sussurrando) texto` no in\xEDcio da linha vale at\xE9 a pr\xF3xima dire\xE7\xE3o; no di\xE1logo, `Ana (rindo): fala`; rea\xE7\xF5es `|hmm|` `|aham|` no meio da fala (s\xF3 di\xE1logo). Opcional `style_instruction` (ex.: "fale animado e pausado") e di\xE1logo com 2 locutores via `multi_speaker`. Consome diamantes por segundo de \xE1udio.' + TEAM_GATING_NOTE,
|
|
24777
24777
|
inputSchema: {
|
|
24778
24778
|
text: external_exports.string().min(1).max(1e4).describe("Texto a ser falado."),
|
|
24779
24779
|
voice: topVoiceSchema.optional().describe(VOICE_HELP_TOP + " No SeedAudio, omita ou use seed-auto."),
|
|
24780
24780
|
seed_reference: external_exports.string().min(1).optional().describe("SeedAudio: arquivo local (stdio) ou URL p\xFAblica de uma voz autorizada, de 1 a 30 s e at\xE9 3 MiB. N\xE3o \xE9 publicado pelo MCP."),
|
|
24781
|
-
|
|
24781
|
+
seed_references: external_exports.array(external_exports.string().min(1)).min(1).max(3).optional().describe("SeedAudio: at\xE9 3 arquivos locais (stdio) ou URLs p\xFAblicas, na ordem @Audio1, @Audio2, @Audio3. Cada \xE1udio de 1 a 30 s; soma de at\xE9 3 MiB. Use todos os marcadores no texto quando houver v\xE1rias vozes."),
|
|
24782
|
+
seed_loudness_rate: external_exports.number().int().min(-50).max(100).optional().describe("SeedAudio: volume nativo. -50 = 50%, 0 = 100% (normal), 100 = 200%."),
|
|
24783
|
+
seed_reference_generation_id: external_exports.string().uuid().optional().describe("Reutiliza a refer\xEAncia de uma gera\xE7\xE3o SeedAudio sua. Alternativa a seed_reference e seed_references; reutiliza todas as vozes da gera\xE7\xE3o."),
|
|
24782
24784
|
seed_consent: external_exports.literal(true).optional().describe("Confirme apenas ap\xF3s autoriza\xE7\xE3o expl\xEDcita da pessoa para usar sua voz. Obrigat\xF3rio com refer\xEAncia."),
|
|
24783
24785
|
model: external_exports.enum(TTS_MODELS).default(DEFAULTS.ttsModel).describe("Modelo TTS."),
|
|
24784
24786
|
style_instruction: external_exports.string().max(2e3).optional().describe("Instru\xE7\xE3o de estilo/tom aplicada \xE0 fala."),
|
|
@@ -24793,12 +24795,19 @@ function registerAudioTools(server, client, cfg) {
|
|
|
24793
24795
|
try {
|
|
24794
24796
|
const seed = args.model === "seed-audio-1.0";
|
|
24795
24797
|
const voice = args.voice ?? (seed ? "seed-auto" : DEFAULTS.voice);
|
|
24796
|
-
const hasReference = !!(args.seed_reference || args.seed_reference_generation_id);
|
|
24797
|
-
if (!seed && (hasReference || args.seed_consent || voice === "seed-auto")) return errorResult("Os controles SeedAudio exigem seed-audio-1.0.");
|
|
24798
|
-
if (seed && (voice !== "seed-auto" || args.multi_speaker)) return errorResult("SeedAudio usa seed-auto
|
|
24799
|
-
if (args.seed_reference
|
|
24798
|
+
const hasReference = !!(args.seed_reference || args.seed_references || args.seed_reference_generation_id);
|
|
24799
|
+
if (!seed && (hasReference || args.seed_consent !== void 0 || args.seed_loudness_rate !== void 0 || voice === "seed-auto")) return errorResult("Os controles SeedAudio exigem seed-audio-1.0.");
|
|
24800
|
+
if (seed && (voice !== "seed-auto" || args.multi_speaker)) return errorResult("SeedAudio usa seed-auto. Para v\xE1rias vozes, use seed_references e marcadores @Audio, sem multi_speaker.");
|
|
24801
|
+
if ([args.seed_reference, args.seed_references, args.seed_reference_generation_id].filter(Boolean).length > 1) return errorResult("Use apenas uma origem de refer\xEAncia.");
|
|
24800
24802
|
if (hasReference && !args.seed_consent) return errorResult("Confirme a autoriza\xE7\xE3o da voz em seed_consent.");
|
|
24801
24803
|
if (seed && args.text.trim().length + (args.style_instruction?.trim().length ?? 0) > 2700) return errorResult("SeedAudio: texto e dire\xE7\xE3o devem somar at\xE9 2700 caracteres.");
|
|
24804
|
+
const referenceSources = args.seed_references ?? (args.seed_reference ? [args.seed_reference] : []);
|
|
24805
|
+
if (seed && !args.seed_reference_generation_id) {
|
|
24806
|
+
const markersIn = (value) => (value.match(/@Audio[^\s:,.!?;"'()\[\]{}]*/gi) ?? []).map((token) => /^@Audio[1-3]$/.test(token) ? Number(token.slice(6)) : 0);
|
|
24807
|
+
const markers = markersIn(args.text);
|
|
24808
|
+
const allMarkers = [...markers, ...markersIn(args.style_instruction ?? "")];
|
|
24809
|
+
if (allMarkers.some((index) => index < 1 || index > referenceSources.length) || referenceSources.length > 1 && referenceSources.some((_, index) => !markers.includes(index + 1))) return errorResult("Use os marcadores @Audio1, @Audio2 e @Audio3 correspondentes a todas as refer\xEAncias enviadas.");
|
|
24810
|
+
}
|
|
24802
24811
|
const ms = args.multi_speaker;
|
|
24803
24812
|
const voices = [voice, ms?.speaker1.voice, ms?.speaker2.voice].filter((v) => !!v);
|
|
24804
24813
|
if (isCustomVoice(voice)) {
|
|
@@ -24819,14 +24828,18 @@ function registerAudioTools(server, client, cfg) {
|
|
|
24819
24828
|
return errorResult("O estilo por locutor (`style`) s\xF3 funciona nos modelos Gemini 3.8.");
|
|
24820
24829
|
}
|
|
24821
24830
|
}
|
|
24822
|
-
|
|
24823
|
-
|
|
24824
|
-
|
|
24825
|
-
|
|
24826
|
-
|
|
24831
|
+
const seedReferences = [];
|
|
24832
|
+
let remainingBytes = 3 * 1024 * 1024;
|
|
24833
|
+
for (const source of referenceSources) {
|
|
24834
|
+
const file = await (isRemoteRef(source) ? loadRemote(source, remainingBytes) : loadLocal(source, remainingBytes));
|
|
24835
|
+
if (!file.buf.length || file.buf.length > remainingBytes) return errorResult("As refer\xEAncias devem somar at\xE9 3 MiB.");
|
|
24836
|
+
remainingBytes -= file.buf.length;
|
|
24837
|
+
seedReferences.push({ audio: file.buf.toString("base64"), mime: file.mime });
|
|
24827
24838
|
}
|
|
24828
24839
|
const body2 = compact({
|
|
24829
|
-
seedReference,
|
|
24840
|
+
seedReference: args.seed_reference ? seedReferences[0] : void 0,
|
|
24841
|
+
seedReferences: args.seed_references ? seedReferences : void 0,
|
|
24842
|
+
seedLoudnessRate: args.seed_loudness_rate,
|
|
24830
24843
|
seedReferenceGenerationId: args.seed_reference_generation_id,
|
|
24831
24844
|
seedConsent: args.seed_consent,
|
|
24832
24845
|
text: args.text,
|
|
@@ -25692,7 +25705,7 @@ var KINDS = {
|
|
|
25692
25705
|
data: { model: "gemini-3.8-flash-lite-tts", voice: "Algieba", speed: "normal" },
|
|
25693
25706
|
inputs: ["text"],
|
|
25694
25707
|
outputs: ["audio", "approved"],
|
|
25695
|
-
dynamic: "style conforme o modelo; SeedAudio 1.0 tem reference (audio), usa voice: seed-auto e seedConsent: true com refer\xEAncia; alternativa seedReferenceGenerationId de gera\xE7\xE3o pr\xF3pria"
|
|
25708
|
+
dynamic: "style conforme o modelo; SeedAudio 1.0 tem reference (audio, at\xE9 3 vozes na ordem @Audio1..3), volume seedLoudnessRate (-50..100), usa voice: seed-auto e seedConsent: true com refer\xEAncia; alternativa seedReferenceGenerationId de gera\xE7\xE3o pr\xF3pria"
|
|
25696
25709
|
},
|
|
25697
25710
|
music: {
|
|
25698
25711
|
title: "Trilha",
|
|
@@ -28742,7 +28755,7 @@ N\xF3s: ${Object.entries(ids).map(([k, v]) => `${k}=${v}`).join(" \xB7 ")}` : ""
|
|
|
28742
28755
|
import { createRequire } from "module";
|
|
28743
28756
|
var require2 = createRequire(import.meta.url);
|
|
28744
28757
|
function readVersion() {
|
|
28745
|
-
if ("0.
|
|
28758
|
+
if ("0.43.0") return "0.43.0";
|
|
28746
28759
|
try {
|
|
28747
28760
|
const pkg = require2("../package.json");
|
|
28748
28761
|
return pkg.version ?? "0.0.0-unknown";
|