
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
@base83/speak-easy
Advanced tools
The most developer-friendly Gemini AI TTS engine for Node.js and TypeScript.
Welcome to Speak Easy TTS – your playful, powerful, and easy-to-use text-to-speech engine powered by Gemini AI! This package is designed for a top-tier developer experience with a modern, fully-typed API, robust error handling, and fun, expressive features.
For the CLI:
npm install -g @base83/speak-easy
For the library:
npm install @base83/speak-easy
# Ensure your GEMINI_API_KEY is set in your environment
export GEMINI_API_KEY="YOUR_API_KEY"
# Run from the CLI
speak-easy "Hello from Speak Easy!"
# Basic synthesis
speak-easy "Hello from the CLI!"
# With options
speak-easy "Bonjour le monde!" --voice Puck --language fr-FR --output bonjour.mp3
# Using cache for repeated requests
speak-easy "This will be cached" --use-cache
import { TtsEngine } from '@base83/speak-easy';
const engine = new TtsEngine({ apiKey: process.env.GEMINI_API_KEY, debug: true });
await engine.synthesizeToFile({ text: 'Hello world!' });
import { TtsEngine } from '@base83/speak-easy';
const engine = new TtsEngine({ apiKey: process.env.GEMINI_API_KEY });
const { filePath } = await engine.synthesizeToFile({ text: 'Hello from the library!' });
console.log(`Audio saved to: ${filePath}`);
import { TtsEngine, getRandomVoice } from '@base83/speak-easy';
const engine = new TtsEngine({ apiKey: process.env.GEMINI_API_KEY });
const voice = getRandomVoice();
await engine.synthesizeToFile({ text: 'A random voice is fun!', voice });
// To Buffer
const { buffer } = await engine.synthesizeToBuffer({ text: 'This is a buffer.' });
// To Stream
const { stream } = await engine.synthesizeToStream({ text: 'This is a stream.' });
stream.pipe(process.stdout);
Enable caching to save time and API calls on repeated requests.
const engine = new TtsEngine({ apiKey: process.env.GEMINI_API_KEY, useCache: true });
await engine.synthesizeToFile({ text: 'This will be cached.' });
await engine.synthesizeToFile({ text: 'This will be cached.' }); // This one will be much faster!
Use files as prompts for synthesis.
const fileMeta = await engine.uploadFile({ file: 'image.png', mimeType: 'image/png' });
await engine.synthesizeToFile({ file: fileMeta, prompt: 'Describe this image for me.' });
Customize the engine with hooks, a default voice, and your own logger.
const engine = new TtsEngine({
apiKey: process.env.GEMINI_API_KEY,
defaultVoice: 'Puck',
useCache: true,
hooks: {
beforeSynthesize: (opts) => console.log('Starting job...'),
afterSynthesize: (res) => console.log(`Finished with ${res.voice}!`),
}
});
All errors are playful and descriptive! For example:
🛑 Oops! No API key found for your TTS adventure.
Set GEMINI_API_KEY in your environment or pass it to the TtsEngine constructor. The magic won't work without it! 🪄
debug: true option for extra fun logs.synthesizeToFile method will auto-generate a filename if you don't provide one.PRs and ideas welcome! Let's make TTS more fun for everyone.
Go forth and synthesize with style! 🚀
FAQs
The most developer-friendly Gemini AI TTS engine for Node.js and TypeScript.
We found that @base83/speak-easy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.