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:
2026-10-24 04:05:41 +02:00
co-authored by Claude Sonnet 5.5
parent dd773d3015
commit 837de58136
54 changed files with 3086 additions and 21 deletions
+14 -1
View File
@@ -4,9 +4,11 @@
// test file owns one main() and uses these helpers for loud assertions.
#include <iostream>
#include <optional>
#include <string>
#include "app/App.hpp"
#include "google/client.h"
#include "fw/TestClient.hpp"
namespace molo::example::test {
@@ -40,7 +42,18 @@ struct Fixture {
std::shared_ptr<molo::example::fw::Application> app;
std::shared_ptr<molo::example::fw::TestClient> client;
Fixture() {
Fixture() : Fixture(nullptr) {}
// A scripted Google client can be injected (see support/GoogleRig.hpp).
// Null builds the client from the environment like production. Scripted
// clients default to the classic cloud wire paths; pass a backend to test
// the Gemini ones.
explicit Fixture(std::shared_ptr<molo::google::GoogleClient> google,
std::optional<molo::google::VoiceBackend> backend =
std::nullopt) {
if (google && !backend) backend = molo::google::VoiceBackend::kCloud;
services.voice_backend = backend;
services.google = std::move(google);
app = molo::example::app::build_application(services);
client = std::make_shared<molo::example::fw::TestClient>(app);
}