jayaspjacob Claude Opus 4.8 (1M context) commited on
Commit
9756234
·
1 Parent(s): 4c38fd0

Add OpenAudio emotion/tone cues to generated scripts

Browse files

Instruct the scriptwriter to add inline parenthetical cues from OpenAudio
S1's supported set — (excited) (chuckling) (laughing) (sighing) (whispering)
etc. — sparingly where they fit. These pass through parse_script and the TTS
request unchanged, so the model renders them as emotion/tone.

Note: S1 uses parentheses, not square brackets, and has no pause/emphasis
marker (punctuation handles those), so the prompt steers away from [chuckle]
-style tags that would otherwise be read aloud.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. research/graph.py +12 -3
research/graph.py CHANGED
@@ -96,9 +96,18 @@ def write_node(state: ResearchState) -> dict:
96
  f"Speakers: {speaker_list}.\n"
97
  "Format STRICTLY as one line per turn, prefixed with the speaker name and a "
98
  f"colon, like:\n{fmt}\n"
99
- "Do not include stage directions, markdown, or headings - only spoken dialogue "
100
- "lines. Keep each line to a few sentences. Open with a hook and close with a "
101
- "sign-off."
 
 
 
 
 
 
 
 
 
102
  ),
103
  user=(
104
  f"Topic: {state['topic']}\n"
 
96
  f"Speakers: {speaker_list}.\n"
97
  "Format STRICTLY as one line per turn, prefixed with the speaker name and a "
98
  f"colon, like:\n{fmt}\n"
99
+ "Make the delivery feel human by adding OpenAudio emotion/tone cues IN "
100
+ "PARENTHESES, inline, right before the words they color (or at the very start "
101
+ "of a turn). Use ONLY these cues: (excited) (curious) (surprised) (amused) "
102
+ "(interested) (confident) (empathetic) (joyful) (serious) (sarcastic) "
103
+ "(thoughtful) (laughing) (chuckling) (sighing) (whispering) (soft tone) "
104
+ "(in a hurry tone). Use them sparingly — about one every few lines, only where "
105
+ "it genuinely fits the moment. Do NOT invent other cues and do NOT use square "
106
+ "brackets. There is no pause or emphasis marker: convey pauses and emphasis with "
107
+ "natural punctuation (commas, em-dashes —, ellipses …).\n"
108
+ "Apart from these inline parenthetical cues, output only spoken dialogue — no "
109
+ "markdown, headings, or stand-alone stage directions. Keep each line to a few "
110
+ "sentences. Open with a hook and close with a sign-off."
111
  ),
112
  user=(
113
  f"Topic: {state['topic']}\n"