quick cleanup
This commit is contained in:
parent
8bbe75b1ea
commit
47db17688d
1 changed files with 3 additions and 24 deletions
|
@ -148,44 +148,23 @@ class Message(object):
|
||||||
|
|
||||||
# return "test";
|
# return "test";
|
||||||
async with self.filenameFetchLock:
|
async with self.filenameFetchLock:
|
||||||
print(threading.enumerate())
|
# print(threading.enumerate())
|
||||||
|
|
||||||
# client = AsyncHTTPClient()
|
|
||||||
info = {
|
info = {
|
||||||
'text': text,
|
'text': text,
|
||||||
'variable': True if self.hasVariables() else False
|
'variable': True if self.hasVariables() else False
|
||||||
}
|
}
|
||||||
# queryString = urllib.parse.urlencode(info)
|
|
||||||
# request = HTTPRequest(
|
|
||||||
# url = f"http://localhost:{self.story.panopticon_port}/voice?{queryString}",
|
|
||||||
# # url = f"http://rubenvandeven.com/",
|
|
||||||
# method="GET"
|
|
||||||
# )
|
|
||||||
# self.logger.log(LOG_BS, request.url)
|
|
||||||
# response = await client.fetch(request)
|
|
||||||
s = Context.instance().socket(zmq.REQ) #: :type s: zmq.sugar.Socket
|
s = Context.instance().socket(zmq.REQ) #: :type s: zmq.sugar.Socket
|
||||||
voiceAddr = f"ipc://voice{self.story.hugvey.id}"
|
voiceAddr = f"ipc://voice{self.story.hugvey.id}"
|
||||||
s.connect(voiceAddr)
|
s.connect(voiceAddr)
|
||||||
await s.send_json(info)
|
await s.send_json(info)
|
||||||
print('sent now wait')
|
|
||||||
filename = await s.recv_string()
|
filename = await s.recv_string()
|
||||||
print('reply', filename)
|
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
|
||||||
print(threading.enumerate())
|
# print(threading.enumerate())
|
||||||
# for t in threading.enumerate(): #: :type t: threading.Thread
|
|
||||||
# if t.name.startswith('ThreadPoolExecutor'):
|
|
||||||
# faulthandler.dump_traceback()
|
|
||||||
# exit()
|
|
||||||
|
|
||||||
# return "local/voices/static/64/64a016ce38faaac6cc59f6dc8e64cfa6bb81005b.wav"
|
|
||||||
|
|
||||||
# if response.code != 200:
|
|
||||||
# self.logger.critical(f"Error when fetching filename: {response.code} for {queryString}")
|
|
||||||
# return None
|
|
||||||
|
|
||||||
self.logger.debug(f"Fetched audio for {text}")
|
self.logger.debug(f"Fetched audio for {text}: {filename}")
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue