pocketsphinx_continuous -adcdev plughw:1,0 -inmic yes -dict 4711.dic -lm 4711.lm
The above command works but the problem arises in running python c
You are probably experiencing it with USB microphone (e. g. on RaspberryPi). It tells you, that LiveSpeech doesn't know, which audio device to use for input. Luckily according to https://github.com/bambocher/pocketsphinx-python#default-config there are several configuration options - so you need to specify audio_device.
basically lets do:
for phrase in LiveSpeech(audio_device=3): print(phrase)
where 3 please replace with your desired microphone ID. Now how to get it:
import pyaudio
p = pyaudio.PyAudio()
for i in range(p.get_device_count()):
print(p.get_device_info_by_index(i))
#otherwise you can do:
print(p.get_default_input_device_info())
There are several topics on how to properly set up USB microphone on RaspberryPi - if its your case, let me know.