nihal111 / J.A.R.V.I.S

A personal assistant with simple, rudimentary AI
319 stars 213 forks source link

Errors while installing gTTS on Windows 7 #7

Closed etheaven closed 6 years ago

etheaven commented 7 years ago

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?

nihal111 commented 7 years ago

It appears that you're trying to run this on Windows. Unfortunately, I have not done any testing on Windows. I see that the problem shown is with installation of alsaaudio, which IIRC I've used to adjust volume levels on Ubuntu through this script. It wouldn't work on Windows, so you can probably skip this dependency. If the problem appears to be with gTTS (which is actually an optional package, I have used an offline ttsx library as well). Can you try running the text mode anyhow and see if it works?

nihal111 commented 6 years ago

pyalsaaudio is a dependency only for linux, which would explain the error on Windows. Closing.