Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LINAGORA
L
LGS
Labs
linstt-offline-decoding
Commits
b77c7c02
Commit
b77c7c02
authored
Jan 12, 2018
by
Rudy BARAGLIA
Browse files
Websocket based client-server communication
parent
e8507a20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
deploy-offline-decoding.sh
deploy-offline-decoding.sh
+1
-1
scripts/decode.sh
scripts/decode.sh
+2
-2
start_docker.sh
start_docker.sh
+1
-1
worker.py
worker.py
+6
-5
No files found.
deploy-offline-decoding.sh
View file @
b77c7c02
...
...
@@ -27,4 +27,4 @@ ln -s $PATH_STT_Models $PWD/systems/
##### Create wavs & trans directory #####
mkdir
wavs
mkdir
trans
echo
"Sucess..."
echo
"Suc
c
ess..."
scripts/decode.sh
View file @
b77c7c02
#!/bin/bash
.
./scripts/
cmd.sh
.
./scripts/
path.sh
.
cmd.sh
.
path.sh
# call sh ./decoding.sh ../systems/sys1
...
...
start_docker.sh
View file @
b77c7c02
...
...
@@ -4,4 +4,4 @@ docker build -t linagora/stt-offline .
# Start
Path_model
=
$1
port
=
$2
docker run
--rm
-it
-p
$port
:5000
-v
$Path_model
:/opt/models linagora/stt-offline
docker run
--rm
-it
-p
$port
:5000
-v
$Path_model
:/opt/models linagora/stt-offline
\ No newline at end of file
worker.py
View file @
b77c7c02
...
...
@@ -53,13 +53,14 @@ class WorkerWebSocket(WebSocketClient):
# TODO: preprocessing ? (sox python)
if
PREPROCESSING
:
pass
# Offline decode call
# Offline decoder call
logging
.
debug
(
os
.
listdir
(
'./wavs'
))
logging
.
debug
(
DECODER_COMMAND
+
' '
+
TEMP_FILE_PATH
+
self
.
fileName
+
'.wav'
)
subprocess
.
call
(
DECODER_COMMAND
+
' '
+
TEMP_FILE_PATH
+
self
.
fileName
+
'.wav'
,
shell
=
True
)
# TODO: nettoyer les fichiers temporaires
subprocess
.
call
(
"cd scripts; ./decode.sh ../systems/models "
+
self
.
fileName
+
".wav"
,
shell
=
True
)
# TODO: renvoyer la transcription au master
logging
.
debug
(
os
.
listdir
(
'.'
))
# Delete temporary files
# Check
if
os
.
path
.
isfile
(
'trans/decode_'
+
self
.
fileName
+
'.log'
):
with
open
(
'trans/decode_'
+
self
.
fileName
+
'.log'
,
'r'
)
as
resultFile
:
result
=
resultFile
.
read
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment