Commit de8d1ada authored by Rudy BARAGLIA's avatar Rudy BARAGLIA

Modified API

parent d0935d4b
......@@ -140,7 +140,7 @@ class DecodeRequestHandler(tornado.web.RequestHandler):
@gen.coroutine
def receive_response(self, message):
logging.debug("Forwarding transcription to client")
self.add_header('result', message)
self.write({'transcript': message})
self.set_status(200, "Transcription succeded")
self.application.num_requests_processed += 1
self.waitResponse.notify()
......
......@@ -2,7 +2,7 @@
listening_port : 8888
keep_temp_files : false
max_waiting_time : 10
debug : false
debug : true
[machine_params]
temp_file_location : ./temp_files/
\ No newline at end of file
tools/
trans/
wavs/
client/
README.md
start_docker.sh
.git*
scripts/steps
scripts/utils
systems/
\ No newline at end of file
......@@ -60,7 +60,7 @@ class WorkerWebSocket(WebSocketClient):
# Check result
if os.path.isfile('trans/decode_'+self.fileName+'.log'):
with open('trans/decode_'+self.fileName+'.log', 'r') as resultFile:
result = resultFile.read()
result = resultFile.read().strip()
logging.debug("Transcription is: %s" % result)
self.send_result(result)
else:
......
#/bin/bash
cd $PWD
./module/server/master_server.py
./modules/worker_offline/start_worker.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment