Class: Pocketsphinx::Configuration::Default
- Defined in:
- lib/pocketsphinx/configuration/default.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#ps_config, #setting_definitions
Instance Method Summary collapse
-
#changes ⇒ Object
Show details for settings which don’t match Pocketsphinx defaults.
-
#initialize ⇒ Default
constructor
A new instance of Default.
Methods inherited from Base
#[], #[]=, #details, #setting_names
Constructor Details
#initialize ⇒ Default
Returns a new instance of Default.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pocketsphinx/configuration/default.rb', line 4 def initialize super # Sets default grammar and language model if they are not set explicitly and # are present in the default search path. API::Pocketsphinx.ps_default_search_args(@ps_config) # Treat ps_default_search_args settings as defaults changes.each do |details| setting_definitions[details[:name]].deflt = details[:value] end end |
Instance Method Details
#changes ⇒ Object
Show details for settings which don’t match Pocketsphinx defaults
18 19 20 |
# File 'lib/pocketsphinx/configuration/default.rb', line 18 def changes details.reject { |d| d[:default] == d[:value] } end |