Skip to content

fix(tts): real Persian Gemini speech on Cloudflare runtime - #66

Merged
AmirMotefaker merged 3 commits into
mainfrom
fix/65-real-persian-tts-runtime
Sep 5, 2026
Merged

fix(tts): real Persian Gemini speech on Cloudflare runtime#66
AmirMotefaker merged 3 commits into
mainfrom
fix/65-real-persian-tts-runtime

Conversation

@AmirMotefaker

Copy link
Copy Markdown
Collaborator

Implements Issue #65 and fixes the real-browser stable blocker found during Issue #61.

Root cause

The preview Worker intentionally returned HTTP 503 for every /api/tts call, so Chrome had to fall back to Web Speech. On the tested Windows Chrome environment no usable fa/fa-IR voice exists, making speech acceptance impossible.

Fix

  • real Gemini TTS in cloudflare/worker.mjs;
  • female Sulafat and male Iapetus preserved;
  • Persian narration is chunked and returned as audio/wav;
  • voice name/gender response headers exposed to the extension;
  • GEMINI_API_KEY is bound only to the isolated Cloudflare Worker, never bundled into the extension;
  • /health now reports actual Gemini speech readiness;
  • deployment gate now requires a real female + male Persian audio E2E instead of accepting the old 503 browser-fallback contract.

Safety

  • Draft PR;
  • no stable release;
  • no store submission;
  • production Farsio website untouched;
  • browser fallback remains secondary only.

After CI passes, Cloudflare preview must prove real audio E2E before merge. Then a new exact-main stable candidate will be generated for Chrome/Edge acceptance.

Refs #65 #61

@AmirMotefaker
AmirMotefaker marked this pull request as ready for review September 5, 2026 10:03
@AmirMotefaker
AmirMotefaker merged commit c15d06d into main Sep 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant