NTPocketSphinxConfig Class Reference

Inherits from NSObject
Declared in NTPocketSphinxConfig.h
NTPocketSphinxConfig.m

Overview

Represents a pocketsphinx config (cmd_ln_t). Per default the config is defined with ps_args().

Other Methods

  ps_config

Pointer to the cmd_ln_t struct.

@property (nonatomic) void *ps_config

Discussion

Pointer to the cmd_ln_t struct.

Declared In

NTPocketSphinxConfig.h

– initWithOptions:

Create a config with the given options.

- (instancetype)initWithOptions:(NSDictionary<NSString*,NSString*> *)options

Parameters

options

Options

Return Value

Instance

Discussion

Create a config with the given options.

Declared In

NTPocketSphinxConfig.h

– setOptions:

Set a list of options

- (void)setOptions:(NSDictionary<NSString*,NSString*> *)options

Parameters

options

Name/Value pairs

Discussion

Set a list of options

Declared In

NTPocketSphinxConfig.h

– getOptionWithName:

Get value of option

- (NSString *)getOptionWithName:(NSString *)name

Parameters

name

Name

Return Value

Value or nil if option doesn’t exist

Discussion

Get value of option

Declared In

NTPocketSphinxConfig.h

– setValue:forOptionWithName:

Set the value of an option

- (void)setValue:(NSString *)value forOptionWithName:(NSString *)name

Parameters

value

Value

name

Name of the option

Discussion

Set the value of an option

Declared In

NTPocketSphinxConfig.h

+ configWithOptions:

Create config with options

+ (NTPocketSphinxConfig *)configWithOptions:(NSDictionary<NSString*,NSString*> *)options

Parameters

options

name/value pairs

Return Value

instance

Discussion

Create config with options

Declared In

NTPocketSphinxConfig.h

+ configWithPathToAcousticModel:

Create config with HMM dir

+ (NTPocketSphinxConfig *)configWithPathToAcousticModel:(NSString *)path

Parameters

path

Path to HMM dir

Return Value

instance

Discussion

Create config with HMM dir

Declared In

NTPocketSphinxConfig.h

Other Methods

– init

- (instancetype)init

– dealloc

- (void)dealloc

– loadArguments:

- (void)loadArguments:(arg_t const *)ps_args

– getStringOptionWithName:

- (NSString *)getStringOptionWithName:(NSString *)name

– getStringListOptionWithName:

- (NSArray<NSString*> *)getStringListOptionWithName:(NSString *)name

– getIntOptionWithName:

- (long)getIntOptionWithName:(NSString *)name

– getFloatOptionWithName:

- (double)getFloatOptionWithName:(NSString *)name

– setStringValue:forOptionWithName:

- (void)setStringValue:(NSString *)value forOptionWithName:(NSString *)name

– setIntValue:forOptionWithName:

- (void)setIntValue:(long)value forOptionWithName:(NSString *)name

– setFloatValue:forOptionWithName:

- (void)setFloatValue:(double)value forOptionWithName:(NSString *)name

Extension Methods

  config

@property (nonatomic) cmd_ln_t *config

  arguments

@property (nonatomic, strong) NSMutableDictionary<NSString*NTPocketSphinxConfigArgument*> *arguments