Skip to content

Commit 01a07cc

Browse files
author
Joel Acevedo-Aviles
committed
Release candidate 1 version 0.7.2 (tested)
1 parent 02818ef commit 01a07cc

File tree

5 files changed

+141
-123
lines changed

5 files changed

+141
-123
lines changed

README.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
1-
### pySLGR 0.7.2
2-
3-
A Python tool for Speaker, Language, and Gender Recognition (SLGR) and general meta-data extraction.
4-
5-
Preliminary release:
6-
* This release has initial functionality and basic algorithms for running SLGR systems
7-
* Future releases will have hyper-parameter training, documentation, and example systems
8-
9-
Requirements:
10-
* Linux
11-
* Boost libraries
12-
* Anaconda Python 2.7.x
13-
14-
Installation:
15-
* Download the files from the git release tab
16-
* Type 'conda install pyslgr-0.7.2-py27_0.tar.bz2' to install pySLGR
17-
* To run the examples untar the examples and models in the same directory
18-
* 'cd examples' and then './example_signal.py'
19-
20-
Building Cython interface only:
21-
* Type 'make' to build
22-
* Type 'make clean' to clean directories
23-
* Type 'make eg' to see some examples -- more examples are available in the examples subdirectory
24-
25-
Building an Anaconda package:
26-
* cd pyslgr
27-
* conda build .
28-
* conda install pyslgr --use-local
29-
1+
### pySLGR 0.7.2
2+
3+
A Python tool for Speaker, Language, and Gender Recognition (SLGR) and general meta-data extraction.
4+
5+
####Preliminary release:
6+
* This release has initial functionality and basic algorithms for running SLGR systems
7+
* Future releases will have hyper-parameter training, documentation, and example systems
8+
9+
####Requirements:
10+
* Linux (Ubuntu)
11+
* Boost libraries
12+
* Anaconda v4.3.1 for Python 2.7.x
13+
14+
####Installation:
15+
* Download the files from the git release tab
16+
* Type 'conda install pyslgr-0.7.2-py27_0.tar.bz2' to install pySLGR
17+
* To run the examples untar the examples and models in the same directory
18+
* 'cd examples' and then run examples with the command
19+
python <example_name.py>
20+
For instance to run the example_signal example type:
21+
python example_signal.py
22+
23+
####Building pySLGR from Source Code
24+
#####1. Build Cython Interface:
25+
* Type 'make' to build
26+
* Type 'make clean' to clean directories
27+
* Type 'make eg' to see some examples -- more examples are available in the examples subdirectory
28+
29+
#####2. Build Anaconda package:
30+
* Install conda-build package (version 2.1.10) in Anaconda if not installed already. Use the following command:
31+
conda install conda-build=2.1.10
32+
* cd <installation_dir>/pyslgr/pyslgr
33+
* Run the following command:
34+
conda build .
35+
36+
####Installing Conda Package After Build
37+
* Use the following command:
38+
conda install pyslgr --use-local
39+

examples/example_gsv.py

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
#!/usr/bin/env python
2-
3-
import json
4-
5-
from pyslgr.GMMModel import GMMSAD
6-
from pyslgr.GSV import GSV
7-
from pyslgr.LLSignal import LLSignal
8-
from pyslgr.MFCCFeatures import MFCCFeatures
9-
from pyslgr.FeatPipe import FeatPipe
10-
from pyslgr.sad import XtalkSAD
11-
12-
if __name__ == "__main__":
13-
14-
# Load example signal
15-
fn = 'signals/example.sph'
16-
x = LLSignal()
17-
x.load_sph(fn, 0)
18-
19-
# Initialize feature pipe
20-
mfcc_pipe_fn = "config/sid_mfcc+gmmsad_pipe.json"
21-
with open(mfcc_pipe_fn, 'r') as fp:
22-
pipe_config = json.load(fp)
23-
fpipe = FeatPipe(pipe_config, MFCCFeatures, GMMSAD)
24-
25-
# Get MFCCFeatures
26-
f = fpipe.process(x)
27-
28-
# Info
29-
print 'Number of output features: {}'.format(f.num_outfeat())
30-
# f.save_raw('tmp/gsv_feat.dat')
31-
32-
# Load in and create GSV
33-
with open('config/gsv.json', 'r') as fp:
34-
config = json.load(fp)
35-
gsv = GSV(config)
36-
37-
# Now compute a GSV expansion
38-
v = gsv.process(f)
39-
print 'A few elements of GSV expansion: {}'.format(v[0:10])
40-
print 'GSV expansion dimension = {}'.format(len(v))
1+
#!/usr/bin/env python
2+
3+
import json
4+
5+
from pyslgr.GMMModel import GMMSAD
6+
from pyslgr.GSV import GSV
7+
from pyslgr.LLSignal import LLSignal
8+
from pyslgr.MFCCFeatures import MFCCFeatures
9+
from pyslgr.FeatPipe import FeatPipe
10+
from pyslgr.sad import XtalkSAD
11+
12+
if __name__ == "__main__":
13+
14+
# Load example signal
15+
fn = 'signals/example.sph'
16+
x = LLSignal()
17+
x.load_sph(fn, 0)
18+
19+
# Initialize feature pipe
20+
mfcc_pipe_fn = "config/sid_mfcc+gmmsad_pipe.json"
21+
with open(mfcc_pipe_fn, 'r') as fp:
22+
pipe_config = json.load(fp)
23+
fpipe = FeatPipe(pipe_config, MFCCFeatures, GMMSAD)
24+
25+
# Get MFCCFeatures
26+
f = fpipe.process(x)
27+
28+
# Info
29+
print 'Number of output features: {}'.format(f.num_outfeat())
30+
# f.save_raw('tmp/gsv_feat.dat')
31+
32+
# Load in and create GSV
33+
with open('config/gsv.json', 'r') as fp:
34+
config = json.load(fp)
35+
gsv = GSV(config)
36+
37+
# Now compute a GSV expansion
38+
v = gsv.process(f)
39+
print 'A few elements of GSV expansion: {}'.format(v[0:10])
40+
print 'GSV expansion dimension = {}'.format(len(v))
41+
42+
print 'Done! Successfully completed GSV tests'

