rhubarb-lip-sync/lib/pocketsphinx-5prealpha-2015.../swig/python/test/fsg_test.py

14 lines
258 B
Python

#!/usr/bin/python
import sys
from sphinxbase.sphinxbase import LogMath
from sphinxbase.sphinxbase import FsgModel
lmath = LogMath()
fsg = FsgModel("simple_grammar", lmath, 1.0, 10)
fsg.word_add("hello")
fsg.word_add("world")
print (fsg.word_id("world"))