#pragma once // Picks the three voice parts for a credential. One switch, three backends: // kCloud classic Cloud Text-to-Speech + Speech-to-Text (need OAuth or an // old-style key) with Gemini on generativelanguage for replies // kGemini Gemini audio in/out on generativelanguage (AI Studio key) // kVertex Gemini audio in/out on Vertex AI (express key, "AQ." prefix) #include #include #include "google/client.h" #include "google/voice.h" namespace molo::google { enum class VoiceBackend { kCloud, kGemini, kVertex }; const char* voice_backend_name(VoiceBackend backend); // GOOGLE_API_BACKEND (cloud|gemini|vertex) wins; else keys starting with // "AQ." are Vertex express keys; everything else is classic cloud. VoiceBackend voice_backend_from_env(); struct VoiceParts { std::shared_ptr recognizer; std::shared_ptr responder; std::shared_ptr synthesizer; }; VoiceParts make_voice_parts(std::shared_ptr client, VoiceBackend backend); } // namespace molo::google