Mycroft-core: Using mycroft without home

Created on 4 May 2018  ·  17Comments  ·  Source: MycroftAI/mycroft-core

I would like to use mycroft without Home (mycroft account) setting up my own Google STT api key. I cannot find exact description of that. I am not able do it according short description hele: https://github.com/MycroftAI/mycroft-core#using-mycroft-without-home.

Please, where can I find guide for that?

Thanks.

Most helpful comment

Ok, thanks for response.

Seeing a code I found the way to setup some useful things. I am pasting them here for the others. I would recommend to include them to documentation.

Some modificatins of local config /home/mycroft/.mycroft/mycroft.conf

  • to use custom Google cloud Speech API key (fill your own credentials json):

~json
...
"stt": {
"module": "google_cloud",
"google_cloud": {
"credential": {
"json": {}
}
}
},
...
~

  • to use google tts instead of mycroft mimic package:
    ~json
    ...
    "tts": {
    "module": "google",
    "google": {
    "lang": "en-us",
    "slow": false
    }
    },
    ...
    ~

  • to use espeak tts instead of mycroft mimic package:

    • (don't forget to install espeak package firstly)
      ~json
      ...
      "tts": {
      "module": "espeak",
      "espeak": {
      "lang": "en"
      }
      },
      ...
      ~

All 17 comments

I don't know how to disable dependency on api.mycroft.ai.

1) I set custom google_cloud stt API key.

2) I set "server.update": false in /home/mycroft/.mycroft/mycroft.conf

But I still have these lines in log:

~
14:48:28.473 - requests.packages.urllib3.connectionpool - DEBUG - Resetting dropped connection: api.mycroft.ai
14:48:29.084 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device HTTP/1.1" 401 38
14:48:29.104 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
14:48:29.645 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
~

Why?

Unfortunately I found mycroft documentation very incomplete for advanced playing. It's needed to inspect source code for specific configuration.

  • It's said: "You can use mycroft without home.", but no example config is provided.
  • It's sadi: "You can use your own Google API key." but no example config is provided for that.

It' very interesting project and I like it but IMPROVE DOCUMENTATION, please.

Hi @Josca we're continuously working on the documentation but as you see there are gaps.

If the google_cloud stt is setup correctly you should be able to speak to mycroft and ask for things like the time.

You should blacklist the pairing skill and the configuration skill in the config by adding an entry:

"skills" {
   "blacklisted_skills": ["skill-media", "send_sms", "skill-wolfram-alpha", "skill-pairing", "skill-configuration"]
}

You might still see failed connections to mycroft servers from things like skill-settings. These I don't think respects the update value yet.

Ok, thanks for response.

Seeing a code I found the way to setup some useful things. I am pasting them here for the others. I would recommend to include them to documentation.

Some modificatins of local config /home/mycroft/.mycroft/mycroft.conf

  • to use custom Google cloud Speech API key (fill your own credentials json):

~json
...
"stt": {
"module": "google_cloud",
"google_cloud": {
"credential": {
"json": {}
}
}
},
...
~

  • to use google tts instead of mycroft mimic package:
    ~json
    ...
    "tts": {
    "module": "google",
    "google": {
    "lang": "en-us",
    "slow": false
    }
    },
    ...
    ~

  • to use espeak tts instead of mycroft mimic package:

    • (don't forget to install espeak package firstly)
      ~json
      ...
      "tts": {
      "module": "espeak",
      "espeak": {
      "lang": "en"
      }
      },
      ...
      ~

ping @KathyReid

Will Google TTS work locally? Do we have to install any package for it?

Google TTS does not work locally, it's a remote service. (But you don't need the mycroft-servers for it)

@YogeshSingla , Google TTS is remote but free service. You don't need any registration too. But I think it's not guaranteed working of this service. It's implemented using Python gTTS package. It seems not to be supported by Google itself.

I recommend espeak as a simple and local solution. Its quality is not big but it' reliable.

You must firstly install espeak package to use it:
~
sudo apt-get install espeak
~

Just curious, why would you use espeak for local tts instead of Mimic, which also runs locally? I can think of a free reasons, I honestly am just wondering yours.

I'm also similarly interested in the reasons to avoid Home. Again, I can think of some but would like to know your thoughts if you'd be willing to share.

@penrods

I know that Espeak has a quite low quality compared to Mimic, Google TTS and others, but it also
has many advanteges:

  1. Mimic requires long build. I didn't find any simple guide how to install Mimic as a precompiled package. When I set up mycroft-core, I rather set skip mimic option (bash dev_setup.sh -sm).
    Espeak is a standard Debian package so it's very easy to install and use.

  2. Espeak supports many languages including my native language Czech. I didn't see any list of supported languages in Mimic's docs. I guess it's strongly focused on English (for understandable reasons).

  3. Espeak has very fast response which is very helpful especially during development phase. Mimics maybe has it so, but didn't test it.

  4. For these reasons I found it as a best solution for development purposes.

picotts is similarly fast, but has better output quality, as far as I know (don't know about Czech) - I don't know if it's currently possible to use it with Mycroft out-of-the-box.

I'm also interested in having an independent Mycroft that doesn't depend on internet connection to work.

One of our goals here is to move as much of this "locally" as possible, but overall we want to support all languages. In the meantime we also are aiming to have a viable assistant, not just a toy. So at the moment we have elected to use some cloud services while we worked independently and with partners to build the tech necessary to achieve full offline operation.

So in the interim, we aren't going to focus development resources to support what are inarguably inferior user experiences with older generation TTS engines. You are _absolutely_ welcome to submit PRs if you'd like to see this, but the core team is focused on building open technologies like DeepSpeech and Mimic/Mimic2 rather than stepping backwards in performance and also going down technology alleys which don't have a good route to support other languages.

If you'd like to submit some changes to the dev_setup.sh scripts or doc to support alternative TTS engines, I'm happy to pull them in. But I really don't see that as a step forward in general.

I hope this doesn't seem dismissive, we are just limited in our time and have to choose what we tackle.

@penrods This wasn't a feature request for adding picotts, just a tip for the user above and others who may want to know. The feature request here is for making offline use possible (of which I would understand if it were not in the interest of a company who needs to make a living somehow).

Totally understand, just explaining why we aren't jumping on adding support for picotts and such! I think mimic is perfectly viable as an offline TTS engine today (yeah, it takes a while to build, that is one-time). We are working on several other things for "offline" STT -- really more of a "personal cloud" approach in the near term.

I'm sad to hear it. I'm currently working on a cloudless smart home solution. By default it does not connect to the cloud in any way.

I'm exploring if MyCroft could be a good solution for voice control. But if any installation has to have a cloud connection I cannot use it.

For my intended audience, the limitation of only speaking in English is an acceptable trade-off, at least until edge machine learning hardware becomes common place.

I also noticed the MyCroft has actually built a version of the Tacotron TTS engine? Did it not offer acceptable results?
https://github.com/MycroftAI/mimic2

There has been some progress, there is the personal backend project. However this project is still very much WIP and as stated above for STT you'd need to use something like the deepspeech_server backend with a local instance of deepspeech running on a powerful machine on the local network.

Meanwhile the Selene-Backend (the software stack behind home.mycroft.ai) has been made available to the public.

As I think most if not all of the configurations here is covered by the documentation now and Selene has been released I'm closing this issue.

Was this page helpful?
0 / 5 - 0 ratings