-
Notifications
You must be signed in to change notification settings - Fork 12
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
German Translation #232
Comments
As a proof that I am in fact German, I accidentally capitalized the T in translation. |
Is there a way to overwrite numbers? Rhasspy maps them via num2words package, but it lacks some details. For example it maps 128: einhundertachtundzwanzig, but in most cases you would just say hunderachtundzwanzig. |
We should be able to create a custom number slot dictionary:
and then in the sentences do:
|
Ah, right now, we can't do "repeatable" slots... so instead of one slot defining all the numbers and then reusing for hours/minutes/seconds. It has to be effectively the same slot repeated three times with different slot names. So instead of "number" in the example above, you'd have a slot for I might try to work in "repeatable" slots, so you could have one slot definition for numbers, then reuse the slot in the sentence:
and the actual number would come back in |
I did create a new branch (#234) that has a |
Nice. Unfortunately I couldn't figure out how to get it running. Do I need to put
inside the de.py and/or the base class? |
Yes, it would be inside the de.py class. I think technically it would have to be So you'd have something like this (but with all the numbers in german in de.py): @intents.repeatable_dictionary_slots
def timer_number(self):
return {
"five": "5",
"four": "4",
"three": "3",
"two": "2",
"one": "1",
} and then one of the sentences would look something like this:
I've also written some docs and will merge those in to hopefully clarify a bit more if needed: https://homeintent.io/reference/api/intents-class/#intentsrepeatable_dictionary_slots Hope it helps! |
and I ended up merging the |
Yes, it helps. Thanks a lot. The incorrect naming was the problem I faced yesterday. With |
Yeah, this is kinda interesting. Since it affects just Home Assistant, I think I might add a language dictionary that gets auto-loaded based on language settings and provided back in the base constructor for use. English words that need to be translated from Home Assistant could all be defined there with their translations and the code could reference. I'll create a new issue and play around with it a bit to see how it would work. |
Is there a way to get a working frontend running with the dev setup? It seems as though it would only communicate with rhasspy once on startup. Also, it seems as my custom rhasspy config in /config gets ignored which might be related to that. |
Yeah, the dev frontend situation is not super great... It should be able to read/write the config, and view logs. So the "Save" partially works, but the restart functionality doesn't work. When I need to test it all end-to-end, I have a separate docker-compose file ( version: "3.9"
services:
homeintent:
build: .
container_name: homeintent
restart: unless-stopped
volumes:
- "./development-env/rhasspy:/profiles"
- "./development-env/config:/config"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "12101:12101"
- "11102:11102"
devices:
- "/dev/snd:/dev/snd"
environment:
- LANGUAGE=en and then just do a Can you post your rhasspy config? I might've introduced a bug while setting the default TTS based on language... |
Sure. That's the config. Ah I just remember to have read something about externally managed rhasspy flag. Do I have to activate that additionally?
And thanks for that docker-compose code. |
I did end up introducing a bug with the profile code... >.< The tts section currently gets overridden with nanotts or espeak... I'll need to update my checks and merge code accordingly. But yeah, you could also use an externally managed Rhasspy instead. It basically wont touch any of the Rhasspy settings and just install the slots/sentences and restart. |
I see. That explains some things. 😄 The docker-compose file you posted works perfectly for my needs - I don't do developing on the other components anyway. |
Hey @oerkel47 I pulled the latest docker image and configured the connection to home assistant but haven't activated the timer plugin.
|
Hi @trayhem, you are right. There is a stupid copy paste bug in the code. Sorry. I created a fix, but it will probably take some time to show up in the docker image. In the meantime you could clone https://github.com/oerkel47/HomeIntent/tree/dev_DE and create the docker dev environment. Basically all you need to do is change the docker compose file and start it up (edit: or use as state earlier in this thread in #232 (comment)). The docker dev has some quirks though, you might have to restart it manually to get settings to apply. |
Thanks for the report and the fix, I'll get it merged in here shortly! |
Co-authored-by: oerkel47 <7231822+oerkel47@users.noreply.github.com> See #232 (comment) for info on the bug
Many thanks to both of you. I tried the nightly build and it works like a charm now - although it seems as if most of my lights from home assistant weren't recognized so I had to add them manually via rhasspy -> slots -> light but that is just a minor inconvenience. Please keep up the good work ❤️ |
Hey @JarvyJ,
I will be working on a german translation.
The text was updated successfully, but these errors were encountered: