jasperproject / jasper-client

Client code for Jasper voice computing platform
MIT License
4.52k stars 1.01k forks source link

VirtualBox - Jasper Instalaltion - #578

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello, Jasper is cool, looks like cool, now we need to give evryone the chance to using it !!

not evryone have a raspberry, not evryone have the way to install is own jasper, so now i decide to create a virtualBox jasper ready to works, means with all sysmte Windows, Linux, u have to start the Virtual Machine, and he ready to talk with him !

this is the idea !

a ready VM box, ready to use !

ok so now let's start the Image :)

hope using this post to help evryone with this idea

So first question, can we create a vm linux with jaasper presintalled ?

So i m starting with ubuntu 16.04 frech install and updating :

First dependencies :

sudo apt-get install git-core python-dev python-pip bison python-pyaudio --yes

well this lib is not found on ubuntu 16.04 : libasound2-dev libportaudio-dev

Clone jasper :

git clone https://github.com/jasperproject/jasper-client.git jasper

sudo pip install --upgrade setuptools

sudo pip install -r jasper/client/requirements.txt

sudo apt-get install pocketsphinx

sudo apt-get install subversion autoconf libtool automake gfortran g++ --yes

not finished

ghost commented 7 years ago

Hello so i try a new technicque installation :

I used the ubuntu server minimal :

Found here --->

i m using this script to install all jasper necessary :

sudo apt-get install subversion autoconf libtool automake gfortran g++ python-setuptools git festival festvox-don flite python-espeak espeak libttspico0 libttspico-utils libttspico-data python-pocketsphinx python-yaml python-tz python-requests build-essential python-pyaudio --yes 
sudo easy_install pip
git clone https://github.com/jasperproject/jasper-client.git
sudo pip install -r jasper-client/client/requirements.txt
sudo pip install APScheduler CherryPy PyYAML Pykka RPi.GPIO argparse beautifulsoup4 facebook-sdk feedparser numpy pifacedigitalio --allow-external pygame python-dateutil python-mpd pytz quantities semantic six ws4py wsgiref requests sphinx
svn co https://svn.code.sf.net/p/cmusphinx/code/trunk/cmuclmtk/
cd cmuclmtk/
./autogen.sh && make && sudo make install
cd ..
cd jasper-client/client
python populate.py
python main.py

ok when jasper is lunching i have this error :

*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
ERROR:client.vocabcompiler:Fatal compilation Error occured, cleaning up...
Traceback (most recent call last):
  File "../client/vocabcompiler.py", line 163, in compile
    self._compile_vocabulary(phrases)
  File "../client/vocabcompiler.py", line 269, in _compile_vocabulary
    vocabulary = self._compile_languagemodel(text, self.languagemodel_file)
  File "../client/vocabcompiler.py", line 290, in _compile_languagemodel
    cmuclmtk.text2vocab(text, vocab_file)
  File "/usr/local/lib/python2.7/dist-packages/cmuclmtk/__init__.py", line 485, in text2vocab
    text2wfreq(text, wfreq_file, **text2wfreq_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/cmuclmtk/__init__.py", line 114, in text2wfreq
    raise ConversionError("'%s' returned with non-zero exit status '%s'" % (cmd[0], exitcode))
ConversionError: 'text2wfreq' returned with non-zero exit status '127'
ERROR:root:Error occured!
Traceback (most recent call last):
  File "../jasper.py", line 146, in <module>
    app = Jasper()
  File "../jasper.py", line 109, in __init__
    stt_passive_engine_class.get_passive_instance(),
  File "../client/stt.py", line 48, in get_passive_instance
    return cls.get_instance('keyword', phrases)
  File "../client/stt.py", line 40, in get_instance
    vocabulary.compile(phrases)
  File "../client/vocabcompiler.py", line 171, in compile
    raise e
ConversionError: 'text2wfreq' returned with non-zero exit status '127'

but if it try to make talk the serveur that's works :

with this script : sudo nano talk.sh

#!/bin/bash
pico2wave -l=fr-FR -w=/tmp/test.wav "$1"
aplay /tmp/test.wav
rm /tmp/test.wav

Then run it with the desired text:

<scriptname>.sh "hello world"

or read the contents of an entire file:

<scriptname>.sh "$(cat <filename>)"

even with this i can heard the server talk :

espeak "hello World ! "

Web source for all this stuf i found : https://doc.ubuntu-fr.org/jasper https://jasperproject.github.io/documentation/configuration/ https://fluoblog.wordpress.com/2008/01/13/resolution-des-problemes-de-son-sous-ubuntu/ https://askubuntu.com/questions/53896/natural-sounding-text-to-speech http://en.ig.ma/notebook/2012/virtualbox-guest-additions-on-ubuntu-server