Fairytalez skill - Let mycroft tells fairytles


#1

How to install fairytalez skill

  • Install fairytalez skill by …
msm install https://github.com/andlo/fairytalez-skill

How to test Fairytalez skill

Specify the steps the user should take to test the Skill, such as;

  • does it install

  • can you get any fairytales when asking “Hey mycroft - tell a fairytale” ?

  • does he find the tales you want ? (see list here https://fairytalez.com/fairy-tales/)

  • can you stop him from telling by stop command or button on mark_1 ?

  • can you continue the storry by saying “hey mycroft - continue story”?

Where feedback on Fairytalez skill should be directed a

Please give feedback here or through Issues on GitHub, or via Mycroft Chat.

Interesting in this skill is

  • Use of BeautifulSoup for webscraping
        soup = BeautifulSoup(requests.get(url).text,"html.parser")
        lines = [a.text.strip() for a in soup.find(id="main").find_all("p")[1:]]
        lines = [l for l in lines if not l.startswith("{") and not l.endswith("}")]
        return lines
  • use og match_one from mycroft.util.parse to get best match from users spoken answer against the story index.
 index = self.get_index("https://fairytalez.com/fairy-tales/")
        result = match_one(response, list(index.keys()))

#2

I would be happy if someone did test this skill so it could go to the market….

Just added author info and information about fairytalez.com aswell as put in some smale sleep to get it sound a little more natural.


#3

I will try and look at it this week.


#4

The skill seems to install correctly, and also will tell a fairy tale. The problem that I see, in my first 5 minutes of use, is the search. I think that it should take a title or subject as a variable when asking to tell a fairy tale. Ex. “hey Mycroft tell me the fairy tale Aladdin” At this point, it does not understand when you ask that. It DOES however understand when I ask it to tell a fairy tale. This is a good start, and I think it would be a great addition. Thank you for your work.


#5

Thanks for input.

You have a good point, and I will look into extending the skill as you describe.


#6

I just added this as described.

you can test by “Hey Mycroft. Install Fairytalez beta version”


#7

Just installed this version, and indeed it lets me specify a fairy tale. Next issue, if it cannot find the correct one, ex “read me the fairy tale the three bears”, it correctly asks if the closest one found is right, BUT, it will not take no as an answer. Also, you might let the skill accept the stop command. Currently, while the skill is telling the fairy tale, that’s ALL it does. It will not accept me to tell it to stop.


#8

good points :slight_smile:

I see I didnt respect no for an asnwer. That were a mistake, and easyly fixed :slight_smile:

Him not respecting the stop I dont understands. It is implemented, and he should stop. But you are right he dosnt.
My code says:

        lines = self.get_story(url)
        for line in lines[bookmark:]:
            if not self.is_reading:
                return
            self.speak(line, wait=False)
            self.settings['bookmark'] += 1
            time.sleep(1)

and the stop is

def stop(self):
        if self.is_reading is True:
            self.is_reading = False
            return True

As far as I understands that says that if variable is_reading is true he will go throu al lines in the story one by one and if it is false, he stops. And he checks after each line.

But I will look into it. Thanks for feedback :slight_smile:


#9

I have been dooing lots of work here and some rewrite to make the stop work better.
That includes splitting up the text in smaller bites and be sure that loop is only sending one sentense to the TTS at a time.

Also fixed problem with mycroft didnt take no for an answer :wink:


#10

I just heard back from the makers of www.fairytalez.com who were happy about the skill. But as he didnt have acces to a mycroft, he couldnt test and try it.

So I will try to make a short video so he can have a look :slight_smile:


#11

Nice!! It kinda makes it worth it when the makers of something enjoy when their product is improved upon. I will try and do some more testing soon. I am hoping to have it for my granddaughter. I think it would be great. The only other issue, that has nothing to do with your skill, but maybe somebody will see, I would like my voice to read it a little bit slower. Is there a way to slow down the speech for a specific skill? I am using the Mycroft mimic2 online voice.


#12

Well, I just installed the beta version, and I can get NOTHING to work with it.

I have tried all of the phrases in the fairytalez.intent file to no avail. Should I go back to the release version?

Also, while testing other skills, I noticed that fairytalez responds to EVERY stop command. Maybe all of the skills do, but this one logs it.


#13

Huu - I am sorry - I hassnt been testing the beta fully, and maybe something went wrong. I were trying and testing lots of ways to fix the stop problem.
Ill look at it as soon as posible.

Regarding to speed of speech, there isnt anything I can do in the skill. Well I have Putin some sleeps between parts, but each line is not posible to slow down. That has to do with mimic2.

regarding to the stop - it is correct that all skill react to it, but only my skill does log - I did that to make sure and to locate if it got the stop. And it does, but there maybe is a problem in the messagequeue, that gives delays, and then the skill dosnt get the stop when it is issued.
It is beeing looked at by Åke-mycroft.


#14

I would realy hope it would be usefull. My 8 yr daughter dosnt understand English, so I cant test it with her :wink: and use google translate for a fairy tale dont give usefull result :slight_smile:

I have fixed the start issue - you can do

(Tell|Read (me|) a (good|) (story| fairy tale)
(Tell|Read) (me|) the story {tale}

So this should work again.
“Tell a good fariry tale”
“Read me the story Aladin and the wonderful lamp”

The stop isnt fixed yet, but as earlier written, it isnt the skill - I does handle the stop command.


#15

“If you want your children to be intelligent, read them fairy tales. If you want them to be more intelligent, read them more fairy tales.”
Albert Einstein


#16

The latest update of Mycroft-core do include fix for stop, so the skill now stops when soppused to.
There are some minor fixes to the skill aswell.

To get those updated to the market I need someone other than me saying the skill works :slight_smile:

Please try the skill by
“hey mycroft install betaversion fairytalez”
and then when intalled
“hey mycroft tell me the story Aladin adn the wonderfull lamp”
and then
“hey mycroft stop”

thanks :slight_smile: