Git Product home page Git Product logo

j.a.r.v.i.s's Introduction

J.A.R.V.I.S - Just A Rather Very Intelligent System

Created and Tested on Linux with Python 2.7

An attempt to make a very simple, Personal Assistant that understands speech as well as text input and is capable of performing tasks other than conversing. This project is based on AIML 1.0 and uses pyaiml for using the AIML interpreter in python. AIML, is based on pattern matching and this project does not implement any sort of machine learning or language processing. Combined with a few python scripts, J.A.R.V.I.S now performs quite a few tasks:

  • Converses, barely.

    Talk to J.A.R.V.I.S : hello
    J.A.R.V.I.S : Well, hello

    Talk to J.A.R.V.I.S : Who is iron man?
    J.A.R.V.I.S : Iron man is the one who created me.

    Talk to J.A.R.V.I.S : What does JARVIS stand for?
    J.A.R.V.I.S : JARVIS stands for Just A Rather Very Intelligent System

    All conversation is only for the hardcoded patterns, which are quite few. Can be easily extended to add AIML scripts of ALICE and other existing AIs.

  • Rhythmbox: Play, Pause, Open.

    Uses shell commands to play and pause rhythmbox music.

    Talk to J.A.R.V.I.S : play music
    J.A.R.V.I.S : On it!
    Talk to J.A.R.V.I.S : play music
    J.A.R.V.I.S : On it!
    Talk to J.A.R.V.I.S : please open rhythmbox jarvis
    J.A.R.V.I.S : Right away, sir!

  • Tells time.

    Talk to J.A.R.V.I.S : what time is it?
    J.A.R.V.I.S : The time is 4 43 am

  • Gives a brief system status.

    Talk to J.A.R.V.I.S : how are you? / System report / System Status
    J.A.R.V.I.S : I am fine, sir. All systems are at 100 percent. Battery percentage: 100%. Battery state: discharging. 265 processes are currently running. Current volume is 30 percent

  • Suggests Googling for all unrecognized interrogative questions

    Talk to J.A.R.V.I.S : What is IIT, Bombay?
    J.A.R.V.I.S : Do you want me to google that for you?
    Talk to J.A.R.V.I.S : yes
    J.A.R.V.I.S : Right away, sir! Created new window in existing browser session.

  • Plays any song, first search result in youtube

    Talk to J.A.R.V.I.S : play me a song
    J.A.R.V.I.S : What song, sir?
    Talk to J.A.R.V.I.S : Alter Bridge Isolation
    J.A.R.V.I.S : On it! Created new window in existing browser session.

    Uses youtube.py script to find the first search result for the last user input in above case, and opens it in chromium browser.

  • Searches internet.

    Talk to J.A.R.V.I.S : Google what is the answer to life?
    J.A.R.V.I.S : Right away, sir! Created new window in existing browser session.
    Talk to J.A.R.V.I.S : Search youtube for Call of Duty
    J.A.R.V.I.S : On it! Created new window in existing browser session.
    Talk to J.A.R.V.I.S : Search for Navi Mumbai on google maps
    J.A.R.V.I.S : On it! Created new window in existing browser session.

  • Changes Wallpaper.

    Keep a set of wallpapers (and nothing else) in J.A.R.V.I.S/wallpapers directory. wallpaper.py randomly selects one and sets it as the desktop wallpaper by changing the key value using dconf-editor.

    Talk to J.A.R.V.I.S : change wallpaper
    J.A.R.V.I.S : On it!

  • Launches Programs.

    Talk to J.A.R.V.I.S : open nautilus
    J.A.R.V.I.S : Right away, sir!
    Talk to J.A.R.V.I.S : take me to /etc
    J.A.R.V.I.S : Sure thing! (Opens /etc in nautilus)
    Talk to J.A.R.V.I.S : take me home
    J.A.R.V.I.S : Sure thing! (Opens ~ in nautilus)
    Talk to J.A.R.V.I.S : open chromium / open firefox / open calculator / open vlc
    J.A.R.V.I.S : Sure thing!

  • Other:

    Standard replies for unrecognized/unmatched inputs

    Talk to J.A.R.V.I.S : you are dumb
    J.A.R.V.I.S : I don't understand that yet. Maybe you could teach me.
    Talk to J.A.R.V.I.S : no I won't
    J.A.R.V.I.S : I don't know how to answer that. Maybe I could interest you in something else.

    Talk to J.A.R.V.I.S : go to sleep / exit / quit / bye / goodbye

    closes the python script.

Requirements:

Make sure you install these packages before moving forward to other python libraries-

sudo apt install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg libav-tools

You can run pip install -r requirements.txt to install them all.

Individual packages listed as follows-

  • AIML (For Pattern Recognition)

    pip install aiml

  • Speech Recognition

    pip install SpeechRecognition

  • PyAudio is required for microphone input

    pip install pyaudio

  • alsaaudio: (For Volume Control, Linux only)

    pip install pyalsaaudio

  • ttsx: (Offline Text to Speech Service)

    pip install pyttsx

  • Optional for Google Text to Speech :

    • gTTS: (Google Text to Speech service)

      pip install gTTS

    • PyGame: (For audio playback with gTTS)

      pip install pygame

  • argparse (For parsing arguments)

    pip install argparse

Installation:

Clone this repository. Change directories to go to that directory. Run the script "script.py" from the directory containing it. Run script as:

python script.py : for text mode (default) of input

python script.py --voice : for voice mode of input

python script.py --voice --gtts : for voice mode of input, with Google Text to Speech enabled

Voice mode may give a series of warnings for numerous reasons, but still might fuction properly.

Contribution:

A lot can be done with this project. Core AI chatbot like functionality can be added. More python scripts can be associated. Pull requests for any such changes are accepted. Feel free to fork this project and make your own changes too.

j.a.r.v.i.s's People

Contributors

arpan98 avatar cheekujodhpur avatar navanchauhan avatar nihal111 avatar udiboy1209 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

j.a.r.v.i.s's Issues

I am getting an error while installing requirements.txt

pip install -r requirements.t
Collecting argparse
Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Collecting aiml
Using cached aiml-0.9.2-py2.py3-none-any.whl (2.1 MB)
Requirement already satisfied: SpeechRecognition in /data/data/com.termux/files/usr/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (3.8.1)
Collecting pyalsaaudio
Using cached pyalsaaudio-0.9.2.tar.gz (599 kB)
Preparing metadata (setup.py) ... done
Collecting pyttsx
Using cached pyttsx-1.1.tar.gz (23 kB)
Preparing metadata (setup.py) ... done
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Collecting gTTS
Using cached gTTS-2.2.4-py3-none-any.whl (26 kB)
Collecting pygame
Using cached pygame-2.1.2.tar.gz (10.1 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [30 lines of output]

  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using UNIX configuration...

  /data/data/com.termux/files/usr/bin/sh: 1: sdl2-config: not found
  /data/data/com.termux/files/usr/bin/sh: 1: sdl2-config: not found
  /data/data/com.termux/files/usr/bin/sh: 1: sdl2-config: not found
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/data/data/com.termux/files/usr/tmp/pip-install-etkpfwud/pygame_c2dd7e1b52f8451d90abcd9bf859c363/setup.py", line 359, in <module>
      buildconfig.config.main(AUTO_CONFIG)
    File "/data/data/com.termux/files/usr/tmp/pip-install-etkpfwud/pygame_c2dd7e1b52f8451d90abcd9bf859c363/buildconfig/config.py", line 225, in main
      deps = CFG.main(**kwds)
    File "/data/data/com.termux/files/usr/tmp/pip-install-etkpfwud/pygame_c2dd7e1b52f8451d90abcd9bf859c363/buildconfig/config_unix.py", line 188, in main
      DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
    File "/data/data/com.termux/files/usr/tmp/pip-install-etkpfwud/pygame_c2dd7e1b52f8451d90abcd9bf859c363/buildconfig/config_unix.py", line 39, in __init__
      self.ver = config[0].strip()
  IndexError: list index out of range

  Hunting dependencies...

  ---
  For help with compilation see:
      https://www.pygame.org/wiki/Compilation
  To contribute to pygame development see:
      https://www.pygame.org/contribute.html
  ---

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Please help me!!!!

Mark 11

J.A.R.V.I.S - Just A Rather Very Intelligent System

Created and Tested on Linux with Python 2.7

An attempt to make a very simple, Personal Assistant that understands speech as well as text input and is capable of performing tasks other than conversing. This project is based on AIML 1.0 and uses pyaiml for using the AIML interpreter in python. AIML, is based on pattern matching and this project does not implement any sort of machine learning or language processing. Combined with a few python scripts, J.A.R.V.I.S now performs quite a few tasks:

Converses, barely.

Talk to J.A.R.V.I.S : hello
J.A.R.V.I.S : Well, hello

Talk to J.A.R.V.I.S : Who is iron man?
J.A.R.V.I.S : Iron man is the one who created me.

Talk to J.A.R.V.I.S : What does JARVIS stand for?
J.A.R.V.I.S : JARVIS stands for Just A Rather Very Intelligent System

All conversation is only for the hardcoded patterns, which are quite few. Can be easily extended to add AIML scripts of ALICE and other existing AIs.

Rhythmbox: Play, Pause, Open.

Uses shell commands to play and pause rhythmbox music.

Talk to J.A.R.V.I.S : play music
J.A.R.V.I.S : On it!
Talk to J.A.R.V.I.S : play music
J.A.R.V.I.S : On it!
Talk to J.A.R.V.I.S : please open rhythmbox jarvis
J.A.R.V.I.S : Right away, sir!

Tells time.

Talk to J.A.R.V.I.S : what time is it?
J.A.R.V.I.S : The time is 4 43 am

Gives a brief system status.

Talk to J.A.R.V.I.S : how are you? / System report / System Status
J.A.R.V.I.S : I am fine, sir. All systems are at 100 percent. Battery percentage: 100%. Battery state: discharging. 265 processes are currently running. Current volume is 30 percent

Suggests Googling for all unrecognized interrogative questions

Talk to J.A.R.V.I.S : What is IIT, Bombay?
J.A.R.V.I.S : Do you want me to google that for you?
Talk to J.A.R.V.I.S : yes
J.A.R.V.I.S : Right away, sir! Created new window in existing browser session.

Plays any song, first search result in youtube

Talk to J.A.R.V.I.S : play me a song
J.A.R.V.I.S : What song, sir?
Talk to J.A.R.V.I.S : Alter Bridge Isolation
J.A.R.V.I.S : On it! Created new window in existing browser session.

Uses youtube.py script to find the first search result for the last user input in above case, and opens it in chromium browser.

Searches internet.

Talk to J.A.R.V.I.S : Google what is the answer to life?
J.A.R.V.I.S : Right away, sir! Created new window in existing browser session.
Talk to J.A.R.V.I.S : Search youtube for Call of Duty
J.A.R.V.I.S : On it! Created new window in existing browser session.
Talk to J.A.R.V.I.S : Search for Navi Mumbai on google maps
J.A.R.V.I.S : On it! Created new window in existing browser session.

Changes Wallpaper.

Keep a set of wallpapers (and nothing else) in J.A.R.V.I.S/wallpapers directory. wallpaper.py randomly selects one and sets it as the desktop wallpaper by changing the key value using dconf-editor.

Talk to J.A.R.V.I.S : change wallpaper
J.A.R.V.I.S : On it!

Launches Programs.

Talk to J.A.R.V.I.S : open nautilus
J.A.R.V.I.S : Right away, sir!
Talk to J.A.R.V.I.S : take me to /etc
J.A.R.V.I.S : Sure thing! (Opens /etc in nautilus)
Talk to J.A.R.V.I.S : take me home
J.A.R.V.I.S : Sure thing! (Opens ~ in nautilus)
Talk to J.A.R.V.I.S : open chromium / open firefox / open calculator / open vlc
J.A.R.V.I.S : Sure thing!

Other:

Standard replies for unrecognized/unmatched inputs

Talk to J.A.R.V.I.S : you are dumb
J.A.R.V.I.S : I don't understand that yet. Maybe you could teach me.
Talk to J.A.R.V.I.S : no I won't
J.A.R.V.I.S : I don't know how to answer that. Maybe I could interest you in something else.

Talk to J.A.R.V.I.S : go to sleep / exit / quit / bye / goodbye

closes the python script.

Requirements:

Make sure you install these packages before moving forward to other python libraries-

sudo apt install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg libav-tools

You can run pip install -r requirements.txt to install them all.

Individual packages listed as follows-

AIML (For Pattern Recognition)

pip install aiml

Speech Recognition

pip install SpeechRecognition

PyAudio is required for microphone input

pip install pyaudio

alsaaudio: (For Volume Control, Linux only)

pip install pyalsaaudio

ttsx: (Offline Text to Speech Service)

pip install pyttsx

Optional for Google Text to Speech :

gTTS: (Google Text to Speech service)

pip install gTTS

PyGame: (For audio playback with gTTS)

pip install pygame

argparse (For parsing arguments)

pip install argparse

Installation:

Clone this repository. Change directories to go to that directory. Run the script "script.py" from the directory containing it. Run script as:

python script.py : for text mode (default) of input

python script.py --voice : for voice mode of input

python script.py --voice --gtts : for voice mode of input, with Google Text to Speech enabled

Voice mode may give a series of warnings for numerous reasons, but still might fuction properly.

Contribution:

A lot can be done with this project. Core AI chatbot like functionality can be added. More python scripts can be associated. Pull requests for any such changes are accepted. Feel free to fork this project and make your own changes too.

Installing

Can this J. A. R. V. I. S is run on termux....??

line 83, in <module> import pyttsx

` else:
import pyttsx

kernel = aiml.Kernel()

if os.path.isfile("bot_brain.brn"):
    kernel.bootstrap(brainFile="bot_brain.brn")
else:
    kernel.bootstrap(learnFiles="std-startup.xml", commands="load aiml b")`

Screenshot (26)

error: command 'x86_64-linux-gnu-gcc' failed

root@root:/J.A.R.V.I.S# pip install -r requirements.txt
Requirement already satisfied: aiml in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) (0.9.1)
Requirement already satisfied: SpeechRecognition in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2)) (3.6.3)
Collecting pyalsaaudio (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/52/b6/44871791929d9d7e11325af0b7be711388dfeeab17147988f044a41a6d83/pyalsaaudio-0.8.4.tar.gz
Collecting pyttsx (from -r requirements.txt (line 4))
Collecting gTTS (from -r requirements.txt (line 5))
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-27.3.0.post20180517-py2.7.egg (from aiml->-r requirements.txt (line 1)) (27.3.0.post20180517)
Requirement already satisfied: bs4 in /usr/local/lib/python2.7/dist-packages (from gTTS->-r requirements.txt (line 5)) (0.0.1)
Requirement already satisfied: click in /usr/lib/python2.7/dist-packages (from gTTS->-r requirements.txt (line 5)) (6.7)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from gTTS->-r requirements.txt (line 5)) (1.10.0)
Collecting gtts-token (from gTTS->-r requirements.txt (line 5))
Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages (from gTTS->-r requirements.txt (line 5)) (2.13.0)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python2.7/dist-packages (from bs4->gTTS->-r requirements.txt (line 5)) (4.5.3)
Building wheels for collected packages: pyalsaaudio
Running setup.py bdist_wheel for pyalsaaudio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-_ihyGR/pyalsaaudio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-svNPlI --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-m2Tzf3/python2.7-2.7.15
rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c alsaaudio.c -o build/temp.linux-x86_64-2.7/alsaaudio.o
alsaaudio.c:28:10: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for pyalsaaudio
Running setup.py clean for pyalsaaudio
Failed to build pyalsaaudio
Installing collected packages: pyalsaaudio, pyttsx, gtts-token, gTTS
Running setup.py install for pyalsaaudio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-_ihyGR/pyalsaaudio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-BeGGQI/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-m2Tzf3/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c alsaaudio.c -o build/temp.linux-x86_64-2.7/alsaaudio.o
alsaaudio.c:28:10: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-_ihyGR/pyalsaaudio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-BeGGQI/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-_ihyGR/pyalsaaudio/

