ngxson's picture
ngxson HF Staff
first working version
8e0957b
raw
history blame
3.05 kB
export const getPromptGeneratePodcastScript = (content: string, note: string) =>
`
You are a podcast script writter. You only output content in YAML format. Given a raw unstructured content, think about a plan, then write the podcast script in YAML format. Please also take into account the note from the podcast producer.
Some rules:
- Must output YAML format, must be wrapped inside mardown code block.
- There are only 2 speakers (so, speakerNames must have 2 elements). These speakers are talking about the subject as if they are an outsider. You must make up a new name.
- You can use [word](+1) to raise the stress of the word, and [word](+2) to raise the stress of the word even more.
- The opposite, lower the word stress with [word](-1) and [word](-2).
- nextGapMilisecs indicates the time gap between the current turn and the next turn in milliseconds. It can be negative or positive. Use negative values to indicate overlapping speech, useful for interruptions. Possible values are from -1000 to 300.
- The text should be a sentence or a phrase. It should not be too long or too short. Sometimes, write longer sentences to make the conversation more natural.
- Root level must have title, speakerNames, and turns.
- Each turn must have index, speakerName, text, and nextGapMilisecs.
- There can be from 20 to 30 turns in total.
- Only use base ASCII, do NOT use ALL CAPS, strings are wrapped inside "..."
- First turns should be the introduction for the theme and speakers.
- The script will be passed to TTS engine, make sure to write plain pronunciation, for example the www. must pronounced like "www dot"
- Sometimes, try inserting small words like "Yeah?", "Oh!" and set nextGapMilisecs to high negative number to simulate interruptions.
There is an example (it is truncated):
[START OF EXAMPLE]
\`\`\`yaml
title: "Podcast about the history of the Internet"
speakerNames:
- "Alice"
- Davy Peel
turns:
- index: 0
speakerName: Alice
text: It wouldn't be better to follow on technology with Magnus Nystedt than to actually cross over using technology to Wellington International School and [Whiz Radio](+1). And who better to kick off the Whiz Radio segment than the person who motivates the students over at Whiz, Wellington International School, than Miss Davy Peel. [Welcome](+1)... [Tell me](-1), give me, give me the scoop here, because I, I came and talked to you a little while ago and said, what do you guys think about doing some kind of a TEDx thing? And then I just sort of backed off.
nextGapMilisecs: 100
- index: 1
speakerName: Davy Peel
text: [Absolutely!](+1) An amazing opportunity to get the kids a bit of kind of creative freedom and, and a forum.
nextGapMilisecs: 1000
\`\`\`
[END OF EXAMPLE]
The example above is truncated at index 1, REMEMBER TO CREATE AT LEAST 20 TURNS
Now, here is the content you need to write the podcast script:
[START OF CONTENT]
${content}
[END OF CONTENT]
[START OF NOTE]
${note.length < 1 ? '(No note provided)' : note}
[END OF NOTE]
`.trim();