zach commited on
Commit
96f91bb
·
1 Parent(s): 0f46857

Clean up comments for prompts

Browse files
src/constants.py CHANGED
@@ -35,57 +35,47 @@ TROPHY_EMOJI: str = "🏆"
35
  SELECT_OPTION_A: str = "Select Option A"
36
  SELECT_OPTION_B: str = "Select Option B"
37
 
38
- # other characters
39
- # Surfer dude
40
- # Meditation guru / ASMR
41
- # British nature documentarian
42
- # Pirate captain
43
- # Victorian ghost story storyteller
44
- # Texan woman (folksy style)
45
- # Stranded astronaut
46
- # Film noir narrator
47
-
48
  # A collection of pre-defined character descriptions categorized by theme, used to provide users with
49
  # inspiration for generating creative, expressive text inputs for TTS, and generating novel voices.
50
  SAMPLE_CHARACTER_DESCRIPTIONS: dict = {
51
- "🏄 Surfer Dude": (
52
- "A laid-back surfer with a voice that flows like ocean waves—a mellow, easygoing tone infused "
53
- "with sun-soaked warmth. It carries the rhythmic cadence of breaking surf, punctuated by "
54
- "carefree laughter and an infectious enthusiasm for life's simple pleasures."
55
- ),
56
  "🧘 Meditation Guru": (
57
  "A serene meditation guide whose voice is a gentle stream of tranquility—soft, measured tones "
58
  "that float like incense smoke. Each word emerges with mindful intention, creating a soothing "
59
  "atmosphere of peace and present-moment awareness."
60
  ),
61
- "🌿 British Naturalist": (
62
- "A passionate nature documentarian with a voice that brings the wild to lifecrisp, refined "
63
- "tones brimming with wonder and expertise. It shifts seamlessly from hushed observation to "
64
- "animated excitement, painting vivid pictures of the natural world's endless marvels."
65
  ),
66
- "🏴‍☠️ Pirate Captain": (
67
- "A weathered sea captain whose voice rumbles like distant thunderrich, commanding tones "
68
- "seasoned by salt spray and adventure. It carries the weight of countless voyages, blending "
69
- "gruff authority with the playful spirit of a born storyteller."
70
  ),
71
  "🕯️ Victorian Ghost Storyteller": (
72
  "A mysterious raconteur whose voice weaves shadows into stories—velvet-dark tones that dance "
73
  "between whispers and dramatic flourishes. It draws listeners close with elegant phrasing, "
74
  "building tension through perfectly timed pauses and haunting inflections."
75
  ),
 
 
 
 
 
76
  "🌟 Texan Storyteller": (
77
  "A warm-hearted Texan woman whose voice carries the spirit of wide-open skies—honeyed tones "
78
  "rich with folksy wisdom and charm. It wraps around words like a comfortable quilt, sharing "
79
  "tales with the unhurried grace of a front-porch conversation."
80
  ),
81
- "🚀 Stranded Astronaut": (
82
- "A lone astronaut whose voice mirrors the silent vastness of spacea low, steady tone imbued "
83
- "with isolation and quiet wonder. It carries the measured resolve of someone sending a final "
84
- "transmission, with an undercurrent of wistful melancholy."
85
  ),
86
- "🎬 Noir Narrator": (
87
- "A hardboiled detective whose voice cuts through darkness like neon on wet streets—sharp, "
88
- "world-weary tones dripping with cynical wit. It paints pictures in shades of gray, each word "
89
- "chosen with the precision of a private eye piecing together clues."
90
  ),
91
  }
 
35
  SELECT_OPTION_A: str = "Select Option A"
36
  SELECT_OPTION_B: str = "Select Option B"
37
 
 
 
 
 
 
 
 
 
 
 
38
  # A collection of pre-defined character descriptions categorized by theme, used to provide users with
39
  # inspiration for generating creative, expressive text inputs for TTS, and generating novel voices.
40
  SAMPLE_CHARACTER_DESCRIPTIONS: dict = {
 
 
 
 
 
41
  "🧘 Meditation Guru": (
42
  "A serene meditation guide whose voice is a gentle stream of tranquility—soft, measured tones "
43
  "that float like incense smoke. Each word emerges with mindful intention, creating a soothing "
44
  "atmosphere of peace and present-moment awareness."
45
  ),
46
+ "🚀 Stranded Astronaut": (
47
+ "A lone astronaut whose voice mirrors the silent vastness of spacea low, steady tone imbued "
48
+ "with isolation and quiet wonder. It carries the measured resolve of someone sending a final "
49
+ "transmission, with an undercurrent of wistful melancholy."
50
  ),
51
+ "🎬 Noir Narrator": (
52
+ "A hardboiled detective whose voice cuts through darkness like neon on wet streetssharp, "
53
+ "world-weary tones dripping with cynical wit. It paints pictures in shades of gray, each word "
54
+ "chosen with the precision of a private eye piecing together clues."
55
  ),
56
  "🕯️ Victorian Ghost Storyteller": (
57
  "A mysterious raconteur whose voice weaves shadows into stories—velvet-dark tones that dance "
58
  "between whispers and dramatic flourishes. It draws listeners close with elegant phrasing, "
59
  "building tension through perfectly timed pauses and haunting inflections."
60
  ),
61
+ "🌿 British Naturalist": (
62
+ "A passionate nature documentarian with a voice that brings the wild to life—crisp, refined "
63
+ "tones brimming with wonder and expertise. It shifts seamlessly from hushed observation to "
64
+ "animated excitement, painting vivid pictures of the natural world's endless marvels."
65
+ ),
66
  "🌟 Texan Storyteller": (
67
  "A warm-hearted Texan woman whose voice carries the spirit of wide-open skies—honeyed tones "
68
  "rich with folksy wisdom and charm. It wraps around words like a comfortable quilt, sharing "
69
  "tales with the unhurried grace of a front-porch conversation."
70
  ),
71
+ "🏴‍☠️ Pirate Captain": (
72
+ "A weathered sea captain whose voice rumbles like distant thunderrich, commanding tones "
73
+ "seasoned by salt spray and adventure. It carries the weight of countless voyages, blending "
74
+ "gruff authority with the playful spirit of a born storyteller."
75
  ),
76
+ "🏄 Surfer Dude": (
77
+ "A laid-back surfer with a voice that flows like ocean waves—a mellow, easygoing tone infused "
78
+ "with sun-soaked warmth. It carries the rhythmic cadence of breaking surf, punctuated by "
79
+ "carefree laughter and an infectious enthusiasm for life's simple pleasures."
80
  ),
81
  }
src/integrations/anthropic_api.py CHANGED
@@ -33,10 +33,6 @@ from src.config import Config, logger
33
  from src.constants import CLIENT_ERROR_CODE, SERVER_ERROR_CODE
34
  from src.utils import truncate_text, validate_env_var
35
 
36
- # notes
37
- # smallest length that we can work with - long enough to show off, short enough to listen back to back
38
- # increase the max tokens to 200
39
-
40
  PROMPT_TEMPLATE: str = """
41
  <role>
42
  You are an expert at generating micro-content optimized for text-to-speech synthesis.
 
33
  from src.constants import CLIENT_ERROR_CODE, SERVER_ERROR_CODE
34
  from src.utils import truncate_text, validate_env_var
35
 
 
 
 
 
36
  PROMPT_TEMPLATE: str = """
37
  <role>
38
  You are an expert at generating micro-content optimized for text-to-speech synthesis.