Class: Pocketsphinx::Configuration::KeywordSpotting
- Defined in:
- lib/pocketsphinx/configuration/keyword_spotting.rb
Instance Attribute Summary collapse
-
#kws_threshold ⇒ Object
Returns the value of attribute kws_threshold.
Attributes inherited from Base
#ps_config, #setting_definitions
Instance Method Summary collapse
-
#initialize(keyword, threshold = nil) ⇒ KeywordSpotting
constructor
A new instance of KeywordSpotting.
- #keyword ⇒ Object
- #keyword=(value) ⇒ Object
-
#recognition_algorithm ⇒ Object
See SpeechRecognizer#algorithm.
Methods inherited from Default
Methods inherited from Base
#[], #[]=, #details, #setting_names
Constructor Details
#initialize(keyword, threshold = nil) ⇒ KeywordSpotting
Returns a new instance of KeywordSpotting.
6 7 8 9 10 11 12 |
# File 'lib/pocketsphinx/configuration/keyword_spotting.rb', line 6 def initialize(keyword, threshold = nil) super() self['lm'] = nil self.keyword = keyword self.kws_threshold = threshold if threshold end |
Instance Attribute Details
#kws_threshold ⇒ Object
Returns the value of attribute kws_threshold.
4 5 6 |
# File 'lib/pocketsphinx/configuration/keyword_spotting.rb', line 4 def kws_threshold @kws_threshold end |
Instance Method Details
#keyword ⇒ Object
14 15 16 |
# File 'lib/pocketsphinx/configuration/keyword_spotting.rb', line 14 def keyword self['keyphrase'] end |
#keyword=(value) ⇒ Object
18 19 20 |
# File 'lib/pocketsphinx/configuration/keyword_spotting.rb', line 18 def keyword=(value) self['keyphrase'] = sanitize_keyword value end |
#recognition_algorithm ⇒ Object
See SpeechRecognizer#algorithm
31 32 33 |
# File 'lib/pocketsphinx/configuration/keyword_spotting.rb', line 31 def recognition_algorithm :continuous end |