11 from sys
import version_info
as _swig_python_version_info
12 if _swig_python_version_info >= (2, 7, 0):
15 pkg = __name__.rpartition(
'.')[0]
16 mname =
'.'.join((pkg,
'_snowboydetect')).lstrip(
'.')
18 return importlib.import_module(mname)
20 return importlib.import_module(
'_snowboydetect')
22 del swig_import_helper
23 elif _swig_python_version_info >= (2, 6, 0):
25 from os.path
import dirname
29 fp, pathname, description = imp.find_module(
'_snowboydetect', [dirname(__file__)])
35 _mod = imp.load_module(
'_snowboydetect', fp, pathname, description)
40 del swig_import_helper
43 del _swig_python_version_info
45 _swig_property = property
50 import builtins
as __builtin__
55 if (name ==
"thisown"):
56 return self.this.own(value)
58 if type(value).__name__ ==
'SwigPyObject':
59 self.__dict__[name] = value
61 method = class_type.__swig_setmethods__.get(name,
None)
63 return method(self, value)
66 object.__setattr__(self, name, value)
68 self.__dict__[name] = value
70 raise AttributeError(
"You cannot add attributes to %s" % self)
78 if (name ==
"thisown"):
79 return self.this.own()
80 method = class_type.__swig_getmethods__.get(name,
None)
83 raise AttributeError(
"'%s' object has no attribute '%s'" % (class_type.__name__, name))
88 strthis =
"proxy of " + self.this.__repr__()
89 except __builtin__.Exception:
91 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
96 except __builtin__.Exception:
102 __swig_setmethods__ = {}
103 __setattr__ =
lambda self, name, value:
_swig_setattr(self, SnowboyDetect, name, value)
104 __swig_getmethods__ = {}
106 __repr__ = _swig_repr
109 this = _snowboydetect.new_SnowboyDetect(resource_filename, model_str)
111 self.this.append(this)
112 except __builtin__.Exception:
116 return _snowboydetect.SnowboyDetect_Reset(self)
119 return _snowboydetect.SnowboyDetect_RunDetection(self, *args)
122 return _snowboydetect.SnowboyDetect_SetSensitivity(self, sensitivity_str)
125 return _snowboydetect.SnowboyDetect_SetHighSensitivity(self, high_sensitivity_str)
128 return _snowboydetect.SnowboyDetect_GetSensitivity(self)
131 return _snowboydetect.SnowboyDetect_SetAudioGain(self, audio_gain)
134 return _snowboydetect.SnowboyDetect_UpdateModel(self)
137 return _snowboydetect.SnowboyDetect_NumHotwords(self)
140 return _snowboydetect.SnowboyDetect_ApplyFrontend(self, apply_frontend)
143 return _snowboydetect.SnowboyDetect_SampleRate(self)
146 return _snowboydetect.SnowboyDetect_NumChannels(self)
149 return _snowboydetect.SnowboyDetect_BitsPerSample(self)
150 __swig_destroy__ = _snowboydetect.delete_SnowboyDetect
151 __del__ =
lambda self:
None 152 SnowboyDetect_swigregister = _snowboydetect.SnowboyDetect_swigregister
156 __swig_setmethods__ = {}
157 __setattr__ =
lambda self, name, value:
_swig_setattr(self, SnowboyVad, name, value)
158 __swig_getmethods__ = {}
160 __repr__ = _swig_repr
163 this = _snowboydetect.new_SnowboyVad(resource_filename)
165 self.this.append(this)
166 except __builtin__.Exception:
170 return _snowboydetect.SnowboyVad_Reset(self)
173 return _snowboydetect.SnowboyVad_RunVad(self, *args)
176 return _snowboydetect.SnowboyVad_SetAudioGain(self, audio_gain)
179 return _snowboydetect.SnowboyVad_ApplyFrontend(self, apply_frontend)
182 return _snowboydetect.SnowboyVad_SampleRate(self)
185 return _snowboydetect.SnowboyVad_NumChannels(self)
188 return _snowboydetect.SnowboyVad_BitsPerSample(self)
189 __swig_destroy__ = _snowboydetect.delete_SnowboyVad
190 __del__ =
lambda self:
None 191 SnowboyVad_swigregister = _snowboydetect.SnowboyVad_swigregister
def SetSensitivity(self, sensitivity_str)
def __init__(self, resource_filename, model_str)
def SetHighSensitivity(self, high_sensitivity_str)
SnowboyDetect_swigregister
def SetAudioGain(self, audio_gain)
def ApplyFrontend(self, apply_frontend)
def RunDetection(self, args)
def ApplyFrontend(self, apply_frontend)
def _swig_getattr(self, class_type, name)
def _swig_setattr_nondynamic(self, class_type, name, value, static=1)
def _swig_setattr(self, class_type, name, value)
def __init__(self, resource_filename)
def SetAudioGain(self, audio_gain)