Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.kaldi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.kaldi
Commits
07963737
There was a problem fetching the pipeline summary.
Commit
07963737
authored
7 years ago
by
Milos CERNAK
Browse files
Options
Downloads
Patches
Plain Diff
Correction on iVector train data format
parent
6e8a6081
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/kaldi/ivector.py
+3
-6
3 additions, 6 deletions
bob/kaldi/ivector.py
bob/kaldi/test/test_ivector.py
+6
-2
6 additions, 2 deletions
bob/kaldi/test/test_ivector.py
with
9 additions
and
8 deletions
bob/kaldi/ivector.py
+
3
−
6
View file @
07963737
...
...
@@ -73,12 +73,9 @@ def ivector_train(feats, fubm, ivector_extractor, num_gselect=20,
# ToDo: implement Bob's function for that
with
tempfile
.
NamedTemporaryFile
(
delete
=
False
,
suffix
=
'
.ark
'
)
as
arkfile
:
with
open
(
arkfile
.
name
,
'
wb
'
)
as
f
:
if
feats
.
ndim
==
3
:
for
i
,
utt
in
enumerate
(
feats
):
uttid
=
'
utt
'
+
str
(
i
)
io
.
write_mat
(
f
,
utt
,
key
=
uttid
.
encode
(
'
utf-8
'
))
else
:
io
.
write_mat
(
f
,
feats
,
key
=
b
'
utt0
'
)
for
i
,
utt
in
enumerate
(
feats
):
uttid
=
'
utt
'
+
str
(
i
)
io
.
write_mat
(
f
,
utt
,
key
=
uttid
.
encode
(
'
utf-8
'
))
# Initialize the i-vector extractor using the FGMM input
cmd1
=
[
binary1
]
# fgmm-global-to-gmm
...
...
This diff is collapsed.
Click to expand it.
bob/kaldi/test/test_ivector.py
+
6
−
2
View file @
07963737
...
...
@@ -33,7 +33,9 @@ def test_ivector_train():
fubm
=
bob
.
kaldi
.
ubm_full_train
(
array
,
dubm
,
temp_fubm_file
,
num_gselect
=
2
,
num_iters
=
2
)
# Train small ivector extractor
ivector
=
bob
.
kaldi
.
ivector_train
(
array
,
fubm
,
temp_ivec_file
,
feats
=
[[]]
feats
[
0
]
=
array
ivector
=
bob
.
kaldi
.
ivector_train
(
feats
,
fubm
,
temp_ivec_file
,
num_gselect
=
2
,
ivector_dim
=
20
,
num_iters
=
2
)
assert
ivector
.
find
(
'
IvectorExtractor
'
)
...
...
@@ -59,7 +61,9 @@ def test_ivector_extract():
fubm
=
bob
.
kaldi
.
ubm_full_train
(
array
,
dubm
,
temp_fubm_file
,
num_gselect
=
2
,
num_iters
=
2
)
# Train small ivector extractor
ivector
=
bob
.
kaldi
.
ivector_train
(
array
,
fubm
,
temp_ivec_file
,
feats
=
[[]]
feats
[
0
]
=
array
ivector
=
bob
.
kaldi
.
ivector_train
(
feats
,
fubm
,
temp_ivec_file
,
num_gselect
=
2
,
ivector_dim
=
20
,
num_iters
=
2
)
# Extract ivector
ivector_array
=
bob
.
kaldi
.
ivector_extract
(
array
,
fubm
,
ivector
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment