Install on Linux Mint

First of all, thanks a lot to all Mycroft team and community to share this thrilling project.

Installing of Mycroft in a desktop, Linux Mint 18 (Sarah). Done, near that no problems, only two issues that I think could be interesting to share:

  1. “automake” package is need. It could be interesting add it to “build_host_setup_debian.sh” ?

  2. Desktop has several audio boards, microphone was not in the default input card, it has been necessary to add the line:

“device_index”: 5

to section “listener” of file “mycroft.conf”. Number 5 is the result of the following small python script:

import pyaudio
p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
  if (p.get_device_info_by_host_api_device_index(0,i).get('maxInputChannels')) > 0:
    print "Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name')

(source: http://stackoverflow.com/a/39677871 )

that is run with:

source $HOME/.virtualenvs/mycroft/bin/activate
python theFileWithTheScript.py

and nothing else, testing now the Mycroft.

Thanks again and kind regards from Spain.

2 Likes

Hi,
how did you install mycoft on Linux Mint?
I couldn’t find any instructions.
Could you post us a Link?

This would be awesome :slight_smile:

Hi,

I’ve followed the steps from dev docs: https://docs.mycroft.ai/installing.and.running/installation/git.clone.install

  1. download sources from git

  2. install need packages with “./build_host_setup_debian.sh” (but remember one package seems missing, see first post, edit the script or install it manually).

  3. compile with “bash -x ./dev_setup.sh” (it is possible execute simply ./dev_setup.sh but I prefer see the commands that are on-going). If, for any reason, it is need to stop and retry, it seems that are some issue with mimic, I need to manually remove “mimic” directory before to execute again the script.

  4. execute with “mycroft.sh start”

This should be enough, however, in my particular case:

  1. No audio. After test my hardware and sound options with “audacity”, I configured the audio card as explained in first post (computer has several sound cards, one in mainboard and another as usb headphones).

  2. stop, start again and done.

( it has been a grateful surprise that no more issues appears. I remember very more problematic packages :-).

Kind regards.

2 Likes

I had an issue with following the steps given in the dev docs, because diverse scripts changed ownership of mycroft-core to root, meaning scripts couldn’t change them anymore.
To solved this from gui, open nemo as root (nemo is the file explorer), right click mycroft-core, permissions, change ownership to you, and start from where you lef toff

Can someone please help me get Mycroft running. My sound comes over the HDMI. I’ve got the microphone plugged into motherboard soundcard. I’ve tried setting device_index to 0 and 2. Thanks.


ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
Input Device id 0 - HDA Intel PCH: ALC892 Analog (hw:0,0)
Input Device id 2 - HDA Intel PCH: ALC892 Alt Analog (hw:0,2)
Input Device id 6 - sysdefault
Input Device id 16 - pulse
Input Device id 18 - default


2017-06-05 08:01:59,798 - mycroft.configuration - INFO - Loading configuration: /home/mint/Desktop/mycroft-core-dev/mycroft/configuration/mycroft.conf
2017-06-05 08:01:59,799 - mycroft.configuration - DEBUG - Configuration ‘/home/mint/Desktop/mycroft-core-dev/mycroft/configuration/mycroft.conf’ loaded
2017-06-05 08:01:59,799 - mycroft.configuration - DEBUG - Configuration ‘/home/mint/.mycroft/mycroft.conf’ not found
2017-06-05 08:01:59,799 - mycroft.configuration - INFO - Loading configuration: mycroft.ai
2017-06-05 08:01:59,891 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-06-05 08:02:00,282 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device/3d211b28-2711-4943-8e0d-80f07ed1fc5c/setting HTTP/1.1” 200 2922
2017-06-05 08:02:00,285 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-06-05 08:02:00,674 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device/3d211b28-2711-4943-8e0d-80f07ed1fc5c/location HTTP/1.1” 200 4
2017-06-05 08:02:00,679 - mycroft.configuration - INFO - Loading configuration: /etc/mycroft/mycroft.conf
2017-06-05 08:02:00,679 - mycroft.configuration - DEBUG - Configuration ‘/etc/mycroft/mycroft.conf’ not found
2017-06-05 08:02:00,679 - mycroft.configuration - DEBUG - Configuration ‘/home/mint/.mycroft/mycroft.conf’ not found
2017-06-05 08:02:00,679 - mycroft.configuration - INFO - Loading configuration: /home/mint/.mycroft/mycroft.conf
2017-06-05 08:02:00,680 - mycroft.configuration - DEBUG - Configuration ‘/home/mint/.mycroft/mycroft.conf’ not found
2017-06-05 08:02:00,680 - mycroft.configuration - DEBUG - Configuration ‘/home/mint/.mycroft/mycroft.conf’ not found
Carnegie Mellon University, Copyright © 1999-2011, all rights reserved
mimic developers, Copyright © 2016, all rights reserved
version: mimic-1.2.0.2 ()
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
Expression ‘paInvalidSampleRate’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2048
Expression ‘PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2719
Expression ‘PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2843
Exception in thread Thread-15:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/home/mint/Desktop/mycroft-core-dev/mycroft/client/speech/listener.py”, line 59, in run
with self.mic as source:
File “/home/mint/Desktop/mycroft-core-dev/mycroft/client/speech/mic.py”, line 110, in enter
input=True, # stream is an input stream
File “/home/mint/.virtualenvs/mycroft/local/lib/python2.7/site-packages/pyaudio.py”, line 747, in open
stream = Stream(self, *args, **kwargs)
File “/home/mint/.virtualenvs/mycroft/local/lib/python2.7/site-packages/pyaudio.py”, line 442, in init
self._stream = pa.open(**arguments)
IOError: [Errno Invalid sample rate] -9997

2017-06-05 08:02:00,953 - mycroft.messagebus.client.ws - INFO - Connected
fatal: Not a git repository (or any of the parent directories): .git
2017-06-05 08:02:00,955 - mycroft.util.setup_base - DEBUG - No module named version
2017-06-05 08:02:00,955 - mycroft.util.setup_base - ERROR - Command ‘[‘git’, ‘rev-parse’, ‘–short’, ‘HEAD’]’ returned non-zero exit status 128
Traceback (most recent call last):
File “/home/mint/Desktop/mycroft-core-dev/mycroft/util/setup_base.py”, line 44, in get_version
[“git”, “rev-parse”, “–short”, “HEAD”]).strip()
File “/usr/lib/python2.7/subprocess.py”, line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command ‘[‘git’, ‘rev-parse’, ‘–short’, ‘HEAD’]’ returned non-zero exit status 128

Mycroft needs a rate of 16000 samples/s and your device seems not allow them. Try config “pulse” and select device with pulseaudio controler, it should adapt speeds.