Recommended: Cloud Shell, simpler storage
Run one script, grant the service account Storage Admin, and leave Lirivo's output bucket field blank. Lirivo can then create or reuse its managed bucket.
Google Cloud
Lirivo works with built-in iPhone voices right away. For the full cloud-voice experience, set up your own Google Cloud project so Lirivo can use natural Google voices and save generated audio files for offline listening.
The guide is long because it gives you choices. The setup itself is just a way to give Lirivo a limited Google Cloud identity and permission to use the few Google services it needs.
A Google API key is simpler, but it cannot cover the full Lirivo Google workflow because generated audio needs Google Cloud Storage. That is why the recommended setup uses a service account. Optional Gemini TTS is one extra permission for people who want prompted Google voices for direct playback.
Use the Cloud Shell setup first. It creates the Google Cloud pieces in one place, gives you the service-account JSON Lirivo needs, and avoids clicking through several Console screens. The manual setup below does the same thing with more clicks.
Choose the storage option that matches how much control you want: let Lirivo create its own bucket for the easiest setup, or create a bucket yourself if you want narrower storage permissions.
Run one script, grant the service account Storage Admin, and leave Lirivo's output bucket field blank. Lirivo can then create or reuse its managed bucket.
Run a script that creates one dedicated bucket and grants Storage Object User only on that bucket. Then enter that exact bucket name in Lirivo.
Use the same two storage choices, but create the service account, key, roles, and bucket through Google Cloud Console screens.
At the end of setup, Lirivo needs a service-account JSON file. Think of it as a key for one app-specific Google identity. It lets Lirivo call Google Cloud directly from your iPhone without using a Lirivo-operated backend.
For generated audio, Lirivo also needs one of these storage arrangements:
roles/storage.admin.gs://.If Lirivo's managed-bucket naming changes in a future app version, the explicit bucket-name path still works because the contract is the same: the bucket exists, the service account can manage objects in it, and the exact bucket name is saved in Lirivo.
Cloud providers are optional. Lirivo does not sell Google Cloud credits; Google usage, quotas, billing, free-tier eligibility, and API availability belong to your Google Cloud account.
This is the shortest full setup. It is a good fit when this Google Cloud project and service account are dedicated to Lirivo, and you are comfortable giving the service account broad Cloud Storage control inside the project.
Open Google Cloud Shell, select the project you want Lirivo to use, review the variables, then run:
PROJECT_ID="your-google-cloud-project-id"
SERVICE_ACCOUNT_ID="lirivo-tts"
SERVICE_ACCOUNT_EMAIL="$SERVICE_ACCOUNT_ID@$PROJECT_ID.iam.gserviceaccount.com"
KEY_FILE="$HOME/lirivo-google-service-account.json"
gcloud config set project "$PROJECT_ID"
gcloud services enable \
texttospeech.googleapis.com \
storage.googleapis.com
gcloud iam service-accounts create "$SERVICE_ACCOUNT_ID" \
--display-name="Lirivo Text-to-Speech"
# Allows Lirivo to create, inspect, and manage its own Cloud Storage bucket.
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
--role="roles/storage.admin"
# Text-to-Speech IAM roles apply to Long Audio Synthesis API access.
# If this role is not available in your project, use Google Cloud Console
# to grant the current Text-to-Speech Editor role, or ask your admin.
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
--role="roles/texttospeech.editor"
gcloud iam service-accounts keys create "$KEY_FILE" \
--iam-account="$SERVICE_ACCOUNT_EMAIL"
echo "Import this JSON file into Lirivo:"
echo "$KEY_FILE"
echo "In Lirivo, leave Google Output Bucket blank."
In Lirivo, import the JSON file in Settings, Cloud Providers, Google Cloud. Leave the output bucket field blank. Lirivo will create or reuse its managed bucket and show the resulting bucket state in the app.
Use this route when you want narrower storage permissions. The script creates a dedicated bucket, gives the service account object access only on that bucket, and prints the bucket name to enter in Lirivo.
PROJECT_ID="your-google-cloud-project-id"
SERVICE_ACCOUNT_ID="lirivo-tts"
SERVICE_ACCOUNT_EMAIL="$SERVICE_ACCOUNT_ID@$PROJECT_ID.iam.gserviceaccount.com"
BUCKET_NAME="lirivo-tts-audio-$PROJECT_ID"
BUCKET_LOCATION="US"
KEY_FILE="$HOME/lirivo-google-service-account.json"
gcloud config set project "$PROJECT_ID"
gcloud services enable \
texttospeech.googleapis.com \
storage.googleapis.com
gcloud iam service-accounts create "$SERVICE_ACCOUNT_ID" \
--display-name="Lirivo Text-to-Speech"
gcloud storage buckets create "gs://$BUCKET_NAME" \
--project="$PROJECT_ID" \
--location="$BUCKET_LOCATION" \
--uniform-bucket-level-access
gcloud storage buckets add-iam-policy-binding "gs://$BUCKET_NAME" \
--member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
--role="roles/storage.objectUser"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
--role="roles/texttospeech.editor"
gcloud iam service-accounts keys create "$KEY_FILE" \
--iam-account="$SERVICE_ACCOUNT_EMAIL"
echo "Import this JSON file into Lirivo:"
echo "$KEY_FILE"
echo "Enter this exact Google Output Bucket name in Lirivo:"
echo "$BUCKET_NAME"
The bucket name can be anything valid and globally unique. If you change BUCKET_NAME, enter the changed name exactly in Lirivo. Use only the bucket name, not gs:// and not a URL.
Run this only if you want the service account to be ready for Gemini TTS voices. Ordinary Google voices do not need this permission.
gcloud services enable aiplatform.googleapis.com
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \
--role="roles/aiplatform.user"
Gemini TTS is most useful when you want to tell the voice how to read: try calmer delivery for dense notes, clearer pronunciation for technical terms, or translating first and listening to the translation. In Lirivo, Gemini voices are for direct playback experiments, not generated long-audio jobs. Google's current Cloud Text-to-Speech pricing page lists Gemini TTS free usage as not available, so check pricing before using it heavily.
Use this section if you prefer clicking through Google Cloud Console, or if an administrator needs to review each grant.
Open Google Cloud Console, select the project, confirm billing is enabled, then enable Cloud Text-to-Speech API and Cloud Storage API.
Open IAM & Admin, Service Accounts, then create a dedicated service account such as lirivo-tts. Do not give it Owner or Editor.
If you want Lirivo to create the bucket, grant the service account Storage Admin on the project. In Lirivo, leave the Google output bucket field blank.
If you want narrower storage permissions, create one Cloud Storage bucket for Lirivo, open that bucket's Permissions, and grant the service account Storage Object User. In Lirivo, enter that exact bucket name.
For generated long audio, grant the current Google Text-to-Speech Editor role if it is visible in your project. Google's access-control page says Text-to-Speech IAM roles apply to the Long Audio Synthesis API, not the original synchronous synthesis API.
Open the service account, go to Keys, choose Add key, Create new key, select JSON, and create the key. Google downloads the file once. Keep it private.
Import or paste the service-account JSON in Lirivo. If you created the bucket yourself, also save the exact bucket name. If you granted Storage Admin for the managed-bucket path, leave the output bucket field blank.
An API key is a lighter Google setup path for people who specifically want it. It is not the recommended full setup, and it does not unlock long-audio generation, managed buckets, service-account IAM, or the full Google feature set.
This path has lighter support from Lirivo than the service-account path and may change in a future version.
Use a different SERVICE_ACCOUNT_ID, or reuse the existing service account and skip the create command. If you reuse it, review its current roles before creating another key.
Bucket names are globally unique across Google Cloud. Change BUCKET_NAME to something unique, rerun the bucket commands, and enter the final printed bucket name in Lirivo.
Check that you downloaded a JSON key for a service account, not an API key, OAuth client, or billing export. The JSON should include fields such as type, project_id, client_email, and private_key.
If the output bucket field is blank, confirm the service account has broad enough storage permissions to create or inspect the managed bucket. If you entered a bucket name, confirm the service account has Storage Object User on that exact bucket and that the name does not include gs://.
Your organization may block long-lived service-account keys. Ask your Google Cloud admin whether key creation is allowed for this project. For personal projects, check IAM organization policies and service-account key restrictions.
Ordinary Google voices may still work. Check that Agent Platform or Vertex AI is enabled, that the service account has a role containing aiplatform.endpoints.predict, and that your project is eligible for the Gemini TTS model and region you are trying to use.