feat(clients): google cloud voice: generic client, TTS, STT, Gemini audio, live voice page
src/google: GoogleClient over molo::clients (key in x-goog-api-key, never in
URLs), Service base, TextToSpeech, SpeechToText, Generative (replies, audio
in, audio out), Recognizer/Synthesizer seams with cloud, gemini and vertex
backends, VoicePipeline with bounded history. Example: /voice live
conversation page, /voice/{say,hear,turn,reset}, /google/status. Keys load
from env, .env.json.local, .env.json. Paid routes are excluded from locust.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,3 +76,29 @@ label.inline input { padding: 0; }
|
||||
.nav-wide { display: flex; }
|
||||
.nav-narrow { display: none; }
|
||||
}
|
||||
|
||||
/* Voice conversation page */
|
||||
.voice { display: flex; flex-direction: column; gap: 0.75rem; }
|
||||
.voice-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
|
||||
.voice-controls button.primary { flex: 1 1 12rem; padding: 0.8rem 1rem; font-weight: 600;
|
||||
border: 0; border-radius: 6px; background: var(--series-1); color: #fff; }
|
||||
.voice-controls button.primary.live { background: var(--series-8); }
|
||||
.voice-controls button:disabled { opacity: 0.5; }
|
||||
.voice-controls select { font-size: 1rem; padding: 0.4rem; }
|
||||
.voice-state { display: flex; align-items: center; gap: 0.75rem; }
|
||||
.pill { min-width: 6rem; text-align: center; padding: 0.2rem 0.6rem; border-radius: 1rem;
|
||||
border: 1px solid var(--border); color: var(--text-secondary); }
|
||||
.pill.listening { border-color: var(--series-3); color: var(--series-3); }
|
||||
.pill.hearing { border-color: var(--series-2); color: var(--series-2); }
|
||||
.pill.thinking { border-color: var(--series-4); color: var(--series-4); }
|
||||
.pill.speaking { border-color: var(--series-1); color: var(--series-1); }
|
||||
.meter { flex: 1; height: 0.6rem; border: 1px solid var(--border); border-radius: 0.3rem; overflow: hidden; }
|
||||
.meter > div { height: 100%; width: 0; background: var(--series-3); }
|
||||
.voice-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
|
||||
gap: 0.4rem; max-height: 22rem; overflow-y: auto; }
|
||||
.voice-log li { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 6px;
|
||||
overflow-wrap: anywhere; }
|
||||
.voice-log li.you { border-left: 4px solid var(--series-2); }
|
||||
.voice-log li.bot { border-left: 4px solid var(--series-1); }
|
||||
.voice-form { flex-direction: row; flex-wrap: wrap; max-width: none; }
|
||||
.voice-form input[type="text"] { flex: 1 1 12rem; min-width: 0; }
|
||||
|
||||
Reference in New Issue
Block a user