__init__.py 3.79 KB
Newer Older
Anthony Larcher's avatar
Initial  
Anthony Larcher committed
1
# -*- coding: utf-8 -*-
Anthony Larcher's avatar
Anthony Larcher committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# This file is part of SIDEKIT.
#
# SIDEKIT is a python package for speaker verification.
# Home page: http://www-lium.univ-lemans.fr/sidekit/
#
# SIDEKIT is a python package for speaker verification.
# Home page: http://www-lium.univ-lemans.fr/sidekit/
#    
# SIDEKIT is free software: you can redistribute it and/or modify
# it under the terms of the GNU LLesser General Public License as 
# published by the Free Software Foundation, either version 3 of the License, 
# or (at your option) any later version.
#
# SIDEKIT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with SIDEKIT.  If not, see <http://www.gnu.org/licenses/>.
Anthony Larcher's avatar
Initial  
Anthony Larcher committed
23
24

"""
Anthony Larcher's avatar
Anthony Larcher committed
25
Copyright 2014-2016 Anthony Larcher and Sylvain Meignier
Anthony Larcher's avatar
Initial  
Anthony Larcher committed
26

Anthony Larcher's avatar
Anthony Larcher committed
27
28
29
:mod:`frontend` provides methods to process an audio signal in order to extract
useful parameters for speaker verification.
"""
Anthony Larcher's avatar
Initial  
Anthony Larcher committed
30

Anthony Larcher's avatar
Anthony Larcher committed
31
import numpy
Anthony Larcher's avatar
Anthony Larcher committed
32
PARALLEL_MODULE = 'multiprocessing'  # can be , threading, multiprocessing MPI is planned in the future
Anthony Larcher's avatar
Anthony Larcher committed
33
34
PARAM_TYPE = numpy.float32
STAT_TYPE = numpy.float64
Anthony Larcher's avatar
Anthony Larcher committed
35
THEANO_CONFIG = "gpu"  # can be gpu or cu
Anthony Larcher's avatar
Anthony Larcher committed
36

Anthony Larcher's avatar
Anthony Larcher committed
37
38
39
40
41
42
43
44
45
46
# Import bosaris-like classes
from sidekit.bosaris import IdMap
from sidekit.bosaris import Ndx
from sidekit.bosaris import Key
from sidekit.bosaris import Scores
from sidekit.bosaris import DetPlot
from sidekit.bosaris import effective_prior
from sidekit.bosaris import fast_minDCF

# Import classes
47
from sidekit.features_extractor import FeaturesExtractor
Anthony Larcher's avatar
Anthony Larcher committed
48
49
50
51
from sidekit.features_server import FeaturesServer
from sidekit.mixture import Mixture
from sidekit.statserver import StatServer

Anthony Larcher's avatar
Anthony Larcher committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
from sidekit.frontend.io import write_pcm
from sidekit.frontend.io import read_pcm
from sidekit.frontend.io import pcmu2lin
from sidekit.frontend.io import read_sph
from sidekit.frontend.io import write_label
from sidekit.frontend.io import read_label
from sidekit.frontend.io import read_spro4
from sidekit.frontend.io import read_audio
from sidekit.frontend.io import write_spro4
from sidekit.frontend.io import read_htk
from sidekit.frontend.io import write_htk

from sidekit.frontend.vad import vad_energy
from sidekit.frontend.vad import vad_snr
from sidekit.frontend.vad import label_fusion
from sidekit.frontend.vad import speech_enhancement


from sidekit.frontend.normfeat import cms
from sidekit.frontend.normfeat import cmvn
from sidekit.frontend.normfeat import stg
from sidekit.frontend.normfeat import rasta_filt


from sidekit.frontend.features import compute_delta
from sidekit.frontend.features import framing
from sidekit.frontend.features import pre_emphasis
from sidekit.frontend.features import trfbank
from sidekit.frontend.features import mel_filter_bank
from sidekit.frontend.features import mfcc
from sidekit.frontend.features import pca_dct
from sidekit.frontend.features import shifted_delta_cepstral

Anthony Larcher's avatar
Anthony Larcher committed
85
86
87
88
89
from sidekit.iv_scoring import cosine_scoring
from sidekit.iv_scoring import mahalanobis_scoring
from sidekit.iv_scoring import two_covariance_scoring
from sidekit.iv_scoring import PLDA_scoring

Anthony Larcher's avatar
gmm ubm    
Anthony Larcher committed
90
91
from sidekit.gmm_scoring import gmm_scoring 

Anthony Larcher's avatar
Anthony Larcher committed
92
93
94
95
96
97
98
# Import NNET classes and functions
try:
    import theano
    from sidekit.nnet.theano_utils import FForwardNetwork
except ImportError:
    pass

Anthony Larcher's avatar
Anthony Larcher committed
99

Anthony Larcher's avatar
Anthony Larcher committed
100
from sidekit.sv_utils import clean_stat_server
Anthony Larcher's avatar
Anthony Larcher committed
101

Anthony Larcher's avatar
modif    
Anthony Larcher committed
102

Anthony Larcher's avatar
Anthony Larcher committed
103

Anthony Larcher's avatar
Anthony Larcher committed
104
105
__author__ = "Anthony Larcher and Sylvain Meignier"
__copyright__ = "Copyright 2014-2016 Anthony Larcher and Sylvain Meignier"
Anthony Larcher's avatar
Initial  
Anthony Larcher committed
106
107
108
109
110
111
__license__ = "LGPL"
__maintainer__ = "Anthony Larcher"
__email__ = "anthony.larcher@univ-lemans.fr"
__status__ = "Production"
__docformat__ = 'reStructuredText'

Anthony Larcher's avatar
Anthony Larcher committed
112
113
114
115
116
# __all__ = ["io",
#            "vad",
#            "normfeat",
#            "features"
#            ]