Mycroft Community Forum

Mycroft in French and Skills

Hello,

I’m new to Mycroft and just managed to get it to work in French. I’m now moving to skills and I am missing things as nothing seems to work.

I’m experimenting with and both respond perfectly well in English but not in French:

  • Home assistant skill
  • Spotify

Both seem to be fully translated to FR according to this https://translate.mycroft.ai/fr/mycroft-skills/spotify-skill-fr.po, but I can’t even find a fr-fr folder in /mycroft-core/skills/mycroft-spotify.forslund/locale

For Home assistant I do have the folder, but the issue remains the same: I’m not understood at all.

Is there a particular setting that need to happen? Here’s my config:

{
“play_wav_cmdline”: “aplay -Dplughw:1,0 %1”,
“play_mp3_cmdline”: “mpg123 -a plughw:1,0 %1”,
“enclosure”: {
“platform”: “picroft”
},
“lang”: “fr-fr”,
“log_level”: “INFO”,
“stt”: {
“module”: “mycroft”,
“mycroft”: {
“lang”: “fr-fr”
}
},
“tts”: {
“module”: “google”,
“google”: {
“lang”: “fr”
}
},
“ipc_path”: “/ramdisk/mycroft/ipc/”
}

Thanks for your support in helping a beginner!

Cheers

Hi I can only speak for spotify, the translations has been imported to the skill but no release of the skill has been made since those were fetched. I think you can ask mycroft to install the beta version of the skill hey mycroft install the beta version of spotify

There should be an official release soonish (next week at the latest I hope)

Thanks a lot for the support. So indeed I was able to install the beta version that indeed include the language files. That’s great.

Now I still face the issue of not being understood. For instance “joue une playlist de rock” which means “play a rock playlist” is well understood by mycroft (STT) but I’m faced with answers of not understanding at all.

This is the log, any ideas?

Thanks

14:01:08.240 | DEBUG    |  2532 | mycroft.skills.intent_service:handle_utterance:350 |     Adapt intent: None
14:01:08.246 | DEBUG    |  2532 | mycroft.skills.padatious_service:handle_fallback:157 | Padatious fallback attempt: joue une playlist rock
14:01:08.248 | DEBUG    |  2532 | mycroft.skills.padatious_service:handle_fallback:164 |                alt attempt: joue 1 playlist rock
14:01:08.250 | INFO     |  2532 | QuestionsAnswersSkill | Searching for joue une playlist rock
~~~~52 | DEBUG    |  2532 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: fallback-query.mycroftai:QuestionQueryTimeout
14:01:08.303 | DEBUG    |  2532 | WolframAlphaSkill | WolframAlpha query: joue une playlist rock
Removing event fallback-query.mycroftai:QuestionQueryTimeout
~~~~13 | DEBUG    |  2532 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: fallback-query.mycroftai:QuestionQueryTimeout
Removing event fallback-query.mycroftai:QuestionQueryTimeout
~~~~21 | DEBUG    |  2532 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: fallback-query.mycroftai:QuestionQueryTimeout
14:01:08.412 | DEBUG    |  2532 | WolframAlphaSkill | translation: play a rock playlist
14:01:08.413 | DEBUG    |  2532 | WolframAlphaSkill | Non-question, ignoring: play a rock playlist
Removing event fallback-query.mycroftai:QuestionQueryTimeout
~~~~21 | DEBUG    |  2532 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: fallback-query.mycroftai:QuestionQueryTimeout
Removing event fallback-query.mycroftai:QuestionQueryTimeout
14:01:09.497 | INFO     |  2532 | QuestionsAnswersSkill | Timeout occured check responses
14:01:10.257 | DEBUG    |  2532 | mycroft.skills.padatious_service:handle_fallback:157 | Padatious fallback attempt: joue une playlist rock
14:01:10.259 | DEBUG    |  2532 | mycroft.skills.padatious_service:handle_fallback:164 |                alt attempt: joue 1 playlist rock

Sorry I’m a bit late, i may have come after the war.

Two points :

1- The Spotify skills is not the only one involved.
There is also the common play skills.

And some translations in this skills are not OK. In terms of translation, it’s good, but there is a technical issue.
The problem is within the file “Play.voc” in skill-playback-control/locale/fr-fr/Play.voc
“jouer” should be “joue” to match the “joue” in phrase.rx.

