Skip to content

Repository files navigation

Perplexity BYOK TTS — Speak Extension

Free, open-source, Bring-Your-Own-Key text-to-speech for Perplexity AI.

An MIT-licensed Chrome Extension (Manifest V3) that injects a native-looking Play button into Perplexity AI's answer action bar (alongside Copy/Share). Bring your own API key from any TTS provider — OpenAI-compatible or not — and have answers read aloud.

  • Zero cost to run — no backend, no telemetry, no monetization. Your keys stay in chrome.storage.
  • Pluggable adapters — 12 built-in providers (OpenAI, Groq, Gemini, ElevenLabs, Azure, Polly, Deepgram, Cartesia, Hume, Rime, Unreal Speech, Inworld) + unlimited custom OpenAI-compatible endpoints.
  • Auditable build — Chrome Web Store zip is byte-identical to the GitHub repo. What you see is what you get.

Installation (Developer Mode)

  1. Clone: git clone https://github.com/your-org/perplexity-byok-tts.git
  2. npm install (zero paid deps; build is optional for dev)
  3. Open chrome://extensions → enable Developer modeLoad unpacked → select the /extension folder.

How It Works

  • content/perplexity.js uses a MutationObserver to find Perplexity's answer action row and injects a Play/Pause/Stop button that inherits Tailwind styles.
  • Keys & settings live in chrome.storage.local by default, with an opt-in chrome.storage.sync toggle.
  • Playback is routed through background/service-worker.js so content scripts never hold keys directly; audio is queued via lib/audio-queue.js with streaming or full-answer modes.

Project Structure

/extension
  manifest.json
  /background/service-worker.js
  /content/perplexity.js, inject-styles.css
  /adapters/*.js (12 providers + custom + base-adapter)
  /lib/storage.js, chunker.js, audio-queue.js, highlighter.js
  /options/options.html, options.js
  /popup/popup.html, popup.js
  /icons/play.svg, pause.svg, stop.svg, icon*.png

Providers

Provider Auth Timestamps
OpenAI Bearer
Groq Bearer
Gemini (Google) API key query param
ElevenLabs xi-api-key ✅ Forced Alignment
Azure Neural TTS Ocp-Apim-Subscription-Key
Amazon Polly AWS SigV4
Deepgram Aura Token
Cartesia X-API-Key
Hume Octave API key
Rime Bearer
Unreal Speech Bearer
Inworld TTS-2 API key + WebSocket option
Custom User-defined

Settings

Options page (chrome://extensions → Details → Extension options) lets you:

  • Add/edit/delete API keys per provider
  • Pick voice & preview it
  • Toggle autoplay, playback mode (full vs. sentence streaming), highlight mode (off / timestamp / estimated), and sync-across-devices

Popup gives quick provider/voice switching and a master on/off toggle.

Privacy

All synthesis requests go directly from your browser to the provider you selected. No intermediate server. Keys are stored locally (or optionally synced via your Google account). No analytics.

License

MIT — see LICENSE.

About

A Chrome Extension that injects a native-looking Play button into Perplexity AI's answer action bar (alongside Copy/Share). Bring your own API key from any TTS provider, OpenAI-compatible or not, and have responses read aloud.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages