Assigning voices automatically: rules by section, language and source
One voice for sport, another for business, a native voice for English articles: how voice rules work, the order they apply in, and the cases they do not cover yet.
Most publishers who turn their articles into audio start with a single voice, and that is the right call. A single voice is consistent, easy to explain, and nobody has to think about it. The trouble arrives later, usually the first time someone listens to a run of five audios back to back. The measured, serious voice that suits a court report makes the weekend football round-up sound like a funeral notice. The French voice reading the occasional English article is immediately, painfully obvious. Someone starts picking voices by hand, keeps it up for a week, then forgets.
Voice rules are meant for that moment: make the decision once, and let the tool apply it to every article that comes in afterwards. What follows describes how they work, taken from the code rather than from a brochure, including the parts that are not there yet.
A rule is one condition and one voice
Each rule reads like a sentence: "when the section is Sport, read with voice X". There are exactly three kinds of condition:
- section, as your site sends it (a WordPress category, a feed category);
- language of the article: French, English, Spanish or German;
- source, meaning the route the article arrived by: the RSS feed, the API (which also covers the WordPress plugin and batch submissions), or the very first article processed when the account was opened.
Section names are compared without regard to capitals or stray spaces, so "sport", "Sport" and "Sport " with a trailing space are the same section. That sounds trivial, but an editor sees no difference between those three spellings, and a rule that silently failed over a capital letter would rightly be seen as broken.
A site can hold up to fifty rules. They are managed from the Voices screen of the dashboard, and they can also be read and written through the profile API, which makes them easy to back up or copy between sites.
The first matching rule wins
Rules form an ordered list. For each article the tool walks down the list and stops at the first rule that matches. The order is your priority logic, visible at a glance: no hidden weighting, no scoring.
Around the rules, the complete chain runs from most specific to most general:
1. a voice requested explicitly for that article (in an API call, for instance) always wins;
2. then voice rules, in order;
3. then the per-section voice, if you still use the older per-section setting;
4. then the site's default voice;
5. and finally the engine's default voice for the article's language.
The chain never comes back empty: whatever happens, the article gets read. That is deliberate. If a rule points at a voice that is no longer available, because it left the catalogue or because the account dropped to a plan that does not include it, the rule is skipped and the next level applies. The next best voice beats no audio at all.
Three patterns that keep coming up
One voice per language. A bilingual site sets two rules: English goes to a native English voice, French to a French one. This is the simplest rule and usually the most valuable, for reasons we go into in one voice per language.
One voice per editorial register. Sport and culture on one side, crime and courts on the other. The choice of voice affects credibility and listening fatigue more than people expect; our guide to French text to speech covers what a voice choice actually changes for a listener, and what it does not.
One voice per route. Less obvious but handy: a newsroom that receives wire copy through the API and publishes its own reporting through the feed can tell the two apart by ear. Listeners pick up, without being told, that the short news item and the investigation did not come from the same desk.
What rules do not do
This is the question we hear most often, so it deserves a plain answer: a rule tests a single condition. You cannot currently write "section is Sport AND language is English". Ordering the list covers a lot of ground (put the most specific rule at the top), but it is not a true combination of two criteria inside one rule. If your organisation needs that, we would like to hear about it, with the real example behind the request.
Second: rules apply when the audio is produced. Changing a rule does not re-read articles that already have audio. That is on purpose, since every re-read costs credits and nobody wants their balance drained because they reordered a list. It does mean that changing voice policy on your archive is an explicit step, described in changing the voice of an article that already has audio.
Third: voice rules are part of the paid plans. An account on the free trial cannot set them.
Where to start
Three steps work better than a grand design. Listen to two or three articles from each section with your current voice, and note where it genuinely clashes, not where it could in theory be slightly better. Add one rule per clash you actually heard, the most specific at the top. Then leave it alone for a week before adding anything else.
The temptation is to build a full grid on day one: fifteen sections, fifteen voices. What that mostly produces is a site where the voice changes with every article and the listener has no idea why. Two or three voices, each tied to a clear register, are easier on the ear than a full palette. Rules are there to carry out an editorial decision, not to stand in for one.
Give your articles a voice with WeDispatch
This blog is itself voiced by WeDispatch. Curious how it sounds on your content?
Book a demo