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
Anthony Larcher
sidepipe
Commits
8d67154d
Commit
8d67154d
authored
Oct 11, 2016
by
Anthony Larcher
Browse files
info in sstream
parent
7b170c26
Changes
1
Hide whitespace changes
Inline
Side-by-side
sstream.py
View file @
8d67154d
...
...
@@ -287,7 +287,6 @@ class SStream(object):
# Apply pre-emphasis filtering if required
sliding_sig
=
sliding_sig
-
np
.
c_
[
sliding_sig
[...,
:
1
],
sliding_sig
[...,
:
-
1
]]
*
self
.
prefac
# Compute logEnergy and send it as first coefficient
if
self
.
log_energy
:
energy
=
np
.
log
((
sliding_sig
**
2
).
sum
(
axis
=
1
))
...
...
@@ -318,7 +317,6 @@ class SStream(object):
nwin
=
self
.
_win_size
)
# Apply smoothing on the labels
vad
=
sidekit
.
frontend
.
vad
.
label_fusion
(
vad
)
while
idx
<
sliding_sig
.
shape
[
0
]:
next_routine
.
send
((
sliding_sig
[
idx
:
idx
+
self
.
buffer_size
,
:].
squeeze
(),
energy
,
vad
))
idx
+=
self
.
buffer_size
...
...
@@ -336,7 +334,7 @@ class SStream(object):
while
True
:
sig
=
yield
if
sig
.
squeeze
().
ndim
==
1
:
assert
second_channel
is
None
,
"Error: too many followers
"
assert
second_channel
is
None
,
"Error: too many followers
in {}"
.
format
(
self
.
input_filename
)
first_channel
.
send
(
sig
.
squeeze
())
elif
sig
.
squeeze
().
shape
[
1
]
==
2
:
assert
second_channel
is
not
None
,
"Error: missing second follower"
...
...
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