如何保持python中的语音识别无限期运行?

问题描述 投票:0回答:1

我正在使用python制作AI助手。为此,我需要一个语音转文本服务,该服务可以继续监听,并在捕获到某个关键字时开始工作]

python speech-recognition
1个回答
0
投票

您可以使用Python的Speech_Recognition模块并将其添加到While True()循环中。

while True():
    #The Speech Recognition Code - 
    if recognized_text == "Bananas":
        #do stuff

此教程可以轻松地在Google上找到。只需搜索如何在Python中进行语音识别

或关注此链接-Youtube Tutorial 1
© www.soinside.com 2019 - 2024. All rights reserved.