MycroftAI / skill-npr-news

Mycroft AI official News Skill, providing the latest news report from your favorite broadcast.
https://mycroft.ai/skills
Apache License 2.0
9 stars 42 forks source link

"Play the XXX news" does not work as expected #129

Open denics opened 2 years ago

denics commented 2 years ago

Hi al, in the examples, and in the code, it seems possible to ask mycroft to play the news from a specific source (my wife is spanish and I am italian, you can imagine). However, I cannot make mycroft play any news if not from the default one, at least, in italian. I could not even find the intent for that.

krisgesling commented 2 years ago

Hey Denics,

Apologies for the slow response, I've been away a bit and catching up on things.

For phrases like "play the XXX news" this is routed through the Common Play System (CPS). It calls the CPS_match_query_phrase() method on all CPS registered Skills, and they report back their confidence that they have the thing the user wants to play.

In this case it's using this function to match names: https://github.com/MycroftAI/skill-npr-news/blob/424f26eee0cac43cbc9aa1c41619f3bd10f7dd86/stations/match.py#L72

So potentially there's something in there that's not working for translated strings? or it's not matching on the station name/acronym correctly. If you have specific example phrases (in Italian) we could add some unit tests to get a better idea of what's happening.

denics commented 2 years ago

Ok, but then that means that we will never have a correspondence in languages other than en-us. For example in Italian it should be able to play:

A dream would be to be able to say:

Thanks and sorry for pestering you, I know you are busy with Mark II, and I am really looking forward to it, this is why I decided to get my hands dirty :)

krisgesling commented 2 years ago

No that should definitely be possible.

The first one sounds like we just need to get the translations mapped correctly. It might be as simple as adding dimmi and dammi to give.voc? This is actually separate to what I outlined above. It's a direct intent registered to this Skill rather than going through the Common Play disambiguation process.

The second form isn't something that is supported yet but is a great idea.

Not sure exactly when we'll get to it, but I've added a help wanted label just in case.

denics commented 2 years ago

Hi @krisgesling I am a bit frustrated here. I tried to make my picroft tell me the Italian news in many way, but with no success :( I don't know how to ask to read the news from RG1 in Italian and I cannot override the skill configuration (why???). Can you help me?