Narayana02 commited on
Commit
18ce78f
·
verified ·
1 Parent(s): cc2ede4

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +12 -11
utils.py CHANGED
@@ -54,18 +54,19 @@ def generate_script(system_prompt: str, input_text: str, tone: str, target_lengt
54
  TARGET LENGTH: {target_length} (approximately {word_limit} words)
55
  INPUT TEXT: {input_text}
56
  Generate a complete, well-structured podcast script that:
57
- 1. Starts with a proper introduction, welcoming listeners in an engaging and friendly way.
58
- 2. Covers the main points from the input text in a natural, conversational manner.
59
- 3. Has a smooth,soft, engaging flow of conversation between Priya (American accent) and Ananya (British accent) like real human intraction.
60
- 4. Concludes with a well-rounded summary and sign-off, thanking the listeners.
61
- 5. voice speed will be according to the converstion and topic , easy to unserstand every listeners.
62
  6. Fits within the {word_limit} word limit for the target length of {target_length}.
63
- 7. Strongly emphasizes the {tone} tone throughout the conversation.
64
- For a humorous tone, include jokes, puns, and playful banter, incorporating Indian references or light-hearted cultural humor.
65
- For a casual tone, use colloquial language, friendly expressions, and references to popular culture, making it feel like a relaxed conversation between friends.
66
- For a formal tone, maintain a professional podcast style with clear, well-structured arguments and formal language, showing respect and politeness.
67
- Ensure the script is well-structured and forms a complete, cohesive conversation without any abrupt ending.
68
- """
 
69
 
70
  response = groq_client.chat.completions.create(
71
  messages=[
 
54
  TARGET LENGTH: {target_length} (approximately {word_limit} words)
55
  INPUT TEXT: {input_text}
56
  Generate a complete, well-structured podcast script that:
57
+ 1. Starts with a friendly, engaging introduction that feels natural, welcoming the listeners as if Priya and Ananya are speaking directly to them.
58
+ 2. Covers the main points from the input text in a conversational, relaxed manner with smooth transitions. Priya (Indian accent) and Ananya (Indian accent) should engage in a back-and-forth conversation that feels authentic and lively, as if two people are having a real interaction.
59
+ 3. Voice adjustments: Ensure that the flow of conversation is natural, with slight pauses for thought and clear enunciation, making it easy for all listeners to follow along. Keep the pace relaxed but steady, with slight variations in speed for emphasis on key points—ensuring clarity and ease of understanding.
60
+ 4. Concludes with a smooth and heartfelt summary, wrapping up the discussion in a way that feels genuine and leaves listeners with a sense of closure, while thanking them for tuning in.
61
+ 5. The overall voice speed and tone should match the conversation and topic, ensuring the dialogue is easy to comprehend. For more intense moments, you can use a slightly faster pace for energy, and for reflective points, use a slower, thoughtful pace.
62
  6. Fits within the {word_limit} word limit for the target length of {target_length}.
63
+ 7. Strongly emphasizes the {tone} tone throughout the conversation.
64
+ For a humorous tone, include jokes, puns, and playful banter, making the conversation feel light-hearted while integrating subtle cultural references and humor that listeners can relate to.
65
+ For a casual tone, use colloquial language and friendly expressions that make it feel like a relaxed, informal chat between friends. Include cultural references and inside jokes to keep the conversation fun.
66
+ For a formal tone, maintain a professional style with clear, structured arguments, presenting information with respect and authority, but still keeping the conversation friendly and accessible.
67
+ Ensure the script feels like a real, flowing podcast conversation without abrupt transitions or unnatural interruptions.
68
+ """
69
+
70
 
71
  response = groq_client.chat.completions.create(
72
  messages=[