コード例 #1
0
 def _get_gmm_set(self):
     try:
         from gmmset import GMMSetPyGMM
         if GMMSet is GMMSetPyGMM:
             return GMMSet(ubm=GMM.load(self.UBM_MODEL_FILE))
     except Exception as e:
         print "Warning: failed to import gmmset. You may forget to compile gmm:"
         print e
         print "Try running `make -C src/gmm` to compile gmm module."
         print "But gmm from sklearn will work as well! Using it now!"
     return GMMSet()
コード例 #2
0
 def _get_gmm_set(self):
     if self.UBM_MODEL_FILE and os.path.isfile(self.UBM_MODEL_FILE):
         try:
             from gmmset import GMMSetPyGMM
             if GMMSet is GMMSetPyGMM:
                 return GMMSet(ubm=GMM.load(self.UBM_MODEL_FILE))
         except Exception as e:
             print "Warning: failed to import gmmset. You may forget to compile gmm:"
             print e
             print "Try running `make -C src/gmm` to compile gmm module."
             print "But gmm from sklearn will work as well! Using it now!"
         return GMMSet()
     return GMMSet()
コード例 #3
0
 def _get_gmm_set(self):
     from gmmset import GMMSetPyGMM
     if GMMSet is GMMSetPyGMM:
         return GMMSet(ubm=GMM.load(self.UBM_MODEL_FILE))
     else:
         return GMMSet()
コード例 #4
0
 def _get_gmm_set(self):
     from gmmset import GMMSetPyGMM
     if GMMSet is GMMSetPyGMM:
         return GMMSet(ubm=GMM.load(self.UBM_MODEL_FILE))
     else:
         return GMMSet()