Adapt to new server
This commit is contained in:
@@ -23,6 +23,9 @@ from gtts import gTTS
|
|||||||
from tts_common import *
|
from tts_common import *
|
||||||
board = "taranis"
|
board = "taranis"
|
||||||
|
|
||||||
|
reload(sys)
|
||||||
|
sys.setdefaultencoding('utf8')
|
||||||
|
|
||||||
SOURCE_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
|
SOURCE_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
|
||||||
lib_path = os.path.abspath(os.path.join(SOURCE_DIRECTORY, '..', '..', 'radio', 'util'))
|
lib_path = os.path.abspath(os.path.join(SOURCE_DIRECTORY, '..', '..', 'radio', 'util'))
|
||||||
sys.path.append(lib_path)
|
sys.path.append(lib_path)
|
||||||
@@ -134,6 +137,7 @@ if __name__ == "__main__":
|
|||||||
l = u"|" + f.replace(".wav", "") + u"|" + s + u"\r\n"
|
l = u"|" + f.replace(".wav", "") + u"|" + s + u"\r\n"
|
||||||
csvFile.write(l.encode("windows-1251"))
|
csvFile.write(l.encode("windows-1251"))
|
||||||
|
|
||||||
|
|
||||||
if "files" in sys.argv:
|
if "files" in sys.argv:
|
||||||
path = "/tmp/SOUNDS/" + directory + "/SYSTEM/"
|
path = "/tmp/SOUNDS/" + directory + "/SYSTEM/"
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
|
|||||||
Reference in New Issue
Block a user