Open kendonB opened 4 years ago
perfect!
Here's what i have so far, https://caster-lexiconcode.readthedocs.io/en/docs/readthedocs/Installation/Linux/Kaldi_Linux/
i'm thinking to drop brew
altogether and move to Pipenv
Edit I need to update the link
and sudo apt install wmctrl
and sudo apt-get install python3-pil python3-pil.imagetk
and pip install pyscreenshot
Need to adjust settings.py so that the setting
PYTHONW = "/usr/bin/python"
gets set as
PYTHONW = "/usr/bin/python3"
need to get it to automatically set the TERMINAL_PATH setting to gnome-terminal
in settings.py
@kendonB did you find windows manager that was more resilient to the xdotool slow keys input bug?
@LexiconCode no I did not. Every alternative I came across had some sort of flaw.
A consistent workaround is to switch the keyboard back to English US. Then the slow typing bug only occurs when typing special characters.
Do you think that could be done programmatically?
Likely possible
Caster currently supports Kaldi on Linux - X11 only. Consider supporting the author daanzu if you use his engine full-time.
1. Caster is depends on Dragonfly which requires [X Window System](https://en.wikipedia.org/wiki/X_Window_System) (X11). You may need to install the [xdotool](https://www.semicomplete.com/projects/xdotool/) program to support X11 for dragonfly's the `Key` and `Text` actions to work. To install `xdotool` from [terminal](https://vitux.com/four-ways-to-open-the-terminal-in-debian/).
sudo apt-get update
sudo apt-get install xdotool
echo $XDG_SESSION_TYPE
portaudio
headers to be order to be able to install/compile the sounddevice
python package.sudo apt install portaudio19-dev
You may also need to make your user account a member of the audio
group to be able to access your microphone. Do this by running usermod -a -G audio account_name_here
.
First Check your python3 --version
/python --version
from terminal. Recommended Python 3.7.x-3.8.x
64bit
If need to install Python you can use Homebrew.
brew install python
- Caster with Python 3 is in beta.sudo apt install python3-pip
if need.If python3 --version
/python --version
does not work. Add python to path from terminal.
export PATH="$PATH:/usr/local/bin/python"
python -m pip install -U \ -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/debian-10 \ wxPython
sudo apt-get install python3-tk
if neededDownload Caster from the master branch.
Open up the zip file downloaded
Copy the contents of Caster-master
folder. You can put it anywhere, but it is common to use \home\Documents\Caster
.
Click Install_Caster_Kaldi.sh
to install prerequisite dependencies and set up Kaldi.
Download your preferred Kaldi model at kaldi-active-grammar/releases
Extract kaldi_model_< Model Type >.zip
to \home\Documents\Caster
\home\Documents\Caster
Run_Caster_Kaldi.sh
\home\Documents\Caster
\home\Documents\Caster
1. - 4.
within the Caster install sectionTroubleshooting Kaldi
Text and keypresses are not being emulated when voice commands are recognized.
Explanation: You are most likely using Wayland instead of X11 in your Linux distribution. Dragonfly is only fully functional in an X11 session. Dragonfly's Input action classes, application contexts and the
Window
class will not be functional under Wayland. It is recommended that Wayland users switch to X11. We would like to support Wayland but there out some outstanding issues due to Wayland's design limitations.Fix: Please refer to the guide above to Step 1 to install
xdotool
Known Issues
Caster's Legion Mouse Grid
is Windows OS only.
Linux Caster support is new. Some commands may not work as expected. Please open up an issue on Github. Include the following:
Application or Grammar Name
The exact command name as spoken
Steps to reproduce the issue.
Hello. I've been attempting some practice installs in virtual machines. I tried to get clever with it, which I think has contributed to my limited success thus far. First I tried in an MX virtual machine. I thought this was clever, because MX has a tool where you can "create an iso for sharing" from an installed system, so I thought if I could get it going, there would be potential for creating an iso with everything already set up. Unfortunately, there seems to be an issue where an old version of evdev is integral to the system, and dragonfly2 clashes with that version of evdev. Also, setuptools wasn't installed on that system by default, so maybe that should be added to the Linux dependencies?
Then, I tried in an ubuntu mate vm. I thought this was clever, because I want to see how many of the unity rules were directly transferable to the mutiny layout. I know that through an error somewhere fairly early in the process, but I seem to of lost my notes on that one.
If I attempt another test install, I'm going to keep it real simple, and try with Linux Mint Paul Cinnamon VM. Might have time to give that a shot this weekend.
Hope this info is somewhat helpful.
Hello. I've been attempting some practice installs in virtual machines.
So another user has set up a Docker File. The advantage of Docker versus a VM is its lighter on resources.
https://github.com/kmdouglass/homelab/tree/master/speech-recognition
Hello. I've been attempting some practice installs in virtual machines.
So another user has set up a Docker File. The advantage of Docker versus a VM is its lighter on resources.
https://github.com/kmdouglass/homelab/tree/master/speech-recognition
Thanks for the tip. I have just started to learn about docker. It's actually one of the things I'm using the Kaldi set up you helped me with for, because the online course I was looking at assumes you're on a Linux host.
Utilizing Docker there's possibly a limitation with utilizing mouse grids and other GUI components. Since I don't have the set up I can't comment on that experience.
I did another practice install in a Linux Mint CInnamon VM. I don't actually intend to use the system in that VM. I was just doing it as a practice exercise for myself and to provide feedback on the installation process. This one was successful :-) I hope some of the information in the attached is helpful.
Install experience in Linux Mint cinnamon 20.1.
I tried to follow everything is written, starting from the top of the issue.
Here's where things started to differ for me.
When installing Python prerequisites, I was prompted to run the following command to add a specific folder to the system path.
export PATH="$PATH:/home/austin/.local/bin"
Secondly, my Install_Caster_Kaldi.sh
file doesn't work as intended, although this is probably a consequence of my bad translation of it, from bat to SH.
My solution was to open a terminal in the Caster directory and run the command
pip3 install -r '/home/austin/Documents/Caster/requirements-mac-linux.txt'
I followed the rest of the instructions as written. Then, at the very end, I could get caster running using the terminal command LexiconCode provided me on my real system.
python3 -m dragonfly load _caster.py --engine kaldi --no-recobs-messages
from within the caster directory.
Weirdly, the system for creating desktop icons in cinnamon doesn't seem to let you specify a working directory. As a result, I couldn't create a desktop icon. If I lengthen the command to CD into the appropriate directory, I get a warning that the bash command has too many arguments, but the command won't execute outside of the Caster directory.
Thought I'd start an issue documenting install issues for Ubuntu.
I found that:
.bashrc
sudo apt install libgtk-3-dev
before installing caster