我正在为 kaldi 运行gstreamer 服务器,它在内部使用 tornado 来提供用于转录的 HTTP 端点,例如 example.com:8888/dynamic/recognize
我认为这是相关的代码:
class Application(tornado.web.Application):
def __init__(self):
settings = dict(
template_path=os.path.join(os.path.dirname(os.path.dirname(__file__)), "templates"),
static_path=os.path.join(os.path.dirname(os.path.dirname(__file__)), "static"),
autoescape=None,
)
handlers = [
[...]
(r"/client/dynamic/recognize", HttpChunkedRecognizeHandler),
[...],
]
tornado.web.Application.__init__(self, handlers, **settings)
我对 Tornado 不熟悉,但是查看tornado.web.Application
docs,我没有看到settings
.