How to Create a Google API Key for Text-to-Speech (TTS)
How to Create a Google API Key for Text-to-Speech (TTS)
VoicePen AI uses Google Cloud Text-to-Speech (TTS) as an optional feature to convert text into natural-sounding speech. This guide shows you how to create a Google API key and connect it to the extension.
1. Create a Google Cloud Account
To use Google Text-to-Speech, you need a Google Cloud account.
Go to the official Google Cloud console:
Google Cloud Console
Sign in with your Google account and accept the terms if prompted.
2. Create a New Project
Every API key belongs to a project.
Click the project dropdown at the top bar
Select “New Project”
Give it a name (e.g., VoicePen TTS)
Click Create
3. Enable the Text-to-Speech API
Now you need to enable the Google Text-to-Speech API.
Go here:
Enable Text-to-Speech API
Make sure your project is selected
Click Enable
Google may ask you to enable billing. This is required for API usage.
4. Create an API Key
Now generate your API key:
Go to: Google Credentials Page
Click “Create Credentials”
Select “API Key”
Copy your API key
Important:
Restrict your API key for security (recommended)
Do not expose it publicly
Do not commit it to GitHub
6. Add API Key to VoicePen AI Extension
Now connect your Google TTS API key:
Steps inside the extension:
Open VoicePen AI extension
Go to AI API Keys
Find Google TTS API Key
Paste your API key
Click Save and Test connection
Once saved, VoicePen AI can use Google’s neural voices for text-to-speech. Go to settings > Notes and Dictate and enable TTS
7. Troubleshooting
“API key not valid”
Make sure you copied the full key
Ensure Text-to-Speech API is enabled
“Permission denied”
Check billing is enabled
Verify API restrictions allow TTS
No audio output
Check internet connection
Ensure extension has the correct key saved
Final Notes
Google Text-to-Speech provides high-quality voice synthesis and is completely optional in VoicePen AI. Once configured, it allows the extension to generate natural-sounding speech from text in real time.