Skip to content

Instantly share code, notes, and snippets.

@CodeWithOz
Last active December 19, 2025 13:53
Show Gist options
  • Select an option

  • Save CodeWithOz/d254c811d5a20c2083f593d0a856f875 to your computer and use it in GitHub Desktop.

Select an option

Save CodeWithOz/d254c811d5a20c2083f593d0a856f875 to your computer and use it in GitHub Desktop.
TTS logic for Listen Better demo
...
const systemPrompt = getDialogueSystemPrompt();
const humanMessageContent = `Here's the dialogue script inside triple backticks:\n\n\`\`\`\n${script}\n\`\`\`\n\nNow generate the AUDIO, NOT TEXT, for this dialogue script.`;
const messages = [
new HumanMessage(`${systemPrompt}\n\n${humanMessageContent}`),
];
const result = await model.invoke(messages);
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment