A Digital Life Assistant (DLA) currently linking the following libraries:
- dragonfly - for speech recognition
- pyttsx or Festival - for text-to-speech
- RiveScript or pyAIML - for chat bots
- AutoPy - for action support in RiveScripts
- opencv - face detection
pyrson may eventually include the following features:
- opencv - face recognition
- AT&T Watson, pocketsphinx, Julius, or Google SST - cross-platform speech recognition
- voiceid - voice identification (diarization) to maintain a user context
- nltk - natural language processing (sentiment mining to change bot context)
- smartThings - home automation
Currently, the project is only supported on Windows due to the dragonfly dependency for speech recognition. Ideally, the libraries will be easy to change in order to accomodate for different platforms/changing technologies/user preferences.
Download and install the following dependencies:
###Windows 7 32-bit: works 64-bit: works (see notes)
- 32-bit Python 2.7
- 32-bit pywin32 Build 217
- dragonfly 0.6.5
- pyttsx 1.0
- (optional)Festival 2.1 - extract to
C:\festival
- (optional)PyAIML 0.8.6
- python-rivescript 1.00
- 32-bit autopy 0.51
- numpy 1.6.2
- opencv 2.4.2 for Windows - unpack to C:\opencv
- 32-bit opencv 2.4.2 python bindings (opencv-python-2.4.2.win32-py2.7.exe)
- working microphone and webcam
- download zip and extract to desired folder
####notes:
- The libraries must be run with administrator rights unless UAC is disabled.
- Pywin32 on 64-bit may encounter pywin32 errors on installation that can be fixed.
- Tests were run using an Intel Core-i5 2500 @3.30 GHz with great performance
Double-click pyrson.py
or
(if UAC is enabled)
- Set
C:\python27
in your PATH environment variable - Open cmd as administrator
- Run
python your\pyrson\directory\pyrson.py
###RiveScript
By default pyrson uses RiveScript as its speech comprehension engine. Documentation for writing your own RiveScript files can be found here. Any RiveScript files in the your\pyrson\directory\bots\RiveScript
folder are loaded by pyrson.
In addition to the standard RiveScript responses, pyrson also includes functions to type text, move the mouse, or click within RiveScript. Here are examples:
//shows an alert
+ give me an alert
- <call>alert do what?</call>
//moves the mouse to 100,150
+ move the mouse
- <call>mouse 100 150</call>
//types Look at me! I'm typing.
+ can you type for me?
- <call>typekeys Look at me! I'm typing.<call>
###PyAIML (if installed)
Pyrson can also use AIML instead of RiveScript. It will load all the AIML files in your\pyrson\directory\bots\AIML
. Just change the following lines in pyrson.py:
from bots import RiveScriptBot
tofrom bots import PyAIML
bot_library = RiveScriptBot()
tobot_library = PyAIML()
botdn = os.path.join(os.path.dirname(__file__),'bots','RiveScript')
tobotdn = os.path.join(os.path.dirname(__file__),'bots','AIML')