H1QL0

              That's pretty tight. You should post that.
              The Shut Eye. s1e3 20:18

Installing ArchLinux
--------------------

I. General part
~~~~~~~~~~~~~~~

Easy way:
.........

  https://arch-anywhere.org/
  
  Install to VirtualBox notes:
  
  Do not choose Estonian mirror
  
  Select: Base-Development + 
          ArchAnywhere XFCE + 
          LightDM + no OS prober
          
  Added:  arch-anywhere: yaourt
          audio: pulse-audio
          internet: firefox, elinks
          terminals: xfce4-terminal
          text editors: gedit mousepad vim
          system: git gpm nmap openssh
          
  SSH:    systemctl start sshd
          systemctl enable sshd

Hard way:
.........

  https://www.archlinux.org/
  https://wiki.archlinux.org/index.php/Installation_guide

Raspberry way:
..............

Depending on what Pi model is available:

  https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3
  https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2
  
Notes on part I:
................

0. Installation from media

*Sync Problems*: Media and installation script/guide have to be maintaned by the same team. Arch-anywhere follows this rule, me learning :), anyway my "Meaningless way" and archlinux-2017.01.01-dual.iso cached on \\tptlive.ee are obsolete now (H23).

1. General ping-pong.

We may speculate, that automated installers definitely "doesn't feet into the arch way".
  
  archlinux-2016.09.03-dual.iso 
    arch-anywhere-2.2.3-dual.iso  2016.09.13
  archlinux-2016.10.01-dual.iso
  archlinux-2016.11.01-dual.iso
  archlinux-2016.12.01-dual.iso
  archlinux-2017.01.01-dual.iso
    arch-anywhere-2.2.4-dual.iso  2017.01.03
    arch-anywhere-2.2.5-dual.iso  2017.01.17
  
However sources found on arch-anywhere-2.2.5-dual.iso are very useful:

  boot from archlinux-2017.11.01-dual.iso
  select "Boot Arch Linux (x86_64)" 
  # echo $SHELL
  /usr/bin/zsh
  # which arch-anywhere
  /usr/bin/arch-anywhere
  # ls -l /usr/bin/arch-anywhere
  -rwxr-xr-x 1 root root 81023 Jan 26 16:29 /usr/bin/arch-anywhere
  
Cool! ISO was released Jan 17.. Whatever..

  # scp /usr/bin/arch-anywhere user@host:/some_path
  
SSH with root access is available "out of the box.."

  # echo "root\nroot" | passwd
  # systemctl start sshd
  
Login now with (putty, ssh, whatever..) as

  user: root
  password: root
  
And don't forget to add port forwarding rule if your Arch-anywhere is on virtualbox guest.

2. Shutdown

  # shutdown -hP now        # init 0 prints "Excess arguments"
  
or

  # pacman -S polkit
  # systemctl poweroff # (reboot, suspend, hibernate)
  
3. If link is down

  See https://tty1.net/blog/2010/ifconfig-ip-comparison_en.html
  
    $ ifconfig
    
  or

    $ ip addr show
    
  Then
  
    # dhcpcd enp0s3
  
4. SSH.

  # pacman -S openssh
  # cat /etc/ssh/sshd_config | grep ^[^#] | head -n 2
  Port 22
  PermitRootLogin yes
  # systemctl start sshd.socket  # status start restart stop
  # systemctl enable sshd.socket
  Created symlink /etc/systemd/system/sockets.target.wants/sshd.socket
  -> /usr/lib/systemd/system/sshd.socket.
  
5. yaourt

  # echo "[archlinuxfr]" >> /etc/pacman.conf
  # echo "SigLevel = Never" >> /etc/pacman.conf
  # echo "Server = http://repo.archlinux.fr/x86_64/" >> /etc/pacman.conf
  # pacman -Sy yaourt
  
II. Jasper
~~~~~~~~~~
  
  # pacman -S python python-pip
  # yaourt -S jasper-voice-control-git         # a
  # yaourt -S jasper-plugins                   # a
  # yaourt -S jasper-stt-pocketsphinx          # a
  # yaourt -S jasper-tts-espeak                # a
  
III. Talk
~~~~~~~~~

Enable sound with alsamixer. Read this:

> if one experiences no audio output via any means while using ALSA, 
> attempt to unmute the sound card. To do this, launch alsamixer and 
> make sure _each_ column has a green 00 under it (this can be toggled 
> by pressing m)

  https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting
  
Update/upgrade system, install some packages: 

  pacman -Syyu
  pacman -S alsa-utils sox wget espeak

Create file named jutt with text in estonian (see Annex 

  espeak --stdout "this is a test" | play -
  espeak -a 100 -p 0 -s 180 -g 8 -v europe/et -f keur  --pho --stdout | play -
  
where

    -a volume
    -p pitch
    -s speed
    -g delay
    -v language
    -f file to read
    
IV. Recognize Speech
~~~~~~~~~~~~~~~~~~~~

Prerequisites

  # pacman -S alsa-lib base-devel swig python2 python2-pip ffmpeg
  
Now build sphinxbase, pocketsphinx as in:

  https://jackscodingcraic.wordpress.com/2014/08/25
  /setting-up-pocketsphinx-on-a-raspberry-pi-arch-linux-arm-usb-webcam/
  
In short:

  cd ~
  wget -c https://sourceforge.net/projects/cmusphinx/files/sphinxbase/5prealpha/sphinxbase-5prealpha.tar.gz
  wget -c https://sourceforge.net/projects/cmusphinx/files/pocketsphinx/5prealpha/pocketsphinx-5prealpha.tar.gz
  tar xvzf sphinxbase-5prealpha.tar.gz
  tar xvzf pocketsphinx-5prealpha.tar.gz
  mv sphinxbase-5prealpha sphinxbase
  mv pocketsphinx-5prealpha pocketsphinx
  cd splinxbase
  ./autogen.sh
  sudo make
  sudo make install
  cd ../pocketsplinx
  ./autogen.sh
  sudo make
  sudo make install
  sudo python2 -m pip install --upgrade youtube-dl
  youtube-dl -f 251 https://www.youtube.com/watch?v=0YY3lywGwUk
  mv 'Linux.. webm' cut.webm
  ffmpeg -i cut.webm -ar 16000 cut.wav
  aplay cut.wav
  pocketsphinx_continuous -infile cut.wav 2> /dev/null > text-cut.txt
  
Complete bullshit on output. However, working tests are in 

  ~/pocketsphinx/test/data/librivox/
  
Maybe some training is necessary..

Working with microphone:
........................

Show devices:

  # arecord -l | grep -i MIC
  card 1: I82801AAICH [Intel 82801AA-ICH], device 1: Intel ICH - MIC ADC [Intel 82801AA-ICH - MIC ADC]
  
Record 10 seconds mono 16-bit 16000Hz Little endian wav file

  $ arecord -f S16_LE -r 16000 test-mic.wav -d 10
  
Links
-----

   1. https://wiki.archlinux.org/index.php/Installation_guide
   2. http://dominicm.com/openssh-server-arch-linux/
   3. https://www.ostechnix.com/install-yaourt-arch-linux/
   4. http://jasperproject.github.io/documentation/
   5. https://wiki.manjaro.org/index.php?title=Pacman_Tips
   6. https://www.digitalocean.com/community/tutorials
            /how-to-use-arch-linux-package-management
      http://www.2daygeek.com/pacman-command-examples/#
