feat(voice): speak every intervention, not just critical escalations
Voice was gated to severity === 'critical', so most conflict cards were silent. Now every intervention is spoken: priority is derived from severity in publishHermesIntervention — critical jumps the queue, the rest serialize so concurrent alerts don't garble each other. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuV8W8oNYRsDWKoqK8Mkqc
This commit is contained in:
@@ -58,7 +58,10 @@ export async function publishHermesIntervention(
|
|||||||
void notifyCriticalLiveConversations(collision, intervention, voiceLine).catch((err) =>
|
void notifyCriticalLiveConversations(collision, intervention, voiceLine).catch((err) =>
|
||||||
console.warn(`[live-conversation] critical notify failed: ${(err as Error).message}`),
|
console.warn(`[live-conversation] critical notify failed: ${(err as Error).message}`),
|
||||||
);
|
);
|
||||||
if (voiceLine) await speak(room, voiceLine, { priority: 'critical' });
|
if (voiceLine)
|
||||||
|
await speak(room, voiceLine, {
|
||||||
|
priority: collision.severity === 'critical' ? 'critical' : 'normal',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function hermesToken(roomName: string): Promise<string> {
|
async function hermesToken(roomName: string): Promise<string> {
|
||||||
|
|||||||
@@ -244,11 +244,9 @@ export class PodMan {
|
|||||||
};
|
};
|
||||||
await recordIntervention(intervention);
|
await recordIntervention(intervention);
|
||||||
|
|
||||||
await publishHermesIntervention(
|
// Voice every intervention, not just critical escalations. Priority is set
|
||||||
this.room,
|
// by severity inside publishHermesIntervention: critical jumps the queue,
|
||||||
collision,
|
// the rest play sequentially so concurrent alerts don't garble each other.
|
||||||
intervention,
|
await publishHermesIntervention(this.room, collision, intervention, voiceLine);
|
||||||
collision.severity === 'critical' ? voiceLine : undefined,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user