voice: quieter thinking tone, log cleanup, and small ui polish

- Add scripts/lower-thinking-tone.mjs to scale the thinking-tone PCM
  amplitude in-place; apply it at 0.1 so the cue is a soft indicator
  instead of triggering the VAD via mic feedback.
- Drop the "Received first voice_audio_chunk" log that re-fires every
  summary window because the chunk counter is reset.
- Match Spoke message icon and label sizing to the standard tool-call
  badge.
- Append a spoken-input instruction so voice replies route through the
  speak tool.
This commit is contained in:
Mohamed Boudra
2026-05-05 19:56:51 +07:00
parent 91865ba66e
commit e22b497a08
5 changed files with 62 additions and 14 deletions
-9
View File
@@ -7546,15 +7546,6 @@ export class Session {
const chunkBytes = Buffer.byteLength(msg.audio, "base64");
this.voiceInputChunkCount += 1;
this.voiceInputBytes += chunkBytes;
if (this.voiceInputChunkCount === 1) {
this.sessionLogger.info(
{
format: chunkFormat,
audioBytes: chunkBytes,
},
"Received first voice_audio_chunk for active voice mode",
);
}
const now = Date.now();
if (this.voiceInputChunkCount % 50 === 0 || now - this.voiceInputWindowStartedAt >= 1000) {
this.sessionLogger.info(
+1 -1
View File
@@ -54,7 +54,7 @@ export function buildVoiceModeSystemPrompt(existing: string | undefined, enabled
}
export function wrapSpokenInput(text: string): string {
return `<spoken-input>\n${text}\n</spoken-input>`;
return `<spoken-input>\n${text}\n</spoken-input>\n<instruction>This message was spoken by the user. Respond using the speak tool only, not normal messages, because the user may not be looking at the chat.</instruction>`;
}
export function buildVoiceAgentMcpServerConfig(params: {