mulmocast 2.1.4 → 2.1.5
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.
|
@@ -5,7 +5,7 @@ import { agentIncorrectAPIKeyError, apiKeyMissingError, agentGenerationError, au
|
|
|
5
5
|
import { pcmToMp3 } from "../utils/ffmpeg_utils.js";
|
|
6
6
|
export const ttsGeminiAgent = async ({ namedInputs, params, config, }) => {
|
|
7
7
|
const { text } = namedInputs;
|
|
8
|
-
const { voice, suppressError } = params;
|
|
8
|
+
const { model, voice, suppressError } = params;
|
|
9
9
|
const apiKey = config?.apiKey;
|
|
10
10
|
if (!apiKey) {
|
|
11
11
|
throw new Error("Google GenAI API key is required (GEMINI_API_KEY)", {
|
|
@@ -15,7 +15,7 @@ export const ttsGeminiAgent = async ({ namedInputs, params, config, }) => {
|
|
|
15
15
|
try {
|
|
16
16
|
const ai = new GoogleGenAI({ apiKey });
|
|
17
17
|
const response = await ai.models.generateContent({
|
|
18
|
-
model:
|
|
18
|
+
model: model ?? provider2TTSAgent.gemini.defaultModel,
|
|
19
19
|
contents: [{ parts: [{ text }] }],
|
|
20
20
|
config: {
|
|
21
21
|
responseModalities: ["AUDIO"],
|
package/lib/types/agent.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ export const provider2TTSAgent = {
|
|
|
21
21
|
gemini: {
|
|
22
22
|
agentName: "ttsGeminiAgent",
|
|
23
23
|
hasLimitedConcurrency: false,
|
|
24
|
+
defaultModel: "gemini-2.5-flash-preview-tts",
|
|
24
25
|
defaultVoice: "Kore",
|
|
26
|
+
models: ["gemini-2.5-flash-preview-tts", "gemini-2.5-pro-preview-tts"],
|
|
25
27
|
keyName: "GEMINI_API_KEY",
|
|
26
28
|
},
|
|
27
29
|
elevenlabs: {
|
package/package.json
CHANGED