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
Meysam Shamsi
s4d
Commits
3cea5427
Commit
3cea5427
authored
Jul 10, 2020
by
Anthony Larcher
Browse files
minor debug
parent
c447ff2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
s4d/clustering/hac_iv.py
View file @
3cea5427
...
...
@@ -41,7 +41,6 @@ def hac_iv(diar, scores, method="complete", threshold=0.0):
lscores
=
copy
.
deepcopy
(
scores
)
# get the triangular part of the distances
distances
,
t
=
scores2distance
(
lscores
,
threshold
)
# distance = numpy.copy((scores.scoremat + scores.scoremat.T) / 2.0) * -1.0
# numpy.fill_diagonal(distance, numpy.inf)
# min = numpy.min(distance)
...
...
s4d/diar.py
View file @
3cea5427
...
...
@@ -984,7 +984,7 @@ class Diar():
channel
=
'U'
if
diar
.
_attributes
.
exist
(
'channel'
):
channel
=
segment
[
'channel'
]
if
time_float
:
if
not
time_float
:
lst
.
append
(
'{:s} 1 {:d} {:d} {:s} {:s} {:s} {:s}
\n
'
.
format
(
segment
[
'show'
],
segment
[
'start'
],
segment
[
'stop'
]
-
segment
[
'start'
],
gender
,
channel
,
env
,
segment
[
'cluster'
]))
...
...
s4d/nnet/seqtoseq.py
View file @
3cea5427
...
...
@@ -34,7 +34,6 @@ from torch import optim
from
torch.utils.data
import
Dataset
import
logging
from
sidekit.nnet.vad_rnn
import
BLSTM
__license__
=
"LGPL"
__author__
=
"Anthony Larcher"
...
...
@@ -48,7 +47,7 @@ __docformat__ = 'reS'
class
PreNet
(
nn
.
Module
):
def
__init
(
self
,
def
__init
__
(
self
,
sample_rate
=
16000
,
windows_duration
=
0.2
,
frame_shift
=
0.01
):
...
...
@@ -132,6 +131,7 @@ class BLSTM(nn.Module):
class
SeqToSeq
(
nn
.
Module
):
def
__init__
(
self
):
super
(
SeqToSeq
,
self
).
__init__
()
self
.
preprocessor
=
PreNet
(
sample_rate
=
16000
,
windows_duration
=
0.2
,
frame_shift
=
0.01
)
...
...
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