Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hublot
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yoann HOUPERT
hublot
Commits
33334800
Commit
33334800
authored
Apr 12, 2018
by
Yoann HOUPERT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add merged file
parent
09af1645
Pipeline
#13791
failed with stage
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
.env
.env
+3
-1
config.json
config.json
+2
-1
lib/resume.js
lib/resume.js
+14
-1
No files found.
.env
View file @
33334800
MODELS_PATH=./models/
MODELS_PATH=./models/current_model/model/
MODEL_PATH_OFFLINE=./models/current_model/
OFFLINE_PORT=9050
YAML=/opt/models/gmm_hmm3.yaml
NB_WORKERS=2
config.json
View file @
33334800
...
...
@@ -61,6 +61,7 @@
"srate"
:
16000
},
"host"
:
"hublot_offline_1"
,
"port"
:
9999
"port"
:
9999
,
"model"
:
"current_model"
}
}
lib/resume.js
View file @
33334800
...
...
@@ -19,6 +19,7 @@
*/
const
fs
=
require
(
'
fs
'
);
const
uuidv1
=
require
(
'
uuid/v1
'
);
const
request
=
require
(
'
request
'
);
const
ffmpegInstaller
=
require
(
'
@ffmpeg-installer/ffmpeg
'
);
const
ffprobeInstaller
=
require
(
'
@ffprobe-installer/ffprobe
'
);
...
...
@@ -35,6 +36,9 @@ module.exports = config => {
let
timestamp
=
undefined
;
let
userConf
=
0
;
function
offlineTranscription
(){
//TODO
}
function
resumeGenerator
(){
let
nbFile
=
0
;
...
...
@@ -45,6 +49,9 @@ module.exports = config => {
})
cmd
.
complexFilter
(
'
amix=inputs=
'
+
nbFile
+
'
:duration=first:dropout_transition=3
'
)
.
save
(
config
.
folder
.
audioMerged
+
"
/merged.wav
"
)
.
on
(
'
end
'
,
function
()
{
})
}
...
...
@@ -81,13 +88,14 @@ module.exports = config => {
streamData
.
wstream
.
close
();
let
delay
=
((
timestamp
-
streamData
.
timestamp
)
/
toSecond
)
*
-
1
;
try
{
console
.
log
(
'
generate silence
'
)
ffmpeg
()
.
input
(
'
anullsrc=sample_rate=
'
+
config
.
audio
.
srate
)
.
inputFormat
(
'
lavfi
'
)
.
duration
(
delay
)
.
output
(
config
.
folder
.
audioWav
+
"
/silence_
"
+
streamData
.
fileName
+
"
.wav
"
)
.
on
(
'
end
'
,
function
()
{
console
.
log
(
'
generate audio file
'
)
ffmpeg
(
streamData
.
pathFile
)
.
toFormat
(
config
.
audio
.
format
)
.
noVideo
()
...
...
@@ -95,7 +103,12 @@ module.exports = config => {
.
audioChannels
(
config
.
audio
.
channels
)
.
audioFrequency
(
config
.
audio
.
srate
)
.
save
(
config
.
folder
.
audioWav
+
"
/
"
+
streamData
.
fileName
+
"
.wav
"
)
.
on
(
'
error
'
,
function
(
err
)
{
--
userConf
console
.
log
(
'
An error occurred:
'
+
err
.
message
);
})
.
on
(
'
end
'
,
function
()
{
console
.
log
(
'
merge audio and silence
'
)
ffmpeg
()
.
input
(
config
.
folder
.
audioWav
+
"
/silence_
"
+
streamData
.
fileName
+
"
.wav
"
)
.
input
(
config
.
folder
.
audioWav
+
"
/
"
+
streamData
.
fileName
+
"
.wav
"
)
...
...
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