Easiest way to use Mycroft completely offline

If you manage to release something on Windows any time soon, I’m fairly certain that it’d be really easy to do something with C# or VB.NET that uses the System.Speech.Recognition namespace in the Common Language Runtime. Its accuracy isn’t the best, but it is definitely a functional baseline. And it doesn’t seem to need pauses between each word like DeepSpeech apparently does.

1 Like

I think well trained deepspeech doesn’t require spaces between words. Just the combination of my voice and the ‘pretrained’ model that Mozilla distributes seems to result in that

You can also contribute to project common voice. This is the data that Deepspeech is using in the end. In this way it will get at least used to your accent and tone of voice.

yeah, an offline version would be great. My thought is, even if its a “server” program that runs on a GPU server in my house, then I link my imbeded devices to that server, and skills that need to reach out to the internet would, but most of the stuff would happen within my network would be great!

it running on the device itself would be cool, but at least for me, running a central server that those devices connect to within my house instead of the cloud would be awesome!

An offline version is on our Roadmap :wink:

Just curious, https://home.mycroft.ai/#/deepspeech is just english, isn’t it? Because I’ve found some sentences in spanish and in german… and they were recognized not only correctly, but written in a perfect spanish (e.g: cómo estás, even with the proper accents!)

Buenos dias @malevolent! Great question. DeepSpeech is starting to provide translations for both German and Spanish. If you’re confident that the transcription is correct then you’re welcome to tag it :slight_smile:

Wow, that’s an awesome new! :raising_hand_man:

It would be interesting to tag or filter somehow those new languages, so people who can understand them can flag them out as correct and don’t create false positives… I mean, english people who doesn’t speak any other language, most probably will flag any other language as “No” because they will think is not english. Even me, who speaks spanish, doubted if mark it out or not, because I didn’t see any language filter on the site. It would be a shame to have so many few sentences on those new languages marked as non-valid when the are really good, don’t you think?

Any updates on offline/private/firewalled use?

As written in the other topic - you might want to have a look into this: https://github.com/MycroftAI/personal-backend

1 Like

And as seen in chat, https://github.com/MycroftAI/selene-backend is now out.

I will add that the biggest hinderence is still a strong speech recognition technology that can be run locally. While many tout CMU Sphinx/PocketSphinx or Kaldi as options, the experience of many is that they really aren’t adequate. Mozilla’s DeepSpeech has the brightest future, IMHO, but practically speaking it is still not quite ready for prime time for most users.

It is a bit of a chicken-and-the-egg situation, but I don’t think there is a strong case for creating an easy offline setup before the core components are ready. It is close, but I suspect it will be at least another year before we (the open source community) have all those pieces ready.

5 Likes

Maybe I’m oversimplifiying this, with all the deepspeech learning talk, but unless this is newly added, I just found this topic because I wanted to use mYcroft offline until I can get the security issues resolved like the one mentioned in the install re port 8181. And so I found the below setting in the README to disable Home, I will paste below. Of course, I needed to install the ‘local’ speech recognizer Mimic first (does this include the deepspeech personal backend mentioned above? I might assume its only a static model not dynamicaly learning, but that works for getting started).

## Using Mycroft Without Home

If you do not wish to use the Mycroft Home service, before starting Mycroft for the first time, create `$HOME/.mycroft/mycroft.conf` with the following contents:

```
{
  "skills": {
    "blacklisted_skills": [
      "mycroft-configuration.mycroftai",
      "mycroft-pairing.mycroftai"
    ]
  }
}
```

Mycroft will then be unable to perform speech-to-text conversion, so you'll need to set that up as well, using one of the [STT engines Mycroft supports](https://mycroft-ai.gi
tbook.io/docs/using-mycroft-ai/customizations/stt-engine).

You may insert your own API keys into the configuration files listed above in <b>Configuration</b>.  For example, to insert the API key for the Weather skill, create a new JS
ON key in the configuration file like so:

```
{
  // other configuration settings...
  //
  "WeatherSkill": {
    "api_key": "<insert your API key here>"
  }
}
```

Hey there,

Mimic is a Text-To-Speech (TTS) not Speech-To-Text (STT) engine. So you’d want to look at the other options listed in our docs. DeepSpeech is one possibility for STT engines.

The personal backend is not related to DeepSpeech and is not an STT engine. It is a replacement for home.mycroft.ai.

Any concerns you have with port 8181 being used would still exist if you run Mycroft without communicating with Mycroft’s backend. It is the websocket that your local Mycroft instance uses to communicate with different parts of itself. Best to lock it down with a firewall as described in the other thread.

I just found vosk a good tool (at least it seems like) which is a stt service running offline with good accuracy. I just do not know how use this instead of the normal stts.

vosk is not supported by mycroft, but you can install my hivemind skill

Then you can run mycroft without speech client and use the voice satellite instead (it supports vosk and deepspeech to run offline)

ill make a longer post soon about hivemind, and maybe a guide to run offline

Meanwhile if you are feeling adventurous links above should be helpful, apologies for lack of documentation in advance

2 Likes

I just want to add that the “port 8181” issue is only an issue if:

  • You are not running a firewall on the computer that runs Mycroft, and the attacker is inside your LAN, or
  • You are not running a firewall on your router, or
  • Your router is forwarding 8181 to the computer that runs Mycroft, or
  • The attacker is actually logged into the computer that runs Mycroft

There’s a disclaimer for good measure, but the person who “publicly disclosed” the vulnerability didn’t seem to understand that the unsandboxed git repo is fundamentally the dev build with the message bus exposed for roughly the same reason that SDK versions of major hardware tend to come with a serial port, whereas the consumer version will have that space on the board unpopulated.

If people who don’t normally have the stomach for /r/selfhosted software are trying to power through just because of that scary notice, all you need to do is secure port 8181 literally any way whatsoever.

1 Like
  • Or, the firewall is set up incorrectly (which I asked for specifics on in the post below).

The link is to my summary of the correct firewall settings… perhaps you could check them.

Regarding the OP going completely offline, in the second reply from KathyReid, she explains the STT (speech rec, right?) is the biggest obstacle at the moment. In the last few posts there seems to be progress on that front, though Google’s DeepSpeech is very accurate, but my understanding is currently not downloadable. Firefox’s may be, and there are other options directly above from jarbasAI.

The Mimic TTS can be downloaded. And the Mycroft.ai site ‘backend’ can be disabled by the config settings I pasted from the README. Or people have linked several personal backend projects, if you dont trust the initial setup from Mycroft.ai (dont know if it can be setup with the config settings in place from the getgo, havent tested), or you want to manage your own skills and config repository (which at that point, isnt it easier to apply skills changes and settings directly?)

For me, I have no problem using bandwidth for Googles DeepSpeech, and that seems to be less of a security concern if your voice data is anonymized, but I could see where wanting offline everything could be useful for all internal networked IOT and home devices could be controlled without any internet (appliances, gardening, robots, etc…).

Again, for me, I just wanted to secure unknown internet traffic after the port 8181 warning, but in the post I linked see all outbound traffic is on regular ports 80 and 443, the latter for secure account data I would presume. After securing port 8181 on internal networks with the above firewall settings, and disconnecting Mycroft.ai (at least until I want to exchange skills), I feel more confident any internet traffic from mycroft is at the same level of risk as a browser using ports 80 and 443. Correct me if Im wrong. (oh, and as was pointed out on the other post, where more discussion about security probably belongs, the threat from exposing port 8181 more than to localhost would be limited to data shared with mycroft… which could range from trivial to significant).

go fully offline using

2 Likes

Mozilla’s deepspeech is either viable or very close for North American English. You can download that over on their github:

1 Like