Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ambuj Mehrish
sidekit
Commits
bc0d5d9f
Commit
bc0d5d9f
authored
Jan 12, 2019
by
Anthony Larcher
Browse files
statserver
parent
8f28cac0
Changes
2
Hide whitespace changes
Inline
Side-by-side
features_server.py
View file @
bc0d5d9f
...
...
@@ -215,7 +215,7 @@ class FeaturesServer(object):
# Perform RASTA filtering if required
if
self
.
rasta
:
feat
,
label
=
self
.
_rasta
(
feat
,
label
)
# Add temporal context
if
self
.
delta
or
self
.
double_delta
:
feat
=
self
.
_delta_and_2delta
(
feat
)
...
...
@@ -223,7 +223,7 @@ class FeaturesServer(object):
feat
=
pca_dct
(
feat
,
self
.
dct_pca_config
[
0
],
self
.
dct_pca_config
[
1
],
self
.
dct_pca_config
[
2
])
elif
self
.
sdc
:
feat
=
shifted_delta_cepstral
(
feat
,
d
=
self
.
sdc_config
[
0
],
p
=
self
.
sdc_config
[
1
],
k
=
self
.
sdc_config
[
2
])
# Smooth the labels and fuse the channels if more than one.
logging
.
debug
(
'Smooth the labels and fuse the channels if more than one'
)
label
=
label_fusion
(
label
)
...
...
@@ -239,7 +239,7 @@ class FeaturesServer(object):
logging
.
debug
(
'no keep all'
)
feat
=
feat
[
label
]
label
=
label
[
label
]
return
feat
,
label
def
_mask
(
self
,
cep
):
...
...
@@ -487,8 +487,6 @@ class FeaturesServer(object):
feat
,
label
=
self
.
post_processing
(
feat
,
label
,
global_mean
,
global_std
)
else
:
feat
,
label
=
self
.
post_processing
(
feat
,
label
)
if
self
.
mask
is
not
None
:
feat
=
feat
[:,
self
.
mask
]
return
feat
,
label
...
...
statserver.py
View file @
bc0d5d9f
...
...
@@ -659,8 +659,7 @@ class StatServer:
# Compute 0th-order statistics
self
.
stat0
[
idx
,
:]
=
pp
.
sum
(
0
)
# Compute 1st-order statistics
self
.
stat1
[
idx
,
:]
=
numpy
.
reshape
(
numpy
.
transpose
(
numpy
.
dot
(
data
.
transpose
(),
pp
)),
ubm
.
sv_size
()).
astype
(
STAT_TYPE
)
self
.
stat1
[
idx
,
:]
=
numpy
.
reshape
(
numpy
.
transpose
(
numpy
.
dot
(
data
.
transpose
(),
pp
)),
ubm
.
sv_size
()).
astype
(
STAT_TYPE
)
def
get_mean_stat1
(
self
):
"""Return the mean of first order statistics
...
...
Write
Preview
Supports
Markdown
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