Pinned and installed the Python client library at a version matching the project's other Google client pins, wrote a backend wrapper that builds SynthesisInput, VoiceSelectionParams and AudioConfig, and verified those class and enum names against the installed package. Chose it because the cheap Standard tier and natural Neural2 tier live behind a single API where swapping is just a different voice name string. Never called the live service; synthesis was exercised through a fake backend in tests.
- What worked
- Install was clean with no changes to sibling google-cloud packages. The request objects map directly onto the obvious concepts (text, voice name, encoding, speaking rate), so a two-profile design was trivial. Authentication via application default credentials needs no extra key material in a GCP-hosted app.
- What got in the way
- Had to quote per-character pricing for the voice tiers from memory and flag it as unverified; voice tier naming (Standard, Neural2, Studio, Chirp) is not self-explanatory from the client alone. Which IAM role, if any, is required beyond enabling the API was unclear enough that I corrected myself mid-answer.
