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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.kaldi
Commits
56b7157a
There was a problem fetching the pipeline summary.
Commit
56b7157a
authored
8 years ago
by
Milos CERNAK
Browse files
Options
Downloads
Patches
Plain Diff
Addressing review comments
parent
eaab3caa
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Add documentation
Pipeline
#
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
MANIFEST.in
+1
-1
1 addition, 1 deletion
MANIFEST.in
README.rst
+5
-8
5 additions, 8 deletions
README.rst
bob/kaldi/mfcc.py
+2
-2
2 additions, 2 deletions
bob/kaldi/mfcc.py
doc/index.rst
+12
-10
12 additions, 10 deletions
doc/index.rst
with
20 additions
and
21 deletions
MANIFEST.in
+
1
−
1
View file @
56b7157a
include README.rst buildout.cfg develop.cfg version.txt
include
LICENSE
README.rst buildout.cfg develop.cfg version.txt
recursive-include doc conf.py *.rst
recursive-include doc conf.py *.rst
recursive-include bob/kaldi/test/data *.wav *.txt *.npy *.ivector *.ie
recursive-include bob/kaldi/test/data *.wav *.txt *.npy *.ivector *.ie
This diff is collapsed.
Click to expand it.
README.rst
+
5
−
8
View file @
56b7157a
...
@@ -28,13 +28,10 @@ Bob_.
...
@@ -28,13 +28,10 @@ Bob_.
Installation
Installation
------------
------------
Follow our `installation`_ instructions. Then, using the Python interpreter
To install the package, install firt bob, and then install the bob.kaldi package:
provided by the distribution, build this package with::
$ git clone BOB.KALDI_REPOSITORY
$ conda install bob kaldi
$ cd bob.kaldi
$ pip install bob.kaldi
$ source activate BOB_ENV
$ buildout
To be able to work properly, some dependent packages are required to be installed.
To be able to work properly, some dependent packages are required to be installed.
Please make sure that you have read the `Dependencies
Please make sure that you have read the `Dependencies
...
...
This diff is collapsed.
Click to expand it.
bob/kaldi/mfcc.py
+
2
−
2
View file @
56b7157a
...
@@ -11,7 +11,7 @@ from . import io
...
@@ -11,7 +11,7 @@ from . import io
from
subprocess
import
PIPE
,
Popen
from
subprocess
import
PIPE
,
Popen
# import subprocess
# import subprocess
from
os.path
import
exists
from
os.path
import
isfile
import
tempfile
import
tempfile
import
logging
import
logging
...
@@ -148,7 +148,7 @@ def mfcc_from_path(filename, channel=0, preemphasis_coefficient=0.97, raw_energy
...
@@ -148,7 +148,7 @@ def mfcc_from_path(filename, channel=0, preemphasis_coefficient=0.97, raw_energy
]
]
# import ipdb; ipdb.set_trace()
# import ipdb; ipdb.set_trace()
assert
exists
(
filename
)
assert
isfile
(
filename
)
with
open
(
os
.
devnull
,
"
w
"
)
as
fnull
:
with
open
(
os
.
devnull
,
"
w
"
)
as
fnull
:
pipe1
=
Popen
(
cmd1
,
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
fnull
)
pipe1
=
Popen
(
cmd1
,
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
fnull
)
...
...
This diff is collapsed.
Click to expand it.
doc/index.rst
+
12
−
10
View file @
56b7157a
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
import pkg_resources
import pkg_resources
import bob.kaldi
import bob.kaldi
import bob.io.audio
import bob.io.audio
import tempfile
import os
.. _bob.kaldi:
.. _bob.kaldi:
...
@@ -84,19 +85,20 @@ are supported, speakers can be enrolled and scored:
...
@@ -84,19 +85,20 @@ are supported, speakers can be enrolled and scored:
.. doctest::
.. doctest::
>>> sample = pkg_resources.resource_filename('bob.kaldi', 'test/data/sample16k.wav')
>>> mfcc = bob.kaldi.mfcc_from_path(sample)
>>> # Train small diagonall GMM
>>> # Train small diagonall GMM
>>> projector
_file = 'Projector'
>>> projector
= tempfile.TemporaryFile()
>>> dubm = bob.kaldi.ubm_train(
mfcc
, projector
_fil
e, num_gauss
=
2, num_gselect
=
2, num_iters
=
2)
>>> dubm = bob.kaldi.ubm_train(
feat
, projector
.nam
e, num_gauss
=
2, num_gselect
=
2, num_iters
=
2)
>>> # Train small full GMM
>>> # Train small full GMM
>>> ubm = bob.kaldi.ubm_full_train(
mfcc
, projector
_fil
e, num_gselect
=
2, num_iters
=
2)
>>> ubm = bob.kaldi.ubm_full_train(
feat
, projector
.nam
e, num_gselect
=
2, num_iters
=
2)
>>> # Enrollement - MAP adaptation of the UBM-GMM
>>> # Enrollement - MAP adaptation of the UBM-GMM
>>> spk_model = bob.kaldi.ubm_enroll(
mfcc
, dubm)
>>> spk_model = bob.kaldi.ubm_enroll(
feat
, dubm)
>>> # GMM scoring
>>> # GMM scoring
>>> score = bob.kaldi.gmm_score(
mfcc
, spk_model, dubm)
>>> score = bob.kaldi.gmm_score(
feat
, spk_model, dubm)
>>> print ('%.3f' % score)
>>> print ('%.3f' % score)
0.282
0.282
>>> os.unlink(projector.name)
>>> os.unlink(projector.name + '.dubm')
>>> os.unlink(projector.name + '.fubm')
Following guide describes how to run whole speaker recognition experiments:
Following guide describes how to run whole speaker recognition experiments:
...
@@ -104,13 +106,13 @@ Following guide describes how to run whole speaker recognition experiments:
...
@@ -104,13 +106,13 @@ Following guide describes how to run whole speaker recognition experiments:
.. code-block:: sh
.. code-block:: sh
./bin/
verify.py -d 'mobio-audio-male' -p 'energy-2gauss' -e 'mfcc-kaldi' -a 'gmm-kaldi' -s exp-gmm-kaldi --groups {dev,eval} -R '/your/work/directory/' -T '/your/temp/directory' -vv
verify.py -d 'mobio-audio-male' -p 'energy-2gauss' -e 'mfcc-kaldi' -a 'gmm-kaldi' -s exp-gmm-kaldi --groups {dev,eval} -R '/your/work/directory/' -T '/your/temp/directory' -vv
2. To run the ivector+plda speaker recognition experiment, run:
2. To run the ivector+plda speaker recognition experiment, run:
.. code-block:: sh
.. code-block:: sh
./bin/
verify.py -d 'mobio-audio-male' -p 'energy-2gauss' -e 'mfcc-kaldi' -a 'ivector-plda-kaldi' -s exp-ivector-plda-kaldi --groups {dev,eval} -R '/your/work/directory/' -T '/your/temp/directory' -vv
verify.py -d 'mobio-audio-male' -p 'energy-2gauss' -e 'mfcc-kaldi' -a 'ivector-plda-kaldi' -s exp-ivector-plda-kaldi --groups {dev,eval} -R '/your/work/directory/' -T '/your/temp/directory' -vv
3. Results:
3. Results:
...
...
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