how to setup julius voice control / speech engine on linux
Page 1 of 1
how to setup julius voice control / speech engine on linux
- Code:
New Version
http://sourceforge.jp/projects/julius/downloads/59049/julius-4.2.3-linuxbin.tar.gz
you will also need one of these...
http://voxforge.org/home/docs/faq/faq/what-is-a-dialog-manager
More info found at
found this at http://julius.sourceforge.jp/en_index.php#latest_version
goto directory and extract the zip file and type sh run_install.sh on the cli from the directory where the files were extracted to
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Older version
sudo apt-get install -y julius julius-voxforge
Now navigate to the installed directory and type
- Code:
padsp julius -input mic -C julian.conf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 1
1. Download the newest source tarbal from Julius official site – link
2. Unpack the archive for example to your user home directory
3. Configure and install julius by following commands:
cd ~/julius-4.2.2/ sudo ./configure sudo make sudo make install |
julius //output Julius rev.4.2.2 - based on JuliusLib rev.4.2.2 (fast) built for i686-pc-linux Copyright (c) 1991-2012 Kawahara Lab., Kyoto University Copyright (c) 1997-2000 Information-technology Promotion Agency, Japan Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology Copyright (c) 2005-2012 Julius project team, Nagoya Institute of Technology Try '-setting' for built-in engine configuration. Try '-help' for run time options. |
sudo apt-get install julius-voxforge |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 2
Firstly we need to get back to Julius directory that we unpacked inside our user’s home directory
cd ~/julius-4.2.2/ |
mkdir test cp Sample.jconf my.jconf |
-nolog # disable all logs -quiet # output less log -input mic # live microphone -v sample.dict # word dictionary -dfa sample.dfa # specify DFA and dictionary separately -h /usr/share/julius-voxforge/acoustic/hmmdefs # acoustic HMM (ascii or Julius binary) -hlist /usr/share/julius-voxforge/acoustic/tiedlist # HMMList to map logical phone to physical |
cd ~/julius-4.2.2/test padsp julius -C my.jconf |
padsp julius -C my.jconf STAT: include config: my.jconf <<< please speak >>> |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Part 3
Today short and sweet explanation about how to start control Rhythmbox music player via Julius. Almost everything you need is already on your hard drive(if you’ve followed previous 2 steps).
Let’s start with a little bit of organising files around. We will create new directory where we will put our new files.
cd ~/julius-4.2.2/ mkdir test-python |
1. jconf configuration file
2. .grammar and .voca files
3. script that will grab the output of Julius and it will control Rhythmbox
julius-voxforge package installed in the first step contains(beside HMM file that we have used in previous step) few docs file, example script in Python programming language and .voca and .grammar files. Let’s copy them:
cd ~/julius-4.2.2/test-python cp /usr/share/doc/julius-voxforge/examples/julian.jconf.gz ./ gunzip julian.jconf.gz cp /usr/share/doc/julius-voxforge/examples/controlapp/command.py ./ cp /usr/share/doc/julius-voxforge/examples/controlapp/mediaplayer* ./ ls -la |
command.py – script to grab output and run whatever we like to
julian.jconf – basic configuration script
mediaplayer.grammar – grammar file
mediaplayer.voca – vocabulary file
Ok, we have this file but we need to have compiled version of .grammar and .voca files as well to be able to provide them for usage to Julius. To compile them we will simply run mkdfa command passing file name(WITHOUT extension – without part after . (dot)). Both .grammar and .voca file needs to have the same name. We are running command only one time for both files.
mkdfa mediaplayer |
mediaplayer.grammar has 1 rules mediaplayer.voca has 4 categories and 9 words --- Now parsing grammar file Now modifying grammar to minimize states[-1] Now parsing vocabulary file Now making nondeterministic finite automaton[5/5] Now making deterministic finite automaton[5/5] Now making triplet list[5/5] 4 categories, 5 nodes, 4 arcs -> minimized: 5 nodes, 4 arcs --- generated: mediaplayer.dfa mediaplayer.term mediaplayer.dict |
command.py
julian.jconf
mediaplayer.dfa
mediaplayer.dict
mediaplayer.grammar
mediaplayer.term
mediaplayer.voca
Next step will be setting up configuration file that Julius will look after mediaplayer.dict and mediaplayer.dfa files. To make changes in it just open it with text editor and find 2 lines(line number 36 and 37):
-dfa sample.dfa -v sample.dict |
-dfa mediaplayer.dfa -v mediaplayer.dict |
Now the very last step is simply to run Julius(before that I had problem with privileges – so I have added below first line to fix any possible issues):
sudo chmod 777 -R ./ padsp julius -C julian.jconf | ./command.py |
Taking control of Rhythmbox media player. <<< please speak >>> |
List of commands can be found in command.py file – just as a quick reference I’m giving the list below:
COMPUTER PLAY
COMPUTER NEXT
COMPUTER PREV
COMPUTER SHOW — this probably won’t work because rhythmbox-client was modified and doesn’t contain this option any more
COMPUTER PAUSE
COMPUTER SILENCE
Enjoy it!
Other links to this program help...
https://www.google.com/search?q=linux+Juliu#q=how+to+setup+linux+Juliu&safe=off
http://kamilskowron.pl/en/linux/julius-step-by-step-step-3-taking-control-over-rhythmbox-music-player/
Similar topics
» voice activation for linux control pc with voice
» setup voice activation for linux and raspberry pi
» Female Voice For Espeak Linux Bash Commands
» get google search engine on linux mint
» how to setup samba for linux config and allowing linux shares and adding users to samba commands
» setup voice activation for linux and raspberry pi
» Female Voice For Espeak Linux Bash Commands
» get google search engine on linux mint
» how to setup samba for linux config and allowing linux shares and adding users to samba commands
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum