Skip to content

Commit

Permalink
Merge branch 'main' of github.com:isamu/graphai-agents
Browse files Browse the repository at this point in the history
  • Loading branch information
isamu committed Dec 11, 2024
2 parents 34436f7 + cf5a9d3 commit 8c6b2b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions tts/tts-nijivoice-agent/lib/tts_nijivoice_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ const ttsNijivoiceAgent = async ({ params, namedInputs }) => {
const { voiceId, text } = namedInputs;
const url = `https://api.nijivoice.com/api/platform/v1/voice-actors/${voiceId}/generate-voice`;
const options = {
method: 'POST',
method: "POST",
headers: {
"x-api-key": apiKey ?? nijovoiceApiKey,
accept: 'application/json',
'content-type': 'application/json'
accept: "application/json",
"content-type": "application/json",
},
body: JSON.stringify({
format: 'mp3',
speed: '1.0',
format: "mp3",
speed: "1.0",
script: text,
})
}),
};
try {
const voiceRes = await fetch(url, options);
Expand Down
4 changes: 2 additions & 2 deletions tts/tts-nijivoice-agent/tests/run_graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const main = async () => {
before: true,
},
},
}
},
};

const graph = new GraphAI(graphData, { ttsNijivoiceAgent, fileWriteAgent });
graph.injectValue("fileDir", path.resolve(__dirname));
const result = (await graph.run()) as any;
Expand Down

0 comments on commit 8c6b2b4

Please sign in to comment.