来自终端的tkinter文本区域上的speech_recognition输出

时间:2019-05-24 16:17:42

标签: python python-3.x tkinter operating-system speech-recognition

我在终端上运行命令,它将实时语音转换为文本,但是在控制台上,我希望该输出在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上没有得到任何输出

0 个答案:

没有答案