Update files
This commit is contained in:
@@ -102,6 +102,39 @@ Get the session ID from the agent JSON file (`persistence.sessionId`), then:
|
|||||||
|
|
||||||
Take screenshots like this: `adb exec-out screencap -p > screenshot.png`
|
Take screenshots like this: `adb exec-out screencap -p > screenshot.png`
|
||||||
|
|
||||||
|
### Android variants (vanilla Expo)
|
||||||
|
|
||||||
|
Use `APP_VARIANT` in `packages/app/app.config.js` to control app name + package ID (no custom Gradle flavor plugin):
|
||||||
|
|
||||||
|
- `prod` -> app name `Paseo`, package `sh.paseo`
|
||||||
|
- `debug` -> app name `Paseo Debug`, package `sh.paseo.debug`
|
||||||
|
- `fast` -> app name `Paseo Dev`, package `sh.paseo.dev`
|
||||||
|
|
||||||
|
EAS profiles live in `packages/app/eas.json` as `prod`, `debug`, and `fast`.
|
||||||
|
|
||||||
|
`fast` uses Android `debugOptimized` for better runtime performance while still supporting Metro/Fast Refresh.
|
||||||
|
|
||||||
|
### Local build + install (Android device)
|
||||||
|
|
||||||
|
From `packages/app`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# prod (release)
|
||||||
|
APP_VARIANT=prod npx expo prebuild --platform android --clean --no-install
|
||||||
|
(cd android && ./gradlew app:assembleRelease)
|
||||||
|
adb install -r android/app/build/outputs/apk/release/app-release.apk
|
||||||
|
|
||||||
|
# debug (full debug tooling)
|
||||||
|
APP_VARIANT=debug npx expo prebuild --platform android --clean --no-install
|
||||||
|
(cd android && ./gradlew app:assembleDebug)
|
||||||
|
adb install -r android/app/build/outputs/apk/debug/app-debug.apk
|
||||||
|
|
||||||
|
# fast (debugOptimized + Metro/Fast Refresh)
|
||||||
|
APP_VARIANT=fast npx expo prebuild --platform android --clean --no-install
|
||||||
|
(cd android && ./gradlew app:assembleDebugOptimized)
|
||||||
|
adb install -r android/app/build/outputs/apk/debugOptimized/app-debugOptimized.apk
|
||||||
|
```
|
||||||
|
|
||||||
## Testing with Playwright MCP
|
## Testing with Playwright MCP
|
||||||
|
|
||||||
**CRITICAL:** When asked to test the app, you MUST use the Playwright MCP connecting to Metro at `http://localhost:8081`.
|
**CRITICAL:** When asked to test the app, you MUST use the Playwright MCP connecting to Metro at `http://localhost:8081`.
|
||||||
|
|||||||
@@ -3,13 +3,9 @@ import { useSpeechmaticsAudio } from "@/hooks/use-speechmatics-audio";
|
|||||||
import type { SessionState } from "@/stores/session-store";
|
import type { SessionState } from "@/stores/session-store";
|
||||||
import { useSessionStore } from "@/stores/session-store";
|
import { useSessionStore } from "@/stores/session-store";
|
||||||
import { activateKeepAwakeAsync, deactivateKeepAwake } from "expo-keep-awake";
|
import { activateKeepAwakeAsync, deactivateKeepAwake } from "expo-keep-awake";
|
||||||
|
import { REALTIME_VOICE_VAD_CONFIG } from "@/voice/realtime-voice-config";
|
||||||
|
|
||||||
const KEEP_AWAKE_TAG = "paseo:voice";
|
const KEEP_AWAKE_TAG = "paseo:voice";
|
||||||
const VOICE_VAD_VOLUME_THRESHOLD = 0.18;
|
|
||||||
const VOICE_VAD_SILENCE_DURATION_MS = 1400;
|
|
||||||
const VOICE_VAD_SPEECH_CONFIRMATION_MS = 120;
|
|
||||||
const VOICE_VAD_DETECTION_GRACE_PERIOD_MS = 700;
|
|
||||||
|
|
||||||
interface VoiceContextValue {
|
interface VoiceContextValue {
|
||||||
isVoiceMode: boolean;
|
isVoiceMode: boolean;
|
||||||
isVoiceSwitching: boolean;
|
isVoiceSwitching: boolean;
|
||||||
@@ -137,10 +133,10 @@ export function VoiceProvider({ children }: VoiceProviderProps) {
|
|||||||
console.error("[Voice] Cannot handle error - setMessages not available from SessionState");
|
console.error("[Voice] Cannot handle error - setMessages not available from SessionState");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
volumeThreshold: VOICE_VAD_VOLUME_THRESHOLD,
|
volumeThreshold: REALTIME_VOICE_VAD_CONFIG.volumeThreshold,
|
||||||
silenceDuration: VOICE_VAD_SILENCE_DURATION_MS,
|
silenceDuration: REALTIME_VOICE_VAD_CONFIG.silenceDurationMs,
|
||||||
speechConfirmationDuration: VOICE_VAD_SPEECH_CONFIRMATION_MS,
|
speechConfirmationDuration: REALTIME_VOICE_VAD_CONFIG.speechConfirmationMs,
|
||||||
detectionGracePeriod: VOICE_VAD_DETECTION_GRACE_PERIOD_MS,
|
detectionGracePeriod: REALTIME_VOICE_VAD_CONFIG.detectionGracePeriodMs,
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export const REALTIME_VOICE_VAD_CONFIG = {
|
||||||
|
volumeThreshold: 0.18,
|
||||||
|
silenceDurationMs: 2200,
|
||||||
|
speechConfirmationMs: 120,
|
||||||
|
detectionGracePeriodMs: 700,
|
||||||
|
} as const;
|
||||||
|
|
||||||
Reference in New Issue
Block a user