At least, this is a modification I had to do to make it work for the lms-squeezebox skill.
My guess is, it’s the same for other music services.

I already submitted this modification to mycroft.translate.ai

2- BUT, and this is a big BUT, your issue seems different. The spotify skill in your case doesn’t even seem to be picked up to search your utterance. Don’t you have other logs (above ?) with the word spotify in it ?

1 Like

Well done! this was exactly the issue. Changing the file fixed the issue for me.

You rock!

1 Like

Salut @iditude j’espere que ça va ! je vois qu’on utilise tous deux Mycroft and Home Assistant
je vois que tu as réussi à tout passer en français, est-ce que tu peux me venir en aide ?
D’avance merci :wink:

Hi @iditude, I hope you’re ok! I see that we both use Mycroft and Home Assistant
I see that you managed to switch everything to French, can you help me?
Thanks in advance :wink:

Salut @aldolinux

Please have a look here: Languages - Mycroft AI

Salut :grinning:
What problems do you have with Mycroft in French? Are you struggling with switching the system to French in general or do you have problems with a particular skill?
For the former problem: there’s an article in the Mycroft docs that could help you.
First of all you have to change your mycroft.conf file using “mycroft-config edit user” and then adding some parts to this file. To get it working in German I only had to add the lang and the tts keys, but adding the stt key may be good just to be sure.
So as described in the first post you only have to add the following to your config file:
other configuration
“lang”: “fr-fr”,
“stt”: {
“module”: “mycroft”,
“mycroft”: {
“lang”: “fr-fr”
}
},
“tts”: {
“module”: “google”,
“google”: {
“lang”: “fr”
}

Or at least that was what I did to make Mycroft work in German.
Hope I could help :+1:

Edit: Oops, two helpful community members, one thought :grinning:

Hi guys !!! thanks for your help.
I have that :
WARNING: Configuration file did not pass validation before edits.
Review errors above and press ENTER to continue with editing.
Saving…

Ok, it works now for some skills
but not for homeassistant :frowning: even if I install the beta version

In timer skill, I have a skill error.
I ask to set a timer called test for 5 minutes

I’m still looking for solutions.
1 - by adding / editing some files in vocable or dialog, some skills works well again
2 - but neither for timer et homeassistant it works

  • in timer skill, I can list ou cancel timer, but when I want to set up one timer I have a skill erreur,
    so I open init.py and saw that :
    # Remove " and" left behind from “for 1 hour and 30 minutes”
    # prevents it being interpreted as a name “for and”
    str_remainder = re.sub(r’\s\sand’, ‘’, str_remainder, flags=re.I)
    return duration.total_seconds(), str_remainder

Every terms are in english ie “and” and “for”… so should I change them into french one ?

@iditude si ça marche tjrs pour toi « home assistant » je suis preneur d’info !

1 Like

The extract_duration() error will be solved either the next time Mycroft-core updates lingua-franca, or the time after that, as @bboutier has helpfully provided a proper French localization for that function, which will be in lingua-franca's pending 0.4.0 release.

In the meantime, I think, but am not certain, that what’s happened above is this:

>>> lingua_franca.parse.extract_duration("ajoute un minuteur nommé test pour 5 minutes", lang='fr')
Language "fr" not recognized! Please make sure your language is one of the following: en cs de.

This printed and returned None, which was then passed to the _extract_duration wrapper in Mycroft-core. The wrapper, in turn, attempted to unpack the null value it got back from extract_duration.

(It may be the case that the failing extract_duration() in question still lives directly in Mycroft-core, in mycroft.util, but it’s the same function; all of Lingua Franca is a spinoff from mycroft.util)

1 Like

@ChanceNCounter Thanks a lot for your reply… so I’ll wait for that Lingua update
:wink:

Hi, I want to do the same, make it work with french laguage and the information about it is very clear, it’s mainly about modifying some configuration files. However, and even though I have been searching information about it, I don’t how to acces to the shell, to modify such files.
I have to say that this is my second day working with Mycroft, hope you understand. Thanks

hello, if I well understand : you want to know how to access to mycroft files in order to modify them ? If so, this is how I do that : I do a connection in my ubuntu files app : sftp://[IP of mycroft]


You also can open ssh in a terminal
(Je peux parler en français, si tu ne comprends pas mon charabia !)

ça donne ça / you’ll get that