【问题标题】:How to set a wake up word for an virtual assistant using Vosk offline speech recognition (or any other fast offline speech recognizer)如何使用 Vosk 离线语音识别(或任何其他快速离线语音识别器)为虚拟助手设置唤醒词
【发布时间】:2021-09-14 07:42:47
【问题描述】:

我想要一个快速的离线语音识别器(如 vosk 或 sphinx)作为 google 语音识别的唤醒词,因此它并不总是能听到我们说的话。

想要唤醒这个词:

def takeCommand():
# mic input

r = sr.Recognizer()
with sr.Microphone() as source:
    print("Hearing...")
    # r.pause_threshold = 1
    r.chunk_size = 2048
    r.adjust_for_ambient_noise(source)
    audio = r.listen(source)

try:
    print("Recognizing....")
    query = r.recognize_google(audio, language='en-in')
    print(f"You said: {query}\n")

except Exception as e:
    print(e)

    print("Say that again please...")
    return "None"
return query

【问题讨论】:

    标签: python artificial-intelligence speech-recognition vosk


    【解决方案1】:

    看看 PicoVoice 提供的 Porcupine Wake Word Engine: https://picovoice.ai/docs/porcupine/

    它易于使用并允许训练您自己的唤醒词。

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2020-12-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多