Mike0021 commited on
Commit
ab4ce46
·
verified ·
1 Parent(s): f887eae

Use stable synthetic loopback prompt

Browse files
Files changed (1) hide show
  1. app.js +2 -1
app.js CHANGED
@@ -115,6 +115,7 @@ const MIN_VAD_SILENCE_MS = 200;
115
  const MAX_VAD_SILENCE_MS = 800;
116
  const DEFAULT_LOOPBACK_SPEED = 1.0;
117
  const DEFAULT_LOOPBACK_PREROLL_MS = 180;
 
118
  const MIC_START_TIMEOUT_MS = 15000;
119
  const WEBGPU_ADAPTER_TIMEOUT_MS = 5000;
120
  const DEFAULT_TTS_CHUNKING = Object.freeze({
@@ -2092,7 +2093,7 @@ function runLoopbackBenchmark(options = {}) {
2092
  state.lastVadCloseAt = null;
2093
  state.lastVadCloseDelayMs = null;
2094
  state.loopbackRequestId += 1;
2095
- const text = APP_IDENTITY_PROMPT;
2096
  startBenchmark("loopback", text);
2097
  elements.partialTranscript.textContent = "Synthesizing local loopback speech...";
2098
  elements.finalTranscript.textContent = "";
 
115
  const MAX_VAD_SILENCE_MS = 800;
116
  const DEFAULT_LOOPBACK_SPEED = 1.0;
117
  const DEFAULT_LOOPBACK_PREROLL_MS = 180;
118
+ const DEFAULT_LOOPBACK_PROMPT = "What application is this?";
119
  const MIC_START_TIMEOUT_MS = 15000;
120
  const WEBGPU_ADAPTER_TIMEOUT_MS = 5000;
121
  const DEFAULT_TTS_CHUNKING = Object.freeze({
 
2093
  state.lastVadCloseAt = null;
2094
  state.lastVadCloseDelayMs = null;
2095
  state.loopbackRequestId += 1;
2096
+ const text = typeof options?.text === "string" && options.text.trim() ? options.text.trim() : DEFAULT_LOOPBACK_PROMPT;
2097
  startBenchmark("loopback", text);
2098
  elements.partialTranscript.textContent = "Synthesizing local loopback speech...";
2099
  elements.finalTranscript.textContent = "";