Jan 2, 2019

Hacking the "Hey memoQ" dictation commands


In the initial release of the Hey memoQ dictation feature in memoQ version 8.7.3, it's a bit inconvenient to deal with command configuration. Unlike most configurations in memoQ, the dictation commands cannot yet be exported as a light resource and shared with other users, nor can a configuration for generic German, for example, be easily transferred to a desired variant such as "ger-DE" or "ger-CH". Surely this will be addressed soon, but at the moment it's a bit of a nuisance.

But fear not... there is usually a backdoor to hack memoQ configurations, and this is no exception.


The screenshot above shows the path to the current configuration file for dictation commands. The XML file contains all the configured commands for all the memoQ languages and variants, including those of no interest whatsoever.

Deep inside the Hey memoQ dictation command file with Notepad++

A peek inside the XML file reveals that the dictation commands are structured as key-value pairs. And here it is possible to enter the text for dictation commands, simply by typing the desired text between the string tags inside the Value tags.

A configuration (Commands set) for one variant of a language - such as generic Portuguese - can also be copied to other variants - such as Brazilian or European Portuguese, saving the trouble of re-entering everything laboriously in the configuration dialog within memoQ.

I made a copy of the XML configuration and edited it to have only the variants of English and German that were of interest to me. Then I copied this file over the one in the memoQ configuration directory shown in the screenshot above. When I restarted memoQ, the file bloated a bit; upon examining it, I saw that all the deleted languages had been restored after the ones I had left in the edited file, but the new file was still only 247 KB in size because the senseless copying of English commands to the other languages was gone.

A customized XML file can be shared with other users, who can use it to replace the existing configuration file and probably save time configuring their languages and variants of interest. My file with generic English, EN-US, EN-UK, generic German and DE-DE is here.


No comments:

Post a Comment

Notice to spammers: your locations are being traced and fed to the recreational target list for my new line of chemical weapon drones :-)