-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_nerd-dictation.sh
executable file
·58 lines (48 loc) · 1.79 KB
/
install_nerd-dictation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#
#based on:
#https://github.com/ideasman42/nerd-dictation
#https://github.com/papoteur-mga/elograf
#
#https://gnulinux.ch/open-source-spracherkennung
#https://alphacephei.com/vosk/install
#
#pip3 install vosk
#pip3 install sounddevice
#pip3 install vosk
#pip3 install vosk --upgrade
#pip3 install pip-review
#pip-review --interactive
function check_install {
echo "checking install: ""$1"
dpkg -l | grep -qw "$1" || sudo apt-get install "$1" -y
}
check_install xdotool
mkdir -p /home/$USER/programs_setup/
cd /home/$USER/programs_setup/
git clone https://github.com/ideasman42/nerd-dictation.git
cd nerd-dictation
wget https://alphacephei.com/kaldi/models/vosk-model-small-en-us-0.15.zip
unzip vosk-model-small-en-us-0.15.zip
mv vosk-model-small-en-us-0.15 model
#./nerd-dictation begin --vosk-model-dir=./model &
## Start speaking.
#./nerd-dictation end
mkdir -p ~/.config/nerd-dictation
mv ./model ~/.config/nerd-dictation
#cd /home/$USER/programs_setup/
#git clone https://github.com/papoteur-mga/elograf
#cd elograf
#cd elograf && nano elograf.py from /usr/share/vosk-model to /home/$USER/.config/nerd-dictation/model
#cd ..
#python3 setup.py install --user
#rm -r /home/$USER/.local/lib/python3.9/site-packages/eloGraf
#rm /home/$USER/.local/bin/elograf
#rm /home/$USER/.local/lib/python3.9/site-packages/elograf-0.3.0.egg-info
#rm /home/$USER/.local/share/applications/elograf.desktop
echo "settings manager > keyboard > Application Shortcuts > /home/barney/programs_setup/nerd-dictation/nerd-dictation begin> ctrl alt b"
echo "settings manager > keyboard > Application Shortcuts > /home/barney/programs_setup/nerd-dictation/nerd-dictation end> ctrl alt e"
exit
/home/$USER/programs_setup/nerd-dictation/nerd-dictation begin
# Start speaking.
/home/$USER/programs_setup/nerd-dictation/nerd-dictation end