import speech_recognition as sr
import os
# obtain audio from the microphone
r = sr.Recognizer()
def get_audio():
global RealAudio
with sr.Microphone() as source:
print("Say something!")
audio = r.listen(source)
try:
RealAudio = r.recognize_google(audio)
print(RealAudio)
commands_audio()
except sr.UnknownValueError:
print("Impossibole to understand.\n")
get_audio()
def start_function():
global Discord
try:
if Discord == 'False':
os.system('cd D:\\Program\\Steam\Steam.exe')
if 'open Steam' in RealAudio:
Discord = False
start_function()
get_audio()
我刚刚开始使用我的语音程序。我总是收到错误消息'无法找到特定目录'。我想要它打开Steam.exe程序。