Skip to content

feat: Add Edge tts#1032

Open
keyboardstaff wants to merge 3 commits intoagent0ai:developmentfrom
keyboardstaff:edge-tts
Open

feat: Add Edge tts#1032
keyboardstaff wants to merge 3 commits intoagent0ai:developmentfrom
keyboardstaff:edge-tts

Conversation

@keyboardstaff
Copy link
Contributor

Integrate Edge TTS engine and build a unified multi-engine TTS system supporting Kokoro (local) and Edge TTS (online) with seamless switching.


Changes:

  • New Edge TTS engine (edge_tts.py) — wraps edge-tts SDK with cached voice listing and synthesis outputting base64 WAV
  • New voice list API (tts_voices.py)POST /tts_voices returns engine-specific voices in unified [{id, name, language, gender}] format
  • Unified synthesize API (synthesize.py) — routes to Kokoro or Edge TTS based on tts_engine setting, passes voice/rate params
  • Parameterized Kokoro engine (kokoro_tts.py) — voice/speed now accept function arguments instead of hardcoded globals
  • Settings upgrade (settings.py) — replaced tts_kokoro (bool) with tts_enabled, tts_engine, tts_voice, tts_rate; includes automatic migration of legacy field
  • Frontend Settings UI (speech.html) — TTS toggle → engine selector → dynamic voice dropdown → speed slider
  • Frontend TTS logic (speech-store.js) — renamed speakWithKokoro to speakWithServer for unified server-side TTS dispatch; browser TTS as fallback
  • Preload (preload.py) — adapted to new tts_enabled + tts_engine fields
  • Dependency (requirements.txt) — added edge-tts>=7.2.7

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

Comments