Mycroft Mimic: Difference between revisions
Jump to navigation
Jump to search
Added mimic KDE and gnome instructions
mNo edit summary |
(Added mimic KDE and gnome instructions) |
||
Line 12: | Line 12: | ||
===Build Mimic 1 on device=== | ===Build Mimic 1 on device=== | ||
While setting up a Mycroft device installer will ask to build Mimic 1 locally. If you initially skipped this you can also re-run dev_setup.sh with a -fm flag for "force mimic".<blockquote>./dev_setup.sh -fm</blockquote>You can do the opposite, by running flag to "skip mimic":<blockquote>./dev_setup.sh -sm</blockquote> | While setting up a Mycroft device installer will ask to build Mimic 1 locally. If you initially skipped this you can also re-run dev_setup.sh with a -fm flag for "force mimic".<blockquote>./dev_setup.sh -fm</blockquote>You can do the opposite, by running flag to "skip mimic":<blockquote>./dev_setup.sh -sm</blockquote> | ||
== '''KDE & gnome integration''' == | |||
After installing mimic on your system adding this line to a custom keyboard shortcut in KDE or Gnome. | |||
<code>xsel > /tmp/speak.txt | sleep 0.3 | mimic -f /tmp/speak.txt | pkill xsel</code> | |||
I further optimised this by adding some configuration options that change the pitch and speed of the voice: | |||
<code>xsel > /tmp/speak.txt | mimic -voice slt --setf duration_stretch=0.85 --setf int_f0_target_mean=165 -f /tmp/speak.txt | pkill xsel</code> | |||
Stop mimic with: | |||
<code>pkill mimic</code> | |||
'''What do these commands and switch’s do:''' | |||
<code>xsel > my_file_name.txt</code> (over rights the text in the file with highlighted text) | |||
<code>sleep 0.3</code> (tells the next command to wait for 0.3 seconds) | |||
<code>mimic</code> (calls the mimic tts engine to start speaking) | |||
<code>-voice slt</code> (sets the voice to the slt voice) | |||
<code>--setf duration_stretch=0.85</code> (makes it speak 25% faster (1 = normal speed and 1.5 in slower 50%)). | |||
<code>--setf int_f0_target_mean=165</code> (makes the pitch higher and =1 would make the pitch very low). | |||
<code>-f</code> (means read text from file) | |||
<code>pkill xsel</code> (stops the computer starting a new process for xsel every time this command is run). | |||
There are quite a few voices installed with Mimic, the voice slt was my favourite. Type: <code>mimic -lv</code> in terminal to see a list of installed voices. Type: <code>man mimic</code> to see all the options and switches. | |||
Mimic is built on flite tts and the commands are the same as far as I can see. |