In case of audiodev.so import failure we cannot use caller.py module even if we specified --no-audio option.
In fact it's due to a problem in the import statement which is:
so if audiodev import fails, all imports including audiotts are set to None. But later in the code we have:
if options.recognize and sr is None:
raise ImportError('please install speech_recognition module in your PYTHONPATH to use --recognize option')
if options.textspeech and audiotts is None:
raise ImportError('please install py-audio in your PYTHONPATH to use --textspeech option')
if options.audio and audiodev is None:
raise ImportError('please install py-audio in your PYTHONPATH to use audio, otherwise start with --no-audio option')
So if you use --textspeech option you will verify the second if test which is wrong because the problem came from audiodev.
Hello,
In case of
audiodev.so
import failure we cannot use caller.py module even if we specified--no-audio
option. In fact it's due to a problem in the import statement which is:so if
audiodev
import fails, all imports includingaudiotts
are set toNone
. But later in the code we have:So if you use
--textspeech
option you will verify the secondif
test which is wrong because the problem came fromaudiodev
.Imports should be: