Page MenuHomePhabricator

Pre-synthesise messages
Closed, ResolvedPublic1 Estimated Story Points

Description

Since some messages are static (for a given version of Wikispeech) it makes sense to generate them when installing or upgrading. There are also some messages that can't be synthesised when they're needed, e.g. if there's no connection to Speechoid. Create a maintenance script to synthesise messages.

Figure out what messages that need to be synthesised. Messages may be dynamic, containing parameters, wikitext magic words etc. In these cases you may want to generate a set of messages with different parameters, where these are a finite and reasonable number. In other cases it may not be feasible e.g. if a parameter is a page name.

Messages should to be synthesised in all languages. They may be synthesised in all voices, though it may be acceptable to to just have them in one voice per language if that would turn out to be too much. It may even be preferable to have a distinct voice for messages to contrast them with other utterances.

Event Timeline

Sebastian_Berlin-WMSE renamed this task from Pre-synthesis messages to Pre-synthesise messages.Feb 27 2025, 10:57 AM

We may want to have some sort of prompt or sound at the beginning of a message to make it clear that this is not part of a page. This would serve the same function as a warning message having a particular styling when reading text.

We need to figure out which error-messages in the i18n we want to pre-synthesize, and if they already exists or not, and if we need to add new error-messages in task: T387280

We also need to figure out if we want to have support to presynthesize different voices as an option in the script.

Change #1134981 had a related patch set uploaded (by Viktoria Hillerud WMSE; author: Viktoria Hillerud WMSE):

[mediawiki/extensions/Wikispeech@master] Create maintenance script to pre-synthesize error messages

https://gerrit.wikimedia.org/r/1134981

Viktoria_Hillerud_WMSE changed the point value for this task from 24 to 5.Apr 30 2025, 7:40 AM
Viktoria_Hillerud_WMSE changed the point value for this task from 5 to 2.May 14 2025, 8:56 AM
Viktoria_Hillerud_WMSE changed the point value for this task from 2 to 6.

Change #1161380 had a related patch set uploaded (by Viktoria Hillerud WMSE; author: Viktoria Hillerud WMSE):

[mediawiki/extensions/Wikispeech@master] Breakout segmenter logic for error messages

https://gerrit.wikimedia.org/r/1161380

Change #1161380 abandoned by Viktoria Hillerud WMSE:

[mediawiki/extensions/Wikispeech@master] Breakout segmenter logic for error messages

Reason:

New patch here https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikispeech/+/1176441

https://gerrit.wikimedia.org/r/1161380

Viktoria_Hillerud_WMSE changed the point value for this task from 6 to 4.Aug 7 2025, 12:19 PM

The script generates a couple of seemingly arbitrary messages. This is fine to prove that it works. I'm assuming that later tasks will generate a list of messages.

It's still worth mentioning in a comment that it's just temporary.

Viktoria_Hillerud_WMSE changed the point value for this task from 4 to 2.Oct 1 2025, 9:00 AM

The script generates a couple of seemingly arbitrary messages. This is fine to prove that it works. I'm assuming that later tasks will generate a list of messages.

It's still worth mentioning in a comment that it's just temporary.

Now I added a comment about this in the script.

Viktoria_Hillerud_WMSE changed the point value for this task from 2 to 1.Oct 15 2025, 9:25 AM

One thing to note is that this script creates new utterances even if there are utterances for the given message. This shouldn't be an issue since only the most recent one is used. Even having old files lying around may not be that big an issue. They should take up little space compared to those from pages.

Something we need to avoid is that message utterances are flushed since they aren't regenerated automatically. This doesn't need to be part of this task, but there should be a follow up so it's not forgotten.

Change #1134981 merged by jenkins-bot:

[mediawiki/extensions/Wikispeech@master] Create maintenance script to pre-synthesize error messages

https://gerrit.wikimedia.org/r/1134981