MCPcopy Create free account
hub / github.com/Yaafe/Yaafe / processFile

Method processFile

src_python/yaafelib/audiofileprocessor.py:104–124  ·  view source on GitHub ↗

Extract features from the given file using the given engine. If an output format has been set, then output files will be written, else output feature data can be read using engine's :py:meth:`Engine.readOutput` or :py:meth:`Engine.readAll

(self, engine, filename)

Source from the content-addressed store, hash-verified

102 return False
103
104 def processFile(self, engine, filename):
105 """
106 Extract features from the given file using the given engine.
107
108 If an output format has been set, then output files will be
109 written, else output feature data can be read using engine's
110 :py:meth:`Engine.readOutput` or
111 :py:meth:`Engine.readAllOutputs` methods.
112
113 :param engine: engine to use for feature extraction.
114 It must already have been configured.
115 :type engine: :py:class:`Engine`
116 :param filename: audio file to process
117 :type filename: string
118 :return: 0 on success, negative value on fail
119 """
120 if not AudioFileProcessor._YAAFE_IO_LOADED:
121 AudioFileProcessor._YAAFE_IO_LOADED = (
122 loadComponentLibrary('yaafe-io') == 0)
123 return yc.audiofileprocessor_processFile(self.ptr, engine.ptr,
124 to_char(filename))

Callers 1

mainFunction · 0.95

Calls 2

loadComponentLibraryFunction · 0.90
to_charFunction · 0.90

Tested by

no test coverage detected