Systax error

C:\Users\Cheran\Desktop\python\J.A.R.V.I.S>python script.py
File "script.py", line 52
print r.recognize_google(audio)
^
SyntaxError: invalid syntax

why am facing this error?

Running setup.py install for pyalsaaudio ..error ERROR...

while pip install -r requirement.txt

Running setup.py install for pyalsaaudio ..er-ror
   ERROR: Command errored out with exit status 1:     command: 'c:\users\prashant\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\prashant\\AppData\\Local\\Temp\\pip-install-w5mbao95\\pyalsaaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\prashant\\AppData\\Local\\Temp\\pip-install-w5mbao95\\pyalsaaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\prashant\AppData\Local\Temp\pip-record-04rixyt6\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\prashant\appdata\local\programs\python\python36\Include\pyalsaaudio'
        cwd: C:\Users\prashant\AppData\Local\Temp\pip-install-w5mbao95\pyalsaaudio\
   Complete output (11 lines):
   running install
   running build
   running build_ext
   building 'alsaaudio' extension
   creating build
   creating build\temp.win-amd64-3.6
   creating build\temp.win-amd64-3.6\Release     
   C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\prashant\appdata\local\programs\python\python36\include -Ic:\users\prashant\appdata\local\programs\python\python36\include 
"-IC:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program 
Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" 
"-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcalsaaudio.c /Fobuild\temp.win-amd64-3.6\Release\alsaaudio.obj
   alsaaudio.c
   alsaaudio.c(28): fatal error C1083: Cannot open include file: 'alsa/asoundlib.h': No such file or directory
   error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
   ----------------------------------------      