examples/example_ivec.py

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
#!/usr/bin/env python
2-
3-
import json
4-
5-
from pyslgr.GMMModel import GMMSAD
6-
from pyslgr.iVector import iVector
7-
from pyslgr.LLSignal import LLSignal
8-
from pyslgr.MFCCFeatures import MFCCFeatures
9-
from pyslgr.FeatPipe import FeatPipe
10-
import sys
11-
12-
if __name__ == "__main__":
13-
14-
# Load example signal
15-
fn = 'signals/example.sph'
16-
x = LLSignal()
17-
x.load_sph(fn, 0)
18-
19-
# Initialize feature pipe
20-
mfcc_pipe_fn = "config/sid_mfcc+gmmsad_pipe.json"
21-
with open(mfcc_pipe_fn, 'r') as fp:
22-
pipe_config = json.load(fp)
23-
fpipe = FeatPipe(pipe_config, MFCCFeatures, GMMSAD)
24-
25-
# Get MFCCFeatures
26-
f = fpipe.process(x)
27-
28-
# Info
29-
print 'Number of output features: {}'.format(f.num_outfeat())
30-
# f.save_raw('tmp/ivec_feat.dat')
31-
32-
# Load in and create ivector
33-
with open('config/ivec.json', 'r') as fp:
34-
config = json.load(fp)
35-
ivec = iVector(config)
36-
37-
# Now compute an ivector
38-
v = ivec.process(f)
39-
print 'A few elements of iVector: {}'.format(v[0:10])
40-
print 'iVector dimension = {}'.format(len(v))
1+
#!/usr/bin/env python
2+
3+
import json
4+
5+
from pyslgr.GMMModel import GMMSAD
6+
from pyslgr.iVector import iVector
7+
from pyslgr.LLSignal import LLSignal
8+
from pyslgr.MFCCFeatures import MFCCFeatures
9+
from pyslgr.FeatPipe import FeatPipe
10+
import sys
11+
12+
if __name__ == "__main__":
13+
14+
# Load example signal
15+
fn = 'signals/example.sph'
16+
x = LLSignal()
17+
x.load_sph(fn, 0)
18+
19+
# Initialize feature pipe
20+
mfcc_pipe_fn = "config/sid_mfcc+gmmsad_pipe.json"
21+
with open(mfcc_pipe_fn, 'r') as fp:
22+
pipe_config = json.load(fp)
23+
fpipe = FeatPipe(pipe_config, MFCCFeatures, GMMSAD)
24+
25+
# Get MFCCFeatures
26+
f = fpipe.process(x)
27+
28+
# Info
29+
print 'Number of output features: {}'.format(f.num_outfeat())
30+
# f.save_raw('tmp/ivec_feat.dat')
31+
32+
# Load in and create ivector
33+
with open('config/ivec.json', 'r') as fp:
34+
config = json.load(fp)
35+
ivec = iVector(config)
36+
37+
# Now compute an ivector
38+
v = ivec.process(f)
39+
print 'A few elements of iVector: {}'.format(v[0:10])
40+
print 'iVector dimension = {}'.format(len(v))
41+
42+
print 'Done! Successfully completed iVector tests'

pyslgr/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
python conda_setup.py install
44
dest_dir=${SP_DIR}/${PKG_NAME}
55
echo Copying Extension Modules to $dest_dir ...
6-
cp -r $PKG_NAME $dest_dir
6+
cp -rL $PKG_NAME $dest_dir
77
# filtersSrc=`pwd`/../../filters
88
# filtersDest=${SP_DIR}/$PKG_NAME/filters
99
# echo Copying filters to $filtersDest

pyslgr/meta.yaml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
package:
2-
name: pyslgr
3-
version: "0.7.2"
4-
5-
source:
6-
path: ../
7-
8-
requirements:
9-
build:
10-
- python
11-
- setuptools
12-
run:
13-
- python
1+
package:
2+
name: pyslgr
3+
version: "0.7.2"
4+
5+
source:
6+
path: ../
7+
8+
requirements:
9+
build:
10+
- python
11+
- setuptools
12+
run:
13+
- python
14+
15+
build:
16+
preserve_egg_dir: True
17+

0 commit comments

Comments
 (0)