Build an open future with us.

Invest in Mycroft and become a community partner.

Push text to the Mark 1 to say?


#1

I’m sitting at work, and my mark 1 is at home with my wife and child.

My child loves trying to talk to Mycroft, but she can’t speak yet. So i would love to be able to ssh in and push text for Mycroft to say to her.

Is it possible ?


#2

Yup very possible. First you need to set up your home router for port forwarding. The way to do that is going to be dependent on your router, but there are a plethora of resources on google. When you are sshed in, you can enter into the Mycroft CLI by inputing this command python -m mycroft.client.text.main cli --quiet. Then you can tell Mycroft to speak something in the CLI, by this command say something.

Hope this helps!


#3

Oh, and make sure to enable ssh first on the device by holding the button for 3 seconds to bring up the menu, turning the knob to the “SSH” option, and selecting “ALLOW”. By default for security reasons, SSH is disabled.


#4

Let me clarify with a little step by step.

1 Get Mycroft’s IP address.

say “Hey, Mycroft (pause) what is your current IP address?”

The unit will then read out and display its current IP address.

2 Enable SSH

hold the rotary nob down for 2 seconds. Select SSH > ALLOW

3 Reboot

hold the rotary nob down for 2 seconds. Select REBOOT

4 SSH into the device

using PuTTY or similar use SSH to log into the device

username: pi
password: mycroft

5 Enter the Mycroft command line interface ( CLI )

type: python -m mycroft.client.text.main cli --quiet

6 Now you can send commands, query the system, etc. just like you would if you were speaking to it. For some reason it works better if you use all caps ( I just threw a bug on this).

type: say “hello world”

type: say “I love it when lightning strikes nearby. For me it feels a bit like drinking whisky.”

7 Finally - you can skip all of this and simply use the voice interface.

say “Hey, Mycroft ( pause ) I love you bob”


Is there a "command line" TTS?
#5

Beautiful !
didn’t think it was python in the background…

Now to annoy the wife !


#6

If you wanna get real crazy you can also use something like https://github.com/Geeked-Out-Solutions/mycroft-websocket-examples as well to interact directly with the messagebus from python code on your machine. :slight_smile:


#7

I feel a reverse home assistant coming on…


#8

Probably this week :slight_smile:


#9

Hi All, i am trying to reach my Mark1 via websockets from another device. I can use the mycroft-websocket-examples when I run them on the Mark1 itself. But when using the same examples from another device (changing the ip address in the example of course) it does not get connected. i must be doing something wrong? Any advice?


#10

First guess firewall.
second guess not listening on that interface (maybe only on local loop back).

Not much help i know, but a free bump.


#11

Is there a document that shows the menu and all of the sub-options?


#12

@paulbreneman I think this is the documentation you need:

Best, Kathy


#13

Yes, that is fairly good, but doesn’t clearly show sub-options (like SSH has block or allow). Are there other sub-options?


#14

The only other documentation we have on this is our Mark 1 Get Started Guide - this is the booklet that is in the Mark 1 box, or alternative it can be downloaded from the Mark 1 page.


#15

Trying this on a mark 1 but when I type: python -m mycroft.client.text.main cli --quiet

it gives me /usr/bin/python: No module named mycroft.client.text

Any idea how to get it to work? I like this idea: https://github.com/Geeked-Out-Solutions/mycroft-websocket-examples but I it goes a bit beyond my skills


#16

You need to activate the mycroft venv first:

mycroft-venv-activate

And the code has been reorganized so the command should be

python -m mycroft.client.text

Also on a mark-1 you don’t need to run this to start the mycroft cli, you can just run mycroft-cli-lient