from tornado.httpserver import HTTPServer from tornado.websocket import WebSocketHandler from tornado.web import Application, RequestHandler, StaticFileHandler from tornado import options from json import dumps, loads from logger import logger from configs import LanguageModel, Configs from audio_processor import STT import ssl log = logger("SERVER") configs = Configs() templates_dir = "%s/templates" % configs.get_cwd() js_dir = "%s/js" % templates_dir css_dir = "%s/css" % templates_dir fonts_dir = "%s/fonts" % templates_dir less_dir = "%s/less" % templates_dir ssl_configs = configs.get_ssl() ssl_configs[ "ssl_version"] = ssl.PROTOCOL_TLSv1 # Add the ssl version to the options """Global module level definitions logger: log - The module log object so that printed calls can be backtraced to this file Configs: configs - The globally loaded configuration object that handles the reloading of the json files str: (-*-)_dir - The server """