Keywords in speech

Does anyone know of a keyword recognition system that is freely available and possibly provides an API?

Sphinx 4 CMU and MS Speech API are speech recognition engines and cannot be used for KWS.

SRI has a keyword definition system, but there are no download links, even for evaluation. (I could not even find a link to contact them for my software)

I found it here , but this demo is limited.

+6
api keyword speech
source share
1 answer

CMUSphinx implements keyword definition in the pocketsphinx engine, see FAQ for details .

To recognize one key phrase, you can start the decoder in the "keyphrase" search mode.

From the command line try:

pocketsphinx_continuous -infile file.wav -keyphrase "oh mighty computer" -kws_threshold 1e-20 

From the code:

  ps_set_keyphrase(ps, "keyphrase_search", "oh mighty computer"); ps_set_search(ps, "keyphrase_search); ps_start_utt(); /* process data */ 

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() 

A threshold must be configured for each passphrase on the test data in order to get the right balance of missed detectors and false alarms. You can try values ​​from 1e-5 to 1e-50.

For best accuracy, it is better to have a passphrase with 3-4 syllables. Too short phrases are easily confused.

You can also search for several key phrases, create a keyphrase.list file as follows:

  oh mighty computer /1e-40/ hello world /1e-30/ other_phrase /other_phrase_threshold/ 

And use it in the decoder with the -kws configuration parameter.

  pocketsphinx_continuous -inmic yes -kws keyphrase_list 

This feature is not yet implemented in the sphinx4 decoder.

+3
source share

All Articles