feat: cheapest pipeline — gpt-4o-mini-transcribe + gpt-5.4-nano + TTS

Simple 3-step chat completions pipeline at ~/usr/bin/bash.019/min total.
Streams PCM16 audio from frontend, transcribes on release,
generates response via gpt-5.4-nano, speaks via OpenAI TTS.

Cost breakdown:
  gpt-4o-mini-transcribe: /usr/bin/bash.003/min
  gpt-5.4-nano:          ~/usr/bin/bash.001/min
  OpenAI TTS (nova):     /usr/bin/bash.015/min
  Total:                 ~/usr/bin/bash.019/min (~/usr/bin/bash.57/day at 30min)
This commit is contained in:
2026-06-04 13:51:35 -04:00
parent 66e799a655
commit f2a5416408
3 changed files with 167 additions and 356 deletions
+5
View File
@@ -272,6 +272,11 @@ export function useConversation() {
streamRef.current?.getTracks().forEach((t) => t.stop());
streamRef.current = null;
setIsRecording(false);
// Tell backend to process accumulated audio
if (wsRef.current?.readyState === WebSocket.OPEN) {
wsRef.current.send(JSON.stringify({ type: 'transcribe' }));
}
}, []);
// ── Text ──