Python - problema con reconocimiento de voz

 
Vista:
sin imagen de perfil
Val: 26
Ha aumentado su posición en 332 puestos en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por Santiago (11 intervenciones) el 07/06/2021 17:41:54
Hola, he estado intentando crear un sistema de reconocimiento de voz, he leído que la mejor librería para esto es Speech Recognition, pero al intentar utilizarla me dice que necesito pyaudio. Al intentar instalarlo con pip me dice:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ERROR: Command errored out with exit status 1:
   command: 'C:\Users\santi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-u1bqw7vp\\pyaudio_91fde1ab0069405f9891c4c1dd9700b5\\setup.py'"'"'; __file__='"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-u1bqw7vp\\pyaudio_91fde1ab0069405f9891c4c1dd9700b5\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\santi\AppData\Local\Temp\pip-wheel-owc9i2zo'
       cwd: C:\Users\santi\AppData\Local\Temp\pip-install-u1bqw7vp\pyaudio_91fde1ab0069405f9891c4c1dd9700b5\
  Complete output (9 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  copying src\pyaudio.py -> build\lib.win-amd64-3.9
  running build_ext
  building '_portaudio' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for pyaudio
  Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
    Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\santi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-u1bqw7vp\\pyaudio_91fde1ab0069405f9891c4c1dd9700b5\\setup.py'"'"'; __file__='"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-u1bqw7vp\\pyaudio_91fde1ab0069405f9891c4c1dd9700b5\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\santi\AppData\Local\Temp\pip-record-_1_qsh9n\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\santi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyaudio'
         cwd: C:\Users\santi\AppData\Local\Temp\pip-install-u1bqw7vp\pyaudio_91fde1ab0069405f9891c4c1dd9700b5\
    Complete output (9 lines):
    running install
    running build

He buscado en foros y me dice que instale el PyAudio como .whl pero al descargar el archivo

PyAudio-0.2.11-cp310-cp310-win_amd64.whl con el código

1
pip install PyAudio-0.2.11-cp310-cp310-win_amd64

y me da el siguiente error:

1
ERROR: PyAudio-0.2.11-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

He cambiado en el CMD la ruta a donde tengo el archivo .whl

¿Qué hago? El módulo Speech Recognition necesita el pyaudio!!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 2.808
Oro
Ha mantenido su posición en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por tincopasan (1082 intervenciones) el 08/06/2021 06:14:42
¿has leído el mensaje de error? lo que más remarca es:
1
Microsoft Visual C++ 14.0 or greater is required.

o sea, por lo menos instala un versión de las librerías de visual C++

hasta te dice desde donde

https://visualstudio.microsoft.com/visual-cpp-build-tools/

instala eso y volvé a probar en que se modifica el error.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
-1
Comentar
sin imagen de perfil
Val: 26
Ha aumentado su posición en 332 puestos en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por Santiago (11 intervenciones) el 08/06/2021 07:17:25
Me da el mismo error:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
  Building wheel for pyaudio (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\santi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-qtvt5ni5\\pyaudio_92df6023ae19465dacf62e692ddcffb5\\setup.py'"'"'; __file__='"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-qtvt5ni5\\pyaudio_92df6023ae19465dacf62e692ddcffb5\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\santi\AppData\Local\Temp\pip-wheel-q7aunsoa'
       cwd: C:\Users\santi\AppData\Local\Temp\pip-install-qtvt5ni5\pyaudio_92df6023ae19465dacf62e692ddcffb5\
  Complete output (9 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  copying src\pyaudio.py -> build\lib.win-amd64-3.9
  running build_ext
  building '_portaudio' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for pyaudio
  Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
    Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\santi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-qtvt5ni5\\pyaudio_92df6023ae19465dacf62e692ddcffb5\\setup.py'"'"'; __file__='"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-qtvt5ni5\\pyaudio_92df6023ae19465dacf62e692ddcffb5\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\santi\AppData\Local\Temp\pip-record-ybxlf30l\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\santi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyaudio'
         cwd: C:\Users\santi\AppData\Local\Temp\pip-install-qtvt5ni5\pyaudio_92df6023ae19465dacf62e692ddcffb5\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    copying src\pyaudio.py -> build\lib.win-amd64-3.9
    running build_ext
    building '_portaudio' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\santi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-qtvt5ni5\\pyaudio_92df6023ae19465dacf62e692ddcffb5\\setup.py'"'"'; __file__='"'"'C:\\Users\\santi\\AppData\\Local\\Temp\\pip-install-qtvt5ni5\\pyaudio_92df6023ae19465dacf62e692ddcffb5\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\santi\AppData\Local\Temp\pip-record-ybxlf30l\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\santi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyaudio' Check the logs for full command output.

Lo tengo instalado y es la versión 16.10.0
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil
Val: 2.808
Oro
Ha mantenido su posición en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por tincopasan (1082 intervenciones) el 08/06/2021 10:09:03
por casualidad, ¿estas usando python superior a 3.6?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
-1
Comentar
sin imagen de perfil
Val: 26
Ha aumentado su posición en 332 puestos en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por Santiago (11 intervenciones) el 08/06/2021 15:00:52
Buenas, estoy utilizando Python 3.9.5
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil
Val: 2.808
Oro
Ha mantenido su posición en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por tincopasan (1082 intervenciones) el 08/06/2021 15:54:09
podrías probar creando con ven un entorno virtual con python 3.6 y ahí tratar de instalar las bibliotecas que necesitas.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
-1
Comentar
sin imagen de perfil
Val: 26
Ha aumentado su posición en 332 puestos en Python (en relación al último mes)
Gráfica de Python

problema con reconocimiento de voz

Publicado por Santiago (11 intervenciones) el 08/06/2021 16:49:22
Soy principiante, no sabría bien como crearlo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar