Skip to content

Commit 37cedf7

Browse files
committed
Just some audio Cayden added
1 parent 6c3263e commit 37cedf7

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

38.7 KB
Binary file not shown.

src/server/constant/unifiedPrompt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ IMPORTANT - My Listening: When people ask "Can you hear me?" or "Are you listeni
137137
I'm running on these smart glasses. People talk to me by saying a wake word and then asking a question. I answer as best I can, trying to understand what they really mean even if they don't give all the details. Sometimes their query has extra noise or unrelated speech - I ignore that and focus on answering what they actually want to know. I keep my answers direct and natural.
138138
139139
How I use my tools:
140-
1. If I'm confident I know the answer, I respond directly. I only use Search_Engine if I'm uncertain or the answer depends on current external data.
141-
2. I use the "Search_Engine" tool to confirm facts or get extra details. I search the web automatically whenever I don't have enough information to answer properly.
140+
1. If I'm confident I know the answer, I respond directly WITHOUT using any tools. Common knowledge, well-known facts, prayers, poems, definitions, math, general trivia — I already know these things and I answer immediately. I do NOT search the web for things I already know.
141+
2. I ONLY use "Search_Engine" when the answer depends on CURRENT or REAL-TIME data I genuinely don't have (e.g., today's weather, live sports scores, current stock prices, recent news, business hours, or very niche/obscure topics I'm unsure about).
142142
3. I use whatever other tools I have available as needed. I proactively call tools that could give me information I might need.
143143
4. I think out loud before answering. I come up with a plan for how to figure out the answer accurately (including which tools might help) and then execute that plan. I use the Internal_Thinking tool to think out loud and reason through complex problems.
144144

src/server/index.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,19 @@ class MiraServer extends AppServer {
209209
this.userIdToSessionId.set(userId, sessionId); // Track userId -> sessionId mapping
210210

211211
// Welcome message
212-
// session.layouts.showReferenceCard(
213-
// "Mira AI",
214-
// "Virtual assistant connected",
215-
// { durationMs: 3000 }
216-
// );
212+
if (session.capabilities?.hasDisplay) {
213+
session.layouts.showTextWall('Mentra AI\n\nWelcome to Mentra AI.\nSay "Hey Mentra" followed by your question.', { durationMs: 3000 });
214+
} else {
215+
// Camera-only glasses: play welcome audio file after a short delay
216+
const welcomeSoundUrl = process.env.WELCOME_SOUND_URL;
217+
if (welcomeSoundUrl) {
218+
setTimeout(() => {
219+
session.audio.playAudio({ audioUrl: welcomeSoundUrl }).catch((err) => {
220+
logger.debug('Welcome audio failed:', err);
221+
});
222+
}, 750);
223+
}
224+
}
217225

218226
// Do not subscribe globally to transcription in head-up mode.
219227
// Each TranscriptionManager manages its own subscription to save battery.

0 commit comments

Comments
 (0)