def initialise(self, acoustic_model, dictionary, fdict, language_model):
     if not self.initialised:
         _sphinx3.parse_argdict({
             'samprate': '14000',
             'nfft': '1024',
             'hmm': acoustic_model,
             'dict': dictionary,
             'fdict': fdict,
             'lm': language_model,
             'beam': '1e-60',
             'wbeam': '1e-40',
             'ci_pbeam': '1e-8',
             'subvqbeam': '1e-2',
             'maxhmmpf': '2000',
             'maxcdsenpf': '1000',
             'maxwpf': '8',
         })
         _sphinx3.init()
         self.initialised = True
 def initialise(self, acoustic_model, dictionary, fdict, language_model):
     if not self.initialised:
         _sphinx3.parse_argdict({
             'samprate': '14000',
             'nfft': '1024',
             'hmm': acoustic_model,
             'dict': dictionary,
             'fdict': fdict,
             'lm': language_model,
             'beam': '1e-60',
             'wbeam': '1e-40',
             'ci_pbeam': '1e-8',
             'subvqbeam': '1e-2',
             'maxhmmpf': '2000',
             'maxcdsenpf': '1000',
             'maxwpf': '8',
         })
         _sphinx3.init()
         self.initialised = True
Beispiel #3
0
 def setUp(self):
     _sphinx3.parse_argdict(sphinx_config)
     _sphinx3.init()
Beispiel #4
0
 def setUp(self):
     _sphinx3.parse_argdict(sphinx_config)
     _sphinx3.init()
import _sphinx3, sys, os, osc

host = "localhost"	
portout = 9000

osc.init()
osc.sendMsg("/ready","1",host,portout)

_sphinx3.parse_argdict({'samprate': '16000', 'hmm': sys.path[0]+'/dic', 'dict': sys.path[0]+'/dic/pd.dic', 'fdict': sys.path[0]+'/dic/filler', 'lm': sys.path[0]+'/dic/pd.dmp'})
_sphinx3.init()
data = open("/tmp/r16k.raw").read()
words = _sphinx3.decode_raw(data)

osc.sendMsg("/words",str.lower(words[0]),host,portout)