ERROR: Command errored out with exit status 1: 'c:\users\prashant\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\prashant\\AppData\\Local\\Temp\\pip-install-w5mbao95\\pyalsaaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\prashant\\AppData\\Local\\Temp\\pip-install-w5mbao95\\pyalsaaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\prashant\AppData\Local\Temp\pip-record-04rixyt6\install-record.txt' --single-version-externally-managed --compile --install-headers 
'c:\users\prashant\appdata\local\programs\python\python36\Include\pyalsaaudio' Check the logs for full command output.
  • python version 3.6
  • using visual code
  • windows 10

pyalsaaudio issue

pi@raspberrypi:~/Desktop/jarvis $ pip install pyalsaaudio
Collecting pyalsaaudio
Using cached https://files.pythonhosted.org/packages/52/b6/44871791929d9d7e11325af0b7be711388dfeeab17147988f044a41a6d83/pyalsaaudio-0.8.4.tar.gz
Building wheels for collected packages: pyalsaaudio
Running setup.py bdist_wheel for pyalsaaudio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-IFzze4/pyalsaaudio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpUcPcPppip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build/temp.linux-armv7l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c alsaaudio.c -o build/temp.linux-armv7l-2.7/alsaaudio.o
alsaaudio.c:28:28: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


Failed building wheel for pyalsaaudio
Running setup.py clean for pyalsaaudio
Failed to build pyalsaaudio
Installing collected packages: pyalsaaudio
Running setup.py install for pyalsaaudio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-IFzze4/pyalsaaudio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-jQc1UV-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build/temp.linux-armv7l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c alsaaudio.c -o build/temp.linux-armv7l-2.7/alsaaudio.o
alsaaudio.c:28:28: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-IFzze4/pyalsaaudio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-jQc1UV-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-IFzze4/pyalsaaudio/

Error in Line 52

File "C:\Users\Jatin\Desktop\J.A.R.V.I.S-master\script.py", line 52
print r.recognize_google(audio)
^
SyntaxError: invalid syntax

Installing

Can this J. A. R. V. I. S is run on termux....??

errror

root@kali:~/J.A.R.V.I.S# ./script.py voice
Loading std-startup.xml... done (0.00 seconds)
Loading basic_chat.aiml... done (0.00 seconds)
Loading search_internet.aiml... done (0.00 seconds)
Loading music_controls.aiml... done (0.00 seconds)
Loading volume_controls.aiml... done (0.00 seconds)
Loading launching_programs.aiml... done (0.01 seconds)
Loading wallpaper.aiml... done (0.00 seconds)

Kernel bootstrap completed in 0.03 seconds
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Talk to J.A.R.V.I.S:

Errors while installing gTTS on Windows 7

pip install -r requirements.txt and this happens at last steps

Requirement already satisfied: aiml in c:\users\lifesucks\appdata\local\programs\python\python35-32\lib\site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: SpeechRecognition in c:\users\lifesucks\appdata\local\programs\python\python35-32\lib\site-packages (from -r requirements.txt (line 2))
Collecting pyalsaaudio (from -r requirements.txt (line 3))
  Using cached pyalsaaudio-0.8.2.tar.gz
Collecting pyttsx (from -r requirements.txt (line 4))
  Using cached pyttsx-1.1.tar.gz
Collecting gTTS (from -r requirements.txt (line 5))
  Using cached gTTS-1.1.8.tar.gz
Requirement already satisfied: requests in c:\users\lifesucks\appdata\local\programs\python\python35-32\lib\site-packages (from gTTS->-r requirements.txt (line 5))
Collecting gtts_token (from gTTS->-r requirements.txt (line 5))
  Using cached gTTS-token-1.1.1.zip
Installing collected packages: pyalsaaudio, pyttsx, gtts-token, gTTS
  Running setup.py install for pyalsaaudio: started
    Running setup.py install for pyalsaaudio: finished with status 'error'
    Complete output from command c:\users\lifesucks\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\LIFESU~1\\AppData\\Local\\Temp\\pip-build-0h4dqwlv\\pyalsaaudio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\LIFESU~1\AppData\Local\Temp\pip-vw8p67it-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'alsaaudio' extension
    creating build
    creating build\temp.win32-3.5
    creating build\temp.win32-3.5\Release
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\lifesucks\appdata\local\programs\python\python35-32\include -Ic:\users\lifesucks\appdata\local\programs\python\python35-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /Tcalsaaudio.c /Fobuild\temp.win32-3.5\Release\alsaaudio.obj
    alsaaudio.c
    alsaaudio.c(23): fatal error C1083: Cannot open include file: 'alsa/asoundlib.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
    
    ----------------------------------------

Can't figure out how to fix it, any help?

Errors while installing pygame

$ sudo apt-get build-dep python-pygame
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list

and

$ pip install hg+https://bitbucket.org/pygame/pygame
Collecting hg+https://bitbucket.org/pygame/pygame
  Cloning hg https://bitbucket.org/pygame/pygame to /tmp/pip-6Xvpz3-build
    Complete output from command python setup.py egg_info:
    
    
    WARNING, No "Setup" File Exists, Running "config.py"
    Using UNIX configuration...
    
    sh: 1: sdl-config: not found
    sh: 1: sdl-config: not found
    sh: 1: sdl-config: not found
    
    Hunting dependencies...
    WARNING: "sdl-config" failed!
    Unable to run "sdl-config". Please make sure a development version of SDL is installed.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-6Xvpz3-build/

Also, I get speech output even without pygame installed, so is it really necessary?

script.py problem

