=== BeyondSky Text to Voice ===
Contributors: beyondskyapp
Tags: text to speech, tts, audio, narration, accessibility
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn any article into a spoken MP3 with AI text‑to‑speech, stored in the Media Library and played with an audio player on the post.

== Description ==

Text to Voice adds a **"Convert text to voice (MP3)"** button to the WordPress post editor. One click sends the article text to an AI text‑to‑speech service, saves the resulting MP3 in your Media Library, and shows an audio player at the top of the published article so visitors can listen instead of read.

**Features**

* One‑click narration from the post edit screen.
* Choose your AI voice provider — **Google Cloud**, **Microsoft Azure** and **ElevenLabs** built in, plus a `bsktv_providers` filter so developers can add their own.
* MP3 is stored in the WordPress Media Library (no third‑party hosting).
* Choose where the player appears: above the article, below it, after the first paragraph, or place it anywhere with the `[bsktv_player]` shortcode.
* Choose from three player designs — Minimal, Card, or Accent — with a customizable label and accent colour.
* Choose your default voice and model, and cap the narration to the first N words to control cost.
* Long posts are split into chunks and recombined automatically.
* Works with any public post type that uses the editor.

**Lightweight & theme‑friendly.** The player inherits your theme's fonts (no extra web‑fonts), keeps the native audio control for cross‑browser reliability, scopes all styles to `.bsktv-*` in one small inline stylesheet loaded only on single posts, and themes all three designs from a single accent colour.

= External services =

This plugin sends data to a third‑party AI text‑to‑speech service **only when you click "Convert text to voice"** — it sends the post's text content and your API key to the provider you selected in the settings, and receives an MP3 in return. No data is sent otherwise. An account and API key with the chosen provider are required, and usage is billed by that provider.

Supported providers:

* **Google Cloud Text-to-Speech** — API `https://texttospeech.googleapis.com`. Terms: https://cloud.google.com/terms — Privacy Policy: https://policies.google.com/privacy
* **Microsoft Azure Speech** — API `https://<region>.tts.speech.microsoft.com`. Terms: https://azure.microsoft.com/support/legal/ — Privacy Policy: https://privacy.microsoft.com/privacystatement
* **ElevenLabs** — API `https://api.elevenlabs.io`. Terms of Use: https://elevenlabs.io/terms-of-use — Privacy Policy: https://elevenlabs.io/privacy-policy

== Installation ==

1. Install and activate the plugin.
2. Go to **Settings → Text to Voice**.
3. Choose your **Voice provider**, then enter its **API key** and a default **Voice ID**. Optionally set the Model ID and a word limit.
4. Edit a post, open the **Text to Voice** box in the sidebar, and click **Convert text to voice (MP3)**.
5. The MP3 is generated, added to the Media Library, and a player appears on the published article.

== Frequently Asked Questions ==

= Which AI providers are supported? =

Google Cloud, Microsoft Azure and ElevenLabs out of the box, and developers can add more via the `bsktv_providers` filter. You use your own provider API key, and generation is billed by that provider. Google and Azure both offer large recurring free tiers; ElevenLabs has the most lifelike voices.

= Where are the MP3 files stored? =

In your WordPress Media Library (your own server). Re‑generating a post replaces its previous narration.

= Can I limit how much of the article is narrated? =

Yes. Set a **Word limit** in the settings (for example 1000). Set it to 0 for no limit.

= Which languages are supported? =

The default model `eleven_flash_v2_5` is fast, low‑cost and supports 32 languages. For the most lifelike voice you can switch the Model ID to `eleven_multilingual_v2` in the settings.

== Screenshots ==

1. The "Convert text to voice (MP3)" button in the post editor sidebar.
2. The generated audio player shown on the published article.
3. The settings screen (API key, voice, model, word limit).

== Changelog ==

= 1.0.0 =
* Initial release.
