Dialogical Chatbot
Frontier Psychology research prototype

2) Co-designed

Co-design means users, clinicians, and cultural partners define what safe, useful language looks like.

Veterans, bilingual clinicians, and research partners shape tone, pacing, metaphors, and escalation thresholds as negotiated acts of care, not top-down decisions.

Core co-design components

  • Language packs: modular dictionaries per locale (EN-UK veterans, UA frontline).
  • Lexicon registers: grouped phrases by stance (contain, witness, redirect).
  • Cultural validation: review by bilingual clinicians and veteran focus groups.
  • Iterative loops: anonymised transcripts feed advisory review and refinement.
  • Ethical guardrails: supervision for non-pathologising practice and safe escalation.

Co-design loop (diagram)

Veteran & Clinician Input
        |
Lexicon Register <-> Language Pack (EN / UA)
        |
Cultural Vetting <-> UK Research / Ukraine Partners
        |
Prompt Library -> Live Deployment -> Feedback Logs
        ^                                   |
        |-----------------------------------|
               Co-Design Review Loop

Runtime register selection (pseudo)

const register = user.language === "uk" ? "ua_frontline" : "en_veteran";
const phrase = lexicon[register].grounding[0];
assistant.reply(phrase);

Voices and prosody: humanising speech output

Personas receive distinct voices and tuned prosody. Slow ramp-in, micro-pauses, and softer endings reduce cognitive load. Safety language uses calm cadence; values prompts sound warmer.

Persona to voice mapping (example)

const voiceMap = {
  charlie: { en: "en-GB-RyanNeural", uk: "uk-UA-OstapNeural" },
  mishka:  { en: "en-GB-SoniaNeural", uk: "uk-UA-PolinaNeural" }
};
const voiceName = voiceMap[persona][user.language];

SSML tuning tips

<prosody rate="-10%" pitch="-1st"> calmer safety lines
<break time="400ms"/> gentle pause
<emphasis level="reduced"> soften corrective statements
<prosody rate="+5%"> action planning (not rushed)

Azure TTS example (Node fetch + SSML)

const region = process.env.AZURE_TTS_REGION;
const key = process.env.AZURE_TTS_KEY;
const voice = "en-GB-SoniaNeural";

const ssml = `
<speak version="1.0" xml:lang="en-GB">
  <voice name="${voice}">
    <prosody rate="-5%" pitch="-1st">
      I am here with you. We will take one small step.
    </prosody>
    <break time="300ms"/>
    <prosody rate="-5%" pitch="-1st">
      If things feel intense, we can pause.
    </prosody>
  </voice>
</speak>`;

const res = await fetch(`https://${region}.tts.speech.microsoft.com/cognitiveservices/v1`, {
  method: "POST",
  headers: {
    "Ocp-Apim-Subscription-Key": key,
    "Content-Type": "application/ssml+xml",
    "X-Microsoft-OutputFormat": "audio-16khz-32kbitrate-mono-mp3",
  },
  body: ssml,
});
const audioBuffer = await res.arrayBuffer();