Skip to content
Snippets Groups Projects
Commit fd15196f authored by Benoit Favre's avatar Benoit Favre
Browse files

add osc module, add ld_library_path

parent 90e72932
No related branches found
No related tags found
No related merge requests found
dir = asr/fisher-benoit-1
name = Generic english 1
name = Generic english 1 (Benoit)
fst = $dir/HCLG.fst
model = $dir/final.mdl
......@@ -10,5 +10,5 @@ ivector-extraction-config = $dir/conf/ivector_extractor.fixed.conf
max-active = 7000
beam = 11.0
lattice-beam = 6.0
do-endpointing = True
do-endpointing = False
endpoint-silence-phones = 1:2:3:4:5:6:7:8:9:10
dir = asr/mika-fred-1
name = Roccio's voice 1
name = Rocio's voice 1
fst = $dir/HCLG.fst
model = $dir/final.mdl
......
osc.py 0 → 100644
import liblo, sys
class ActionSender:
def __init__(self, host = '127.0.0.1', port = 1234):
try:
self.target = liblo.Address(host, port)
except:
print >>sys.stderr, 'OSC: Could not connect to server %s:%p' % (host, port)
def send(self, message):
try:
liblo.send(self.target, str(message))
except:
print >>sys.stderr, 'OSC: failed to send message [%s]' % str(message)
class ActionReceiver:
def __init__(self, host = '127.0.0.1', port = 1234):
print 'OSC: Creating server at %s:%d' % (host, port)
self.server = liblo.Server(port)
self.server.add_method(None, None, self.callback)
def callback(self, message):
print 'OSC: Recieved [%s]' % message
def run(self):
print 'OSC: Waiting for messages'
while True:
self.server.recv(100)
if __name__ == '__main__':
if len(sys.argv) > 1:
client = ActionSender()
client.send(' '.join(sys.argv[1:]))
else:
server = ActionReceiver()
server.run()
LD_LIBRARY_PATH=/home/favre/work/kaldi/dictate/aur-atlas-lapack/pkg/atlas-lapack/usr/lib/ python2 main.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment