Build an open future with us.

Invest in Mycroft and become a community partner.

Configured Kaldi as STT: is Kaldi-STT used?


#1

My aim is to make get a completely local mycroft to run. I am trying to get Kaldi-STT to be used as STT. However, I have some doubts if Kaldi is actually used.

I started with setting up Kaldi-STT in a docker container (following https://github.com/jcsilva/docker-kaldi-gstreamer-server)
I created one worker and I can test it using some of the examples given in the explanation on the github page.
Using http://www.websocket.org/echo.html I can request the status and I see the worker and I see an update when something is processed.

I have configured Mycroft to use Kaldi as STT:

    {
      "stt": {
        "module": "kaldi",
        "kaldi": {
          "uri": "http://localhost:8080/client/dynamic/recognize"
        }
      }
    }

However, when I start Mycroft and ask something, no worker of Kaldi is doing something, which makes me think it is not using Kaldi at all. How can I test/make sure that Mycroft is using Kaldi?


#2

You can tail the voice log, for a git checkout: tail -f scripts/logs/mycroft-voice.log and for a mark-1/picroft it should be tail -f scripts/logs/mycroft-voice.log

If you see these kinds of messages it’s still using the “default” stt:

2017-02-07 20:31:53,645 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/stt?lang=en-US&limit=1 HTTP/1.1" 200

Which config are you editing? You should put any changes into ~/.mycroft/mycroft.conf or /etc/mycroft/mycroft.conf


#3

Thank you for the quick reply!

Yes I still see those. Also I checked in /mycroft/stt/__init__.py and it still uses MycroftSTT and not KaldiSTT (this is called from /client/speech/listener).

about the config: I have neither of those. I am running mycroft on a linux machine, I have cloned the git to a local folder and I am running it from there. I see that sometimes a debug message is thrown saying that it cannot find the config files in the locations that you mention. --> should I change something in my setup? I do see a message saying that it did find the config file that I am updating.


#4

Basically you should create the mycroft.conf file in ~/.mycroft/ and edit that.

There is a resolution order of the configs:

Default config (mycroft-core/mycroft/configuration/mycroft.conf)
Settings from home.mycroft.ai
System wide settings (/etc/mycroft/mycroft.conf)
User settings (~/.mycroft/mycroft)

So the user settings have top priority and the defaults the lowest.

/Åke


#5

OK, I was changing the default config :wink:
Now I copied my conf file to ~/.mycroft/ but still the Mycroft-STT is used… any idea what is wrong?
—> wait! Now it works! not sure why the first time it was still using Mycroft-STT maybe I was too quick with testing!

So it is solved: I was editing the default config which was then overwritten by the settings from home.mycroft.ai.

Thanks for the help!


#6

if you are looking to use a fully local mycroft keep an eye on https://github.com/JarbasAl/personal-mycroft-backend/, currently under construction

maybe also of interest https://github.com/JarbasAl/jarbas-core/tree/server/mycroft/server