Weglot integration

3 min read

Weglot translates your posts into the visitor's language on the fly. TTSWP detects the visitor's selected language and generates audio in that language.

Requirements

  • Weglot 3.0 or newer
  • At least one destination language enabled in Weglot
  • TTSWP connected to your site

Turn it on

  1. Go to Text to Speech → Overview.
  2. Scroll to Quick Settings.
  3. Flip Weglot integration to on.
  4. Save.

If Weglot is not installed, this toggle is locked and shows "Weglot not detected".

Map voices to languages

The Text to Speech → Language Voice Mapping page lets you assign a voice per language. See Language Voice Mapping.

How generation works

Unlike WPML (where each translated post is a separate post), Weglot translations are on-the-fly. The flow:

  1. A visitor views your site in Spanish
  2. They click Play on the audio player
  3. TTSWP reads the visitor's language from Weglot
  4. If audio for that language already exists, it plays
  5. If not, the plugin generates audio in Spanish using the Spanish-mapped voice

First-time generation in a new language uses credits. After that, it plays from cache.

Credit use

Every language you support uses credits the first time audio is generated in that language for each post. A single post could end up using credits equal to its character count times the number of languages enabled.

Tip: use the Audio Library to check total storage and spend.

Pre-generating all languages

On Pro and Agency plans, the Bulk Generate action can pre-render audio in every enabled Weglot language so visitors never wait. See Bulk audio generation.