问题描述
是否有人知道免费提供的关键字发现系统,并且可能提供 API ??
Is anyone aware of a Keyword Spotting System that is freely available, and possibly providing APIs ??
CMU Sphinx 4 和 MS Speech API 是语音识别引擎,不能用于 KWS.
CMU Sphinx 4 and MS Speech API are speech recognition engines, and cannot be used for KWS.
SRI 有一个关键字识别系统,但没有下载链接,甚至没有用于评估的链接.(我什至在任何地方都找不到联系他们的软件的链接)
SRI has a keyword spotting system, but no download links, not even for evaluation. (I even couldn't find anywhere a link to contact them for their software)
我在这里找到了一个,但它是一个演示版且有限.
I found one here but it's a demo and limited.
推荐答案
CMUSphinx 在 Pocketsphinx 引擎中实现了关键字定位,详见常见问题解答.
CMUSphinx implements keyword spotting in pocketsphinx engine, see for details the FAQ entry.
要识别单个关键短语,您可以在关键短语搜索"模式下运行解码器.
To recognize a single keyphrase you can run decoder in "keyphrase search" mode.
从命令行尝试:
pocketsphinx_continuous -infile file.wav -keyphrase "oh mighty computer" -kws_threshold 1e-20
来自代码:
ps_set_keyphrase(ps, "keyphrase_search", "oh mighty computer");
ps_set_search(ps, "keyphrase_search);
ps_start_utt();
/* process data */
您还可以在我们的资源中找到 Python 和 Android/Java 的示例.Python 代码如下所示,完整示例 此处:
You can also find examples for Python and Android/Java in our sources. Python code looks like this, full example here:
# Process audio chunk by chunk. On keyphrase detected perform action and restart search
decoder = Decoder(config)
decoder.start_utt()
while True:
buf = stream.read(1024)
if buf:
decoder.process_raw(buf, False, False)
else:
break
if decoder.hyp() != None:
print ([(seg.word, seg.prob, seg.start_frame, seg.end_frame) for seg in decoder.seg()])
print ("Detected keyphrase, restarting search")
decoder.end_utt()
decoder.start_utt()
必须针对测试数据上的每个关键短语调整阈值,以正确平衡漏检和误报.您可以尝试使用 1e-5 到 1e-50 之类的值.
Threshold must be tuned for every keyphrase on a test data to get the right balance missed detections and false alarms. You can try values like 1e-5 to 1e-50.
为了获得最佳准确性,最好使用 3-4 个音节的关键短语.太短的短语很容易混淆.
For the best accuracy it is better to have keyphrase with 3-4 syllables. Too short phrases are easily confused.
您也可以搜索多个关键短语,创建一个文件keyphrase.list,如下所示:
You can also search for multiple keyphrase, create a file keyphrase.list like this:
oh mighty computer /1e-40/
hello world /1e-30/
other_phrase /other_phrase_threshold/
并在带有 -kws 配置选项的解码器中使用它.
And use it in decoder with -kws configuration option.
pocketsphinx_continuous -inmic yes -kws keyphrase_list
此功能尚未在 sphinx4 解码器中实现.
This feature is not yet implemented in sphinx4 decoder.
这篇关于演讲中的关键词发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!