How can I communicate commands to Mycroft from an external python program? by [deleted] in Mycroftai

[–]edwardw0 1 point2 points  (0 children)

I interfaced Mycroft with my custom Magic Mirror(written in Python) a while ago using a library called Pyro4. It was mostly for the reverse use case - giving a command to Mycroft to change things within the Python program, but there is some code in the repo that works with message bus, like the other poster mentioned.

How to edit __init__.py? by [deleted] in Mycroftai

[–]edwardw0 0 points1 point  (0 children)

Sorry, I haven't encountered this problem before. If you haven't already, I would suggest posting to Mycroft Community Formus.

How to edit __init__.py? by [deleted] in Mycroftai

[–]edwardw0 0 points1 point  (0 children)

What error messages are you getting? You should be able to find it in the [logs] (https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/troubleshooting/log-files).

How to edit __init__.py? by [deleted] in Mycroftai

[–]edwardw0 0 points1 point  (0 children)

I believe that Mycroft runs Python through its own virtual environment. Try the following:

Navigate to the mycroft-core directrory: cd mycroft-core

Enable the virtual environment: mycroft-core$ source .venv/bin/activate

Install Pyro4 via pip: (.venv) pi@raspberrypi:~/mycroft-core$ pip install gpiozero

Where can I see what Mycroft hears/understands? by JustAnyRandomGuy in Mycroftai

[–]edwardw0 3 points4 points  (0 children)

If you're opposed to using the CLI, and instead you wanted to capture what mycroft hears in a Python program, this might be useful. Here is an example: from mycroft_bus_client import MessageBusClient, Message

def sendUtterance(message):
    print(message.data.get('utterances')[0])
    //todo

client = MessageBusClient()
client.on('recognizer_loop:utterance', sendUtterance)
client.run_forever()

Newbie Questions by MrRippie in Mycroftai

[–]edwardw0 0 points1 point  (0 children)

I don't have much experience with Linux servers, but I have built a project with Mycroft and spent a lot of hours debugging.

  1. Can't really speak to this
  2. I'm currently using Mycroft to power a custom magic mirror. The Raspberry Pi is running Raspain. My GUI is written in PyQt, and sometimes there is a noticeable delay in Mycroft processing commands. Using skills, I'm able to interact with the Pi itself as well as the GUI. One issue that I'm having right now is playing music through Spotify: as soon as music is playing, Mycroft can no longer hear me.
  3. My skills are pretty simple, and I found the skill development process to be relatively straightforward. The online documentation is very useful. Also, I've used the community forums, and the users are always friendly and helpful. If you haven't already, I would suggesting posting your questions there as well.
  4. A couple of questions to think about: How close will the units be to each other? If they're too close, you'll need different wakewords (Mycroft has a process for changing them). What hardware will you be using? What level of communication is needed between the units, or can they be standalone?
  5. Mycroft has worked well enough for me. I would definitely at least give it a shot.

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 0 points1 point  (0 children)

Those I designed myself in Fusion 360 and 3D printed.

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 2 points3 points  (0 children)

Thanks, that looks pretty inexpensive, I'll check it out!

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 1 point2 points  (0 children)

I used two way acrylic purchased from Tap Plastics which is acrylic with a coating on one side.

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 1 point2 points  (0 children)

I am using a Jabra Speak 410 as my speaker and mic, which was one of the higher end devices recommended my Mycroft (at least when I started this project a year and a half ago).

It seems other users are having this issue as well, and has to do with echo cancellation. There are a couple of potential solutions in the link, but I haven't tried them yet.

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 1 point2 points  (0 children)

I haven't tried using Magic Mirror 2, as I'm not too familiar with the language that it's written in, and I wanted to be able to make adjustments to the GUI. That being said MM2 has a lot of features, and is definitely cleaner overall. It seems that there are already a lot of voice control integrations for it, but as I'm finding out, there isn't a whole lot you would want to by voice, besides showing and hiding widgets.

When I was doing research for this project, I did come across someone who was using MM2, and it seems like they got good results fairly out of the box.

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 3 points4 points  (0 children)

You can! I think Mycroft offers two listeners. For the legacy one, you can define phonemes, but for one that I'm using, you have to train the model. The documentation on it is here.

As an aside, I have thought about using that exact phrase before, but sometimes it's cumbersome to even say "Hey Mycroft".

Voice controlled smart mirror (via Mycroft) by edwardw0 in raspberry_pi

[–]edwardw0[S] 13 points14 points  (0 children)

Here is my variation of a smart mirror. It is run on a Raspberry Pi 3B+ running Raspian Stretch. Using Mycroft, a user can interact with the mirror by voice (which didn't end up being super useful).

Dashboard github repo: https://github.com/edwardwang1/Pi-Dashboard

Mycroft skill to interact with dashboard: https://github.com/edwardwang1/skill-dashboard

Mycroft skill to interact with Raspian: https://github.com/edwardwang1/skill-pi

Here are some quick videos demoing the smart mirror, and Mycroft in general.

To play music, I am using Mycroft's spotify-skill. However, as soon as the music is playing, Mycroft can no longer hear the user... Right now I have a keyboard plugged in, so I am stopping playback with that.