'why speech_recognition does not work after exe-pack by pyinstaller?
I am having problem with pyinstaller. when I run following code with anaconda, operation is fine. (automatically collect audio file and write text). but if I made exe with pyinstaller (one file mode). exe file does not work... I am wondering if there is way to make this work.
windows 10 anaconda python 3.4import pydub, os
import speech_recognition as sr
#read wav file and Write out text to document.txt.
def auido2text():
docuFile = open('document2.txt', 'w',encoding="utf-8_sig")
for Filename in os.listdir('.'):
if not Filename.endswith('.wav'):
continue #skip non-wav files
r = sr.Recognizer()
with sr.AudioFile(Filename) as source:
audio = r.record(source)
text = r.recognize_google(audio, language='es-ES')
docuFile.write(text)
docuFile.write('\n\n')
docuFile.close()
auido2text()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
