I am needing the answer very quickly as this is a project that is due in a week. Thanks in advance.
On Saturday, January 15, 2022 at 4:57:50 AM UTC-8 jjoa wrote: > I am trying to convert a .py script to a .exe application using > pyinstaller. > > These are the libraries I am using: > import winsound > import cv2 > import dlib > import imutils > import pyttsx3 import speech_recognition as sr > from imutils import face_utils > from scipy.spatial import distance > import time > > Everything works perfectly in my application(that doesn't use pyaudio and > speech_recognition library) but the part where I use Pyaudio to listen to > the microphone and convert that to text using speech_recognition library > doesn't work. > > This is the error: > > Image: > > [image: Pyaudio_Pyinstaller_Error.png] > > <https://i.stack.imgur.com/G8I7v.png> > > OCR of the error: > Unhandled exception in script Failed to execute script > 'test1_error_handling' due to unhandled exception: [WinError 6] The handle > is invalid Traceback (most recent call last): File > "test1_error_handling.py", line 80, in <module> text= r.recognize > google(audio_tert) File "speech_recognition_init-py", line 828, in > recognizegoogle File "speech_recognition_init -py", line 457, in get flac > data File "subprocess.py", line 753, in _init_ File "subprocess.py", line > 1090, in_get_handles OSError: [WinError 6] The handle is invalid > > I think this is related to the speech_recognition library and pyaudio > library not being installed correctly because you need a .whl file for > installing pyaudio locally. Do I change the .spec file that is created by > pyinstaller? How can I install the pyaudio .whl in pyinstaller? How can I > fix this error? > > version: python=3.7.9, latest pyinstaller version > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/a604acb7-b3a6-4bd6-a7d6-1cfedf8a8be2n%40googlegroups.com.
