I changed all the row move buttons in Preferences to use the Shift (move 5), Ctrl (move 10), and Ctrl-Shirt (move to end). This involved a fair bit of refactoring. It is possible that I missed the buttons somewhere.
Third party redistributors might choose to skip distributing this for a
couple reasons:
- missing dependencies
- lack of interest in TTS as a feature
Lay some groundwork for handling this with fewer error message popups.
In particular note that speechd / flite depend on PyQt6 being built with
it, so support *may* appear dynamically after calibre is installed, and
available_engines queries Qt to see what is available. Piper is built
as part of calibre though, and if it has been patched out or skipped
via `setup.py build --only=xxx` we can at least avoid claiming it's
there.
Entrypoints into TTS eventually tend to consolidate into creating the
backend. This gives us one consistent place to raise errors for missing
backends... which however doesn't handle forcing a backend name. A
forced backend that is unavailable ended up hitting the "no prefs"
fallback code to use the default engine, which returned a different
backend than the one which is *forced*, and later a KeyError when
tweak_book attempted to access the backend name it forced but which
didn't exist.
Instead, raise an immediate "TTS engine piper is not available" error
dialog box, preventing any further confusing tracebacks.
The inference code if a few hundred lines anyway, piper is unmaintained
and forked and the fork depends on the gigantic python ONNXRuntime
bindings. Just write the few hundred lines myself.
1) formatter_functions.py: change a quoted string to an italic string so it is the same as in other functions.
2) ffml_processor.py: use look ahead in the parser to detect parse nodes with text that can be inlined.