Mycroft with clarifai

I just posted my second Mycroft based project. It combines Picroft and the clarifai python API to analzye images taken by the picamera(or test images in a specific directory).

Not as refined as my first, bascially just has Mycroft speak the concepts/tags associated with images, but I hope it helps or inspires others. . .

1 Like

Awesome walkthrough! I was looking through your code, and a good way to store API keys is to leverage the skill settings feature of mycroft. Soon, users should be able to log into the to input their api keys without having to do it through code. Also you can check out using the skill settings feature to store skill specific settings instead instead of using mycroft.conf (saw a TODO comment about it in your code). Good example can be found in the pandora skill on how to leverage the skill settings.

Great work! I will have to get a pi camera and try this out. :slight_smile:


Thank you for the compliment. I have just implmented your settings.json recommendation and it seems to be working very well!

I had to move the instantiation of the Clarifai app object out of:

class SmartEyeSkill(MycroftSkill):
    def __init__(self):
        super(SmartEyeSkill, self).__init__(name="SmartEyeSkill")
	#self.clarifai_app = ClarifaiApp(api_key=self.settings["api_key"])

and into:

def initialize(self):
    self.clarifai_app = ClarifaiApp(api_key=self.settings["api_key"])

As the skill does not has access to the local file system, until initialize is called.

I am working on making the spoken reponse to the image tags a bit more interesting and will update with these changes on github and when completed.

I am looking forward to your writeup of the pianobar-skill, looks like there are a lot of intersting things going on in there to learn from!

Thanks again for the compliment, tip and project respect on!


1 Like

Part II is posted:

Michael, thanks! settings.json works great!


PS Project respects, if warranted, are greatly appreciated!


Mad respect and very warranted.

Keep it up!

Thanks! Both are great platforms to work with.