=== QuikVox AI ===

Contributors: takeshiue
GitHub: https://github.com/takeshiue
Tags: podcast, text to speech, tts, audio, voice
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.18
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add AI-powered text-to-speech audio to WordPress posts. Generate podcast scripts and voices using Google Gemini TTS — no studio required.

== Description ==

Want to add audio to your blog — but don't have time to record? **QuikVox AI** generates a podcast-ready script from your existing content and converts it to natural-sounding speech using Google Gemini TTS, all from your WordPress dashboard. No studio. No microphone. No editing.

**QuikVox AI** is a powerful WordPress assistant designed to streamline your podcast production workflow. By leveraging the advanced capabilities of Google Gemini AI, it allows you to generate high-quality scripts from your existing content and convert them into natural-sounding audio—all without leaving your WordPress dashboard.

Whether you are an AI news blogger or a content creator looking to expand into audio, QuikVox AI provides the tools to automate the tedious parts of scriptwriting and voice generation.

### Key Features

*   **AI-Powered Script Generation**: Automatically extract content from your posts/pages and generate professional podcast scripts using Google Gemini (Flash/Pro/Flash-Lite models).
*   **Natural AI Voices**: Convert scripts into audio using the latest Gemini TTS (Generative Audio) models. Choose from 15+ high-quality voices with distinct characteristics.
*   **Multilingual Support**: Generate content in 5 major languages: Japanese, English, Chinese (Simplified/Traditional), and Korean.
*   **Prompt Management**: Save and manage custom prompt sets for different podcast styles. Includes an AI translation tool to help you expand your prompts globally.
*   **Seamless Media Integration**: Generated audio files are automatically saved to your WordPress Media Library and can be embedded directly into your articles via a simple audio player.
*   **Post & Page Support**: Works with both standard Posts and Pages, allowing you to turn any content into audio.
*   **Role-Based Access Control**: Script generation and Audio Analytics are available to Editor-level users and above. API configuration and prompt management are restricted to Administrators.

### Advanced Voice Selection
Unlike basic TTS plugins, QuikVox AI provides detailed metadata for each voice:
*   **Gender Identification**: Clear male/female labels.
*   **Tone Characteristics**: Voices are tagged with their unique style (e.g., "Warm, deep, informative" or "Soft, narrating").
*   **Dynamic UI**: The editor dropdown shows icons and descriptions so you can find the perfect voice for your persona.

---

**日本語の説明 / Japanese Description**

ブログ記事を音声化したいけど、録音する時間がない——そんな方のためのプラグインです。**QuikVox AI** は、WordPressの投稿・固定ページから自動でポッドキャスト用スクリプトを生成し、Google Gemini TTSを使って自然な音声に変換します。マイクも収録スタジオも不要。WordPress管理画面だけで完結します。

**テキスト読み上げ・音声合成・AI音声生成をWordPressに。**

**QuikVox AI** は、WordPressの投稿・固定ページからAIを使ってポッドキャスト用スクリプトと音声を自動生成するプラグインです。Google Gemini AIの機能を活用し、既存コンテンツを高品質な音声コンテンツに変換します。

**主な機能**

*   **AIスクリプト生成**: 投稿・固定ページの内容からGoogle Gemini（Flash / Pro / Flash-Liteモデル）を使ってプロ品質のポッドキャスト原稿を自動生成します。
*   **自然なAI音声**: Gemini TTSモデルを使ってスクリプトを音声に変換します。特徴の異なる15種類以上の高品質ボイスから選択できます。
*   **多言語対応**: 日本語・英語・中国語（簡体字・繁体字）・韓国語の5言語に対応しています。
*   **プロンプト管理**: ポッドキャストのスタイルに合わせたプロンプトセットを保存・管理できます。AI翻訳ツールも内蔵しています。
*   **メディア統合**: 生成された音声ファイルはWordPressメディアライブラリに自動保存され、記事内にオーディオプレーヤーとして埋め込めます。
*   **投稿・固定ページ対応**: 通常の投稿と固定ページの両方で利用できます。
*   **ロール別アクセス制御**: スクリプト生成とAudio Analyticsはエディター以上のユーザーが利用可能です。API設定とプロンプト管理は管理者のみに制限されています。

**ボイス選択の詳細**

*   **性別表示**: 男性・女性のラベルを明示しています。
*   **トーンの特徴**: 各ボイスのスタイル（例:「温かみのある低音・情報系」「柔らかい・ナレーション向け」）をタグで表示しています。
*   **動的UI**: ブロックエディターのドロップダウンにアイコンと説明が表示されるため、用途に合ったボイスをすぐに選べます。

== Installation ==

1.  Go to your WordPress Dashboard and navigate to **Plugins &gt; Add New Plugin**.
2.  Search for **"QuikVox AI"**.
3.  Click **"Install Now"** and then **"Activate"**.
4.  Navigate to **Settings &gt; QuikVox AI** to enter your **Google Gemini API Key** and configure the main plugin settings.
5.  Use the **QuikVox AI** menu in the sidebar for **Talk Scripts** and **Audio Analytics**.
6.  Optionally, configure your **Voice Generation API Key** to enable TTS.
7.  Open any Post or Page in the block editor and click **"Create Podcast Script"** in the QuikVox AI sidebar to get started.

**インストール手順（日本語）**

1. WordPressの管理画面から **プラグイン &gt; 新規プラグインを追加** に移動します。
2. 検索欄に **「QuikVox AI」** と入力します。
3. **「今すぐインストール」** をクリックし、続けて **「有効化」** をクリックします。
4. **設定 &gt; QuikVox AI** に移動し、**Google Gemini APIキー**を入力してプラグインの基本設定を行います。
5. サイドバーの **QuikVox AI** メニューから **Talk Scripts** と **Audio Analytics** を利用できます。
6. 音声生成を使用する場合は、**音声生成APIキー**も設定してください。
7. 投稿または固定ページのブロックエディターを開き、QuikVox AIサイドバーの **「ポッドキャストスクリプトを作成」** をクリックして開始します。

== External Services ==

This plugin connects to an external service:

1. Google Gemini API
- Purpose: Generate podcast scripts from post content and convert text to speech
- Data sent: Post content and optional user prompts
- Service provider: Google
- Privacy Policy: https://policies.google.com/privacy
- Terms of Service: https://policies.google.com/terms

Users must provide their own API key to use this feature. Script and voice generation data is sent only when the user triggers generation actions.

2. QuikVox AI License Verification Service
- Endpoint: https://quikvox-ai.com/license/verify
- Purpose: Verify license keys and refresh plan/status information
- Data sent: License key, site URL, home URL, and plugin version
- Service provider: QuikVox AI
- Triggered only when:
  - an administrator saves or activates a license key
  - an administrator clicks the "License Recheck" button
  - the QuikVox AI Settings page is opened and the scheduled next check time has passed

No license verification request is sent from normal front-end page views, post views, or general admin screens.

== Frequently Asked Questions ==

= Where do I get a Gemini API Key? =
You can obtain an API key from the [Google AI Studio](https://aistudio.google.com/).

= Are the audio files hosted locally? =
Yes, generated audio files (WAV format) are saved directly into your `wp-content/uploads` directory and registered in your Media Library for full ownership.

= Does it support multi-speaker podcasts? =
The current version supports single-speaker script generation. Multi-speaker support (dialogue) is available as a Pro feature.

= Who can use QuikVox AI? =
Script generation in the block editor sidebar and Audio Analytics are available to users with the Editor role or higher. API settings, prompt management, and license configuration are restricted to Administrators.

**よくある質問（日本語）**

= Gemini APIキーはどこで取得できますか？ =
[Google AI Studio](https://aistudio.google.com/) でAPIキーを取得できます。

= 音声ファイルはどこに保存されますか？ =
生成された音声ファイル（WAV形式）はサーバーの `wp-content/uploads` ディレクトリに保存され、WordPressメディアライブラリに登録されます。外部サービスには保存されません。

= マルチスピーカー（複数話者）のポッドキャストに対応していますか？ =
はい、対応しています。シングルスピーカーはFreeプランから利用可能で、2人の話者によるダイアログ形式の音声生成はProプランの機能です。

= 誰がQuikVox AIを使えますか？ =
ブロックエディターのサイドバーでのスクリプト生成とAudio Analyticsはエディターロール以上のユーザーが利用できます。APIキー設定・プロンプト管理・ライセンス設定は管理者のみが行えます。

== Screenshots ==

1. **Dashboard Overivew**: Manage your podcasting workflow and view current API status.
2. **Script Editor**: Generate and refine your script with side-by-side post content.
3. **Voice Settings**: Choose from a wide variety of AI voices with gender and character icons.
4. **Settings Page**: Easily configure your Google Gemini API keys and default models.

== Changelog ==

= 1.0.17 =
*   Fix: The Bulk Voice Creation screen's optional cron command no longer auto-fills the server's absolute file path. It now shows a generic placeholder for you to replace manually.

= 1.0.16 =
*   Fix: Bulk Voice Creation could get permanently stuck mid-queue on low-traffic sites where WP-Cron does not fire reliably. Processing now also advances from the admin panel's own status polling, and items stuck in "processing" are automatically recovered.
*   Fix: Removed leftover debug logging in multi-speaker TTS request handling that wrote request data to a file inside the plugin directory.
*   Added an optional real system cron command reference on the Bulk Voice Creation screen for more reliable processing.

= 1.0.14 =
*   Extended access to the QuikVox AI admin menu and Audio Analytics to Editor-level users and above.
*   Administrators are automatically redirected to Audio Analytics when Editors navigate to the settings URL.

= 1.0.8 =
*   Reworked the admin menu structure so QuikVox AI appears as a top-level menu with Talk Scripts and Audio Analytics beneath it.
*   Kept the main settings page under the WordPress Settings menu and aligned the admin UI with WordPress conventions.
*   Improved the admin settings screen by removing inline JavaScript from core controls and tightening settings sanitization.

= 1.0.7 =
*   Revised Smart Tone admin UI to match Prompt Sets behavior more closely.
*   Restored default-star indicators in the Smart Tone list and removed the separate default summary cards.
*   Simplified Smart Tone row actions so built-in styles use View/Copy and custom styles use Edit/Delete/Copy as appropriate.
*   Added read-only Smart Tone view mode and blocked direct edit/delete operations for built-in styles.
*   Documented the current built-in single-speaker Prompt Sets in docs/prompt-sets-single-ja.md.

= 1.0.6 =
*   Reworked the workflow sidebar and modal layout to clarify selection, generation, and embedding steps.
*   Added and reorganized planning docs for roadmap, task tracking, and release context.
*   Removed generated __pycache__ artifacts from the repository and ignored future Python cache files.

= 1.0.5 =
*   Refined the script generator sidebar UI for single and multi-speaker workflows.
*   Simplified generation progress popups for script and voice creation.
*   Added docs for mockup organization and audio chunk loudness tracking.

= 1.0.4 =
*   Security: Masked License Key input field with eye icon toggle to prevent credential exposure.
*   Security: Masked Service Account JSON (Vertex AI) with blur filter and eye icon toggle.
*   Security: Masked Google AI Studio Script Generation API Key with eye icon toggle.
*   Security: Masked Google AI Studio Voice Generation API Key with eye icon toggle.
*   Fix: Default Gemini model fallback updated from deprecated `gemini-pro` to `gemini-2.5-pro` to resolve 404 errors on script generation.
*   Fix: Sidebar model fallback list updated to current Gemini 2.5 series.
*   Fix: Plugin Check — NonceVerification warnings resolved for redirect notification flags.
*   Fix: Plugin Check — Added `wp_unslash()` and sanitization to Smart Tone config and auth JSON inputs.
*   Fix: Plugin Check — Wrapped `error_log()` in `WP_DEBUG` guard (Vertex AI error handler).
*   Fix: Plugin Check — Replaced `esc_url()` with `esc_url_raw()` for input sanitization in audio URL handler.
*   Fix: Plugin Check — `stable_tag_mismatch` resolved.
*   Fix: Plugin Check — `plugin_header_nonexistent_domain_path` resolved by creating `languages/` directory.
*   Chore: Added `.distignore` to exclude development files from distribution packages.
*   UI: Updated official website link to https://quikvox-ai.com/.
*   UI: Removed redundant "Uses Global Endpoint" label from Vertex AI model selector (behavior is automatic).

= 1.0.2 =
*   Security: Removed internal API response body from client-facing error messages (Vertex AI TTS and Gemini API).
*   Security: Added model ID format validation (regex) for TTS model parameter in voice generation handler.
*   Security: Applied input sanitization to Smart Tone text handler for consistency.
*   Security: Fixed IDOR vulnerability by adding post read permission check before script generation.
*   Security: Replaced unsafe HTML rendering pattern in React component with regex-based tag stripping.
*   Security: Corrected URL escaping function to use HTML-context-appropriate method in audio insert handler.
*   Security: Suppressed internal URL and model details from client-facing Vertex AI error messages.
*   Security: Added Service Account JSON format validation on settings save.
*   Security: Removed project_id disclosure from Vertex AI connection test AJAX response.
*   UI: Switched connection test status display to textContent to prevent potential HTML injection.
*   Removed debug loading log from production script bundle.

= 1.0.1 =
*   Fixed AI Translate issue in Prompt Sets by improving Gemini 2.5/Thinking model support.
*   Implemented comprehensive API response parsing to handle thinking blocks and Markdown code fences.
*   Extended API timeout to 60 seconds.
*   Removed `response_mime_type: 'application/json'` to avoid conflicts with newer Gemini models.

= 1.0.0 =
*   Official stable release.
*   Updated plugin versioning to 1.0.0.
*   Verified plan-based features and UI consistency.

= 0.8.1 =
*   (Previous entries)
*   Implemented Vertex AI integration for both script and voice generation.
*   Added support for Cloud Text-to-Speech via Vertex AI (MP3 output).
*   Implemented text chunking for TTS to handle Gemini TTS byte limits (512 bytes) and timeout issues.
*   Improved error handling with a selectable/copyable error modal in the editor.
*   Added dynamic download labels (MP3 vs WAV) in the sidebar.
*   Fixed endpoint routing for Vertex AI preview models (locations/global).


= 0.7.8 =
*   Renamed plugin to QuikVox AI (slug: quikvox-ai).
*   Migrated all inline scripts/styles to wp_enqueue (admin.js / admin.css).
*   Fixed i18n: text domain unified to quikvox-ai and missing 2nd args added.
*   Added ABSPATH guards to all PHP files.

= 0.7.7 =
*   Code consistency improvements for WordPress.org standards.

= 0.7.6 =
*   WordPress.org submission preparation.
*   Removed ElevenLabs API integration (Gemini TTS only).
*   Added External Services disclosure section.
*   Security improvements: Enhanced nonce verification and data sanitization.
*   Code cleanup for WordPress.org compliance.

= 0.7.5 =
*   Official preparation for WordPress.org directory submission.
*   Updated Gemini TTS (GA) model support.
*   Added support for Gemini 1.5 Flash-Lite.
*   Enhanced Voice metadata (Name, Gender, Characteristics) in UI.
*   Improved buttons: Scripts can now be embedded directly under the player.
*   General UI/UX polishing for the admin settings page.

= 0.5.0 =
*   Initial beta release with basic script generation and TTS support.
