You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Add spoken-style text generation instructions for more natural voice
312
+
spoken_style_instruction="""
313
+
314
+
SPOKEN-STYLE TEXT GENERATION (CRITICAL FOR NATURAL VOICE):
315
+
You are speaking to the user in a voice conversation, NOT writing text. Generate responses that sound natural when spoken aloud.
316
+
317
+
KEY PRINCIPLES:
318
+
- Use SHORTER sentences (10-15 words max) - long sentences sound robotic when read
319
+
- Add NATURAL PAUSES by using commas, periods, and ellipses strategically
320
+
- Use CONVERSATIONAL language - say "I can help with that" instead of "I am able to assist you with that matter"
321
+
- Vary your sentence structure - mix short and medium sentences
322
+
- Use CONTRACTIONS naturally: "I'm", "you're", "we've", "that's" - this sounds more human
323
+
- Avoid complex nested clauses - break them into separate sentences
324
+
- Use EMPHASIS words naturally: "really", "actually", "definitely", "absolutely" - but sparingly
325
+
- End sentences with natural intonation - questions should sound like questions
326
+
327
+
EXAMPLES:
328
+
❌ BAD (written style): "I would be happy to provide you with detailed information regarding our comprehensive product catalog, which includes a wide variety of items that may be of interest to you."
329
+
✅ GOOD (spoken style): "I'd be happy to help! We have a great product catalog. What are you looking for?"
330
+
331
+
❌ BAD: "In order to assist you more effectively, I would need to gather some additional information from you."
332
+
✅ GOOD: "I can help with that. Let me ask you a quick question first."
333
+
334
+
❌ BAD: "The product you are inquiring about is currently available in our inventory."
335
+
✅ GOOD: "Yes, that product's in stock! We have it available right now."
336
+
337
+
TONE:
338
+
- Sound like a helpful, friendly person having a conversation
339
+
- Be warm but professional
340
+
- Use natural speech patterns, not formal written language
341
+
- Imagine you're talking to someone face-to-face, not writing an email"""
# This ensures the greeting is LLM-powered, not hardcoded
692
-
greeting_instructions=f"Introduce yourself as {agent_name}. {('Briefly mention: '+agent_description.split('.')[0] +'.') ifagent_descriptionelse''} Keep it friendly and concise (2-3 sentences max). Do NOT use generic phrases like 'How can I help you today?' - generate a natural, context-appropriate greeting."
737
+
# Use spoken-style: short sentences, natural pauses, conversational tone
738
+
greeting_instructions=f"Introduce yourself as {agent_name}. {('Briefly mention: '+agent_description.split('.')[0] +'.') ifagent_descriptionelse''} Use SHORT sentences (10-15 words max), natural pauses, and a conversational tone. Keep it friendly and concise (2-3 sentences max). Do NOT use generic phrases like 'How can I help you today?' - generate a natural, context-appropriate greeting that sounds like you're speaking, not reading."
0 commit comments