Closed wizzwizz4 closed 4 years ago
I assume that Feature Requests are allowed.
to customise AwesomeTTS in a way that can't be done through the preferences menu without having my changes overwritten when AwesomeTTS updates
What's the customization you would like to perform that causes such troubles?
I'd like to add support for breaking up spacedelimited phrases into separate words in order to pass them through Duden, then join those to make a final audio phrase. Then, as needs changed, I might add support for fallbacks (e.g. Wiktionary).
Sounds like as an useful feature to me. Really, I thought about such a thing too, but I would like to separate words by other delimiter, pipe: |, just to get better pronunciation for two words I compare. Maybe you could share your changes and contribute a patch upstream, instead of running it with a hook/filter?
I might, if my code is sane. However, I think that adding support for some other service registration method (preferably a better one than my suggestion) would be preferable to in-place allow other add-ons to interface with AwesomeTTS - essentially allowing AwesomeTTS addons to exist. This would drastically increase the features available for AwesomeTTS as Anki addons an drastically increase the features available for Anki.
@wizzwizz4 can you describe your use case in more details ? are you trying to generate audio for a full sentence from TTS services which only support individual words ? Can your needs be met by using a more advanced TTS service which supports full sentences ?
are you trying to generate audio for a full sentence from TTS services which only support individual words ?
Yes – or, at least, I was. I've dropped the project.
Can your needs be met by using a more advanced TTS service which supports full sentences ?
I vaguely remember that no such service was available at the time – but if one did, then yes. I wanted something not synthesised, because the synthesisers were getting it wrong and I didn't want to learn wrong.
In retrospect, I think I should've made an Anki feature request for allowing add-ons to "depend" on others, so they loaded after them.
Understood. A lot of people have a separate field which contains pronounciation-only text, which is sometimes distorted to help the TTS system.
I would like to customise AwesomeTTS in a way that can't be done through the preferences menu without having my changes overwritten when AwesomeTTS updates. A relatively simple way of doing this would be to add a hook handler to
awesometts/services/__init__.py
:I am not very familiar with the code, so I don't know what else would need changing. From what I can tell, this and perhaps the service list "cache"(s) (if there is / are one(s)) would need changing (perhaps with an
AwesomeTTS_flush_services
hook). In order to use this, another addon would simply have to include:which would work assuming that nobody else wants to use the hook name
AwesomeTTS_register_service
, in which case their hook would run twice if they load before both AwesomeTTS and the target add-on. But who's going to do that?