Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frontend/src/hooks/useVoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@
}

// Try streaming path: streaming recorder + WS client
const wsUrl = YAPPER_URL.replace(/^http/, 'ws') + '/v1/transcribe/stream';
// HTTP proxy is at /api/yapper; WS proxy is at /api/yapper-ws
const wsUrl =
YAPPER_URL.replace(/^http/, 'ws').replace('/api/yapper', '/api/yapper-ws') +
'/v1/transcribe/stream';
const wsClient = createYapperStreamClient(wsUrl);
wsClientRef.current = wsClient;
streamingActiveRef.current = true;
Expand Down Expand Up @@ -244,7 +247,7 @@
setError(err instanceof Error ? err.message : 'Mic access failed');
}
}
}, []);

Check warning on line 250 in frontend/src/hooks/useVoice.ts

View workflow job for this annotation

GitHub Actions / ci

React Hook useCallback has a missing dependency: 'setPartialTranscript'. Either include it or remove the dependency array

const stopRecording = useCallback(async (): Promise<string> => {
setRecording(false);
Expand Down Expand Up @@ -319,7 +322,7 @@
streamingActiveRef.current = false;
releaseStream();
}
}, [releaseStream]);

Check warning on line 325 in frontend/src/hooks/useVoice.ts

View workflow job for this annotation

GitHub Actions / ci

React Hook useCallback has a missing dependency: 'setPartialTranscript'. Either include it or remove the dependency array

const cancelRecording = useCallback(() => {
// Clean up streaming
Expand All @@ -338,7 +341,7 @@
setRecording(false);
setTranscribing(false);
setPartialTranscript('');
}, [releaseStream]);

Check warning on line 344 in frontend/src/hooks/useVoice.ts

View workflow job for this annotation

GitHub Actions / ci

React Hook useCallback has a missing dependency: 'setPartialTranscript'. Either include it or remove the dependency array

// --- TTS: Voice list ---
const fetchVoices = useCallback(async () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const MAX_IMAGE_ATTACHMENTS = 4;
// --- Voice / Yapper ---
export const YAPPER_URL =
import.meta.env.VITE_YAPPER_URL ||
`http://${typeof window !== 'undefined' ? window.location.hostname : 'localhost'}:8700`;
`${typeof window !== 'undefined' ? `${window.location.protocol}//${window.location.host}` : 'http://localhost'}/api/yapper`;
export const YAPPER_HEALTH_POLL_MS = 30_000;
export const MAX_RECORDING_DURATION_MS = 120_000;
export const MIN_RECORDING_DURATION_MS = 500;
Expand Down
156 changes: 152 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"express": "^4.21.0",
"express-rate-limit": "^8.3.2",
"helmet": "^8.1.0",
"http-proxy-middleware": "^3.0.5",
"jose": "^5.9.0",
"nanoid": "^5.0.9",
"ws": "^8.18.0",
Expand Down
Loading
Loading