-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for language support #1
Comments
Yes, I was thinking about something like this, but without the JSON (which is not very human-friendly). I'm considering using Python's gettext support for translating text before sending it to the TTS. This will also let non-developers contribute translations easier because many translation tools support gettext .po files. For the sentences for an intent I would create a This could result in a directory structure such like this:
But for all this to happen transparently Rhasspy should indeed add a With gettext we also can change the language on the fly, so if every intent has a |
I didn't know about gettext... But after reading through the docs a bit it definitely seems like a better(and already well implemented) option. |
I like this idea. Using something standardised like gettext as you proposed, since it is supported by most translation systems without any extra effort. So it would be possible to translate skill e.g. with weblate or similar web applications (essentially what mycroft does aswell). For the sentences.ini file I think it would be good to be able to have multiple sentence and multiple slot files. |
Thanks a lot for the input regarding language support. I made a first implementation on my skill but the sentences.ini files are still missing because I am looking for a way to load them into Rhasspy on start. https://github.com/EinfachArne/rhasspy-openhab-skill/tree/develop |
@EinfachArne I actually wrote something quite similar a while ago while testing the new lang attribute in the Hermes messages. Your implementation is very nice! Maybe it's an idea to add your Retraining the |
I created a component for homeassistant once and really likes the way they handle translations.
more detailed info >here
The basic file structure is for example:
Obviously we don't have the userbase to use platforms like Lokalize but this can just as easy be replaced by merging pullrequests to the skill repositories.
However the intent Json contains no information about which language is being used. One ugly way would be reading it from the profil but we still wouldn't know which profile is the active one.(if there are multiple ones) Maybe it would be possible to add a "lang" field in the Intent JSON with the language abbreviation (like en for english or de for german) on the rhasspy side of things.
These translation files could contain slots and sentences for an automatic implementation as well.
The text was updated successfully, but these errors were encountered: