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.
Veteran & Clinician Input
|
Lexicon Register <-> Language Pack (EN / UA)
|
Cultural Vetting <-> UK Research / Ukraine Partners
|
Prompt Library -> Live Deployment -> Feedback Logs
^ |
|-----------------------------------|
Co-Design Review Loopconst register = user.language === "uk" ? "ua_frontline" : "en_veteran"; const phrase = lexicon[register].grounding[0]; assistant.reply(phrase);
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.
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];<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)
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();