将语音识别输出保存在excel +附加输出中

时间:2020-01-30 03:46:43

标签: python speech-recognition save-as

我正在尝试将Speak Anything的输出另存为excel,csv或txt或json。

import speech_recognition as sr
import pyaudio

r = sr.Recognizer()

with sr.Microphone() as source:
    print('Speak Anything: ')
    audio = r.listen(source)

    try:
        text = r.recognize_google(audio)
        print('You said:{}'.format(text))
    except:
        print('Sorry could not recognize what you said')

链接:http://codepad.org/6huZeZLB

0 个答案:

没有答案
相关问题