Traceback (most recent call last):
File "script.py", line 1, in
import aiml
ImportError: No module named aiml

Recognize client browser microphones and Browser support

I have successfully embedded the code on localhost and it works fine with my mircophone. However when I put the code on Windows Server 2016, it no more recognizes mobile browsers microphones.
Please confirm to me, Am I doing anything wrong while putting it on server and which all browsers does gtts speech recognition supports?

Awaiting for your response

error when trying to install requirements.txt

Hey there i can´t manage to install the requirements.txt

any help would be much appreciated!
thanks in advance!

Microsoft Windows [Versión 10.0.17134.254]
(c) 2018 Microsoft Corporation. Todos los derechos reservados.

C:\Users\User>cd..

C:\Users>cd..

C:>d:

D:>cd python Projects\jarvis\J.A.R.V.I.S-master\J.A.R.V.I.S-master

D:\python Projects\jarvis\J.A.R.V.I.S-master\J.A.R.V.I.S-master>pip install -r requirements.txt
Requirement already satisfied: argparse in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from -r requirements.txt (line 1)) (1.4.0)
Requirement already satisfied: aiml in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from -r requirements.txt (line 2)) (0.9.1)
Requirement already satisfied: SpeechRecognition in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from -r requirements.txt (line 3)) (3.8.1)
Collecting pyalsaaudio (from -r requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/52/b6/44871791929d9d7e11325af0b7be711388dfeeab17147988f044a41a6d83/pyalsaaudio-0.8.4.tar.gz
Collecting pyttsx (from -r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/5b/db/45ec294a1776732b80118660ba13389f8178461273e1214d2ae604fa65a7/pyttsx-1.1.tar.gz
Requirement already satisfied: pyaudio in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from -r requirements.txt (line 6)) (0.2.4)
Requirement already satisfied: gTTS in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from -r requirements.txt (line 7)) (2.0.1)
Collecting pygame (from -r requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/b0/30/4df62b0eb0f09a8ad1c329ff5479b3b115e8dce25475fd0c2f73cb790aa4/pygame-1.9.4-cp37-cp37m-win32.whl
Requirement already satisfied: setuptools in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from aiml->-r requirements.txt (line 2)) (39.0.1)
Requirement already satisfied: six in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from gTTS->-r requirements.txt (line 7)) (1.11.0)
Requirement already satisfied: bs4 in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from gTTS->-r requirements.txt (line 7)) (0.0.1)
Requirement already satisfied: click in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from gTTS->-r requirements.txt (line 7)) (6.7)
Requirement already satisfied: requests in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from gTTS->-r requirements.txt (line 7)) (2.19.1)
Requirement already satisfied: gtts_token in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from gTTS->-r requirements.txt (line 7)) (1.1.1)
Requirement already satisfied: beautifulsoup4 in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from bs4->gTTS->-r requirements.txt (line 7)) (4.6.3)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from requests->gTTS->-r requirements.txt (line 7)) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from requests->gTTS->-r requirements.txt (line 7)) (2.7)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from requests->gTTS->-r requirements.txt (line 7)) (1.23)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from requests->gTTS->-r requirements.txt (line 7)) (2018.8.24)
Installing collected packages: pyalsaaudio, pyttsx, pygame
Running setup.py install for pyalsaaudio ... error
Complete output from command c:\users\user\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\User\AppData\Local\Temp\pip-install-sqkn104n\pyalsaaudio\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-record-uazzwowc\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\user\appdata\local\programs\python\python37-32\include -Ic:\users\user\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcalsaaudio.c /Fobuild\temp.win32-3.7\Release\alsaaudio.obj
alsaaudio.c
alsaaudio.c(28): fatal error C1083: No se puede abrir el archivo incluir: 'alsa/asoundlib.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\cl.exe' failed with exit status 2

----------------------------------------

Command "c:\users\user\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\User\AppData\Local\Temp\pip-install-sqkn104n\pyalsaaudio\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-record-uazzwowc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-sqkn104n\pyalsaaudio\

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.