我在终端上运行命令,它将实时语音转换为文本,但是在控制台上,我希望该输出在Tkinter的文本区域上
terminal command: python -m speech_recognition
控制台上的输出:
ALSA lib pcm_dsnoop.c:606:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
A moment of silence, please...
Set minimum energy threshold to 11537.776668595692
Say something!
Got it! Now to recognize it...
Oops! Didn't catch that
Say something!
Got it! Now to recognize it...
Oops! Didn't catch that
Say something!
所以我尝试了
textarea.insert('end', os.system("python -m speech_recognition")+" ")
但是在textarea上没有得到任何输出