Giter Club home page Giter Club logo

pycasp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pycasp's Issues

Does this code still function?

I am trying to install this on the latest ubuntu...but receive many errors.

Is there some kind of updated guide to getting it installed ?

Running diarization tests on a custom wav file

Hi!

Can you guide me in obtaining the mfcc_feats and the spnsp_file for a pre-recorder wav file. I would love to run speaker diarization for a file I have recorded myself.

Thank you,
Best thoughts,
Alex.

TypeError in compute_distance_BIC_idx

When I run the diarizer example, with the following configurations:

[Diarizer]
basename = test
mfcc_feats = test.htk
output_cluster = test.rttm
gmm_output = test.gmm

em_iterations = 3
initial_clusters = 16
M_mfcc = 5

KL_ntop = 3
num_seg_iters_init = 1
num_seg_iters = 1
seg_length = 250

I get the following result:

c++ -pthread -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wdate-time -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -D_FORTIFY_SOURCE=2 -I/usr/include/python2.7 -I/usr/local/cuda/include /tmp/asp_cache_ubuntu/2d078836d05987f85c8b136a5ae5a8c7/module.o /tmp/asp_cache_ubuntu/820bc0d22fdd0d4c58e04cfe09a4963e/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcublas -lcudart -lboost_python -lpython2.7 -lpthread -ldl -lutil -o /tmp/asp_cache_ubuntu/codepy.temp.2d078836d05987f85c8b136a5ae5a8c7.820bc0d22fdd0d4c58e04cfe09a4963e.module.so
No config file specified, using defaul 'diarizer.cfg' file
Speech file spnsp_file not specified, continuing without it...
...Reading in HTK feature file...
INFO: total number of frames read: 11368
...Reading in speech/nonspeech file...
====================== CLUSTERING ON SUBSET ======================
GMM SPECIALIZER: USING CUDA
c++ -pthread -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wdate-time -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -D_FORTIFY_SOURCE=2 -I/usr/include/python2.7 -I/home/ubuntu/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/cuda/include /tmp/asp_cache_ubuntu/b3946a00f5a557aa059251ee30f8cdbc/module.o /tmp/asp_cache_ubuntu/24e36246626cf2c6839211f268b2aa71/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcublas -lcudart -lboost_python -lpython2.7 -lpthread -ldl -lutil -o /tmp/asp_cache_ubuntu/codepy.temp.b3946a00f5a557aa059251ee30f8cdbc.24e36246626cf2c6839211f268b2aa71.module.so
Traceback (most recent call last):
File "cluster.py", line 700, in
num_seg_iters, seg_length)
File "cluster.py", line 488, in cluster_use_subset
new_gmm, score = compute_distance_BIC_idx(g1, g2, self.X, indices)
File "build/bdist.linux-x86_64/egg/gmm_specializer/gmm.py", line 885, in compute_distance_BIC_idx
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

I am unsure as to how to solve this. Is it a result of me generating the HTK file incorrectly? I did it by installing the HTK Toolkit (http://htk.eng.cam.ac.uk/download.shtml) and used the following config file:

TARGETKIND = MFCC_0
TARGETRATE = 100000.0
SAVECOMPRESSED = T
SAVEWITHCRC = T
WINDOWSIZE = 250000.0
USEHAMMING = T
PREEMCOEF = 0.97
NUMCHANS = 26
CEPLIFTER = 22
NUMCEPS = 12
ENORMALISE = F
SOURCEKIND = WAVEFORM
SOURCEFORMAT = NOHEAD
SOURCERATE = 1250

Any help would be greatly appreciated!

Python

Hi,

This package looks to be very promising, thanks for sharing. I'm encountering an issue with installation, however, and wonder whether this is specific to Python 3 (searching for the error code suggests it), and if so, whether it can be resolved. The error code:
TypeError: chown() missing 1 required positional argument: 'numeric_owner'

Best,
Arjen
OSX :: Python 3.5.2 :: Anaconda 4.1.1 (x86_64)

Install PyCASP in windows

Hi, i tried following the above method installing in windows, but i encountered the following problem:
Can anyone help ?

Installed c:\users\ltiangku\appdata\local\continuum\anaconda3\lib\site-packages\
pycasp-0.1-py3.5.egg
Processing dependencies for pycasp==0.1
Searching for asp
Reading https://pypi.python.org/simple/asp/
Downloading https://pypi.python.org/packages/a5/cf/5ea8de46052271346bac7ac789c09
ca8ee1303421a4d5db9a2f106e1e1a7/asp-0.1.2.4.tar.gz#md5=21569a267f4f99558b5a9dc72
ee1d4c6
Best match: asp 0.1.2.4
Processing asp-0.1.2.4.tar.gz
Writing C:\Users\ltiangku\AppData\Local\Temp\easy_install-cd5klju2\asp-0.1.2.4\s
etup.cfg
Running asp-0.1.2.4\setup.py -q bdist_egg --dist-dir C:\Users\ltiangku\AppData\L
ocal\Temp\easy_install-cd5klju2\asp-0.1.2.4\egg-dist-tmp-od174e4j
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.1
6.tar.gz
Extracting in C:\Users\ltiangku\AppData\Local\Temp\easy_install-cd5klju2\asp-0.1
.2.4\temp\tmpmvwidtvi
error: [WinError 32] The process cannot access the file because it is being used
 by another process: 'C:\\Users\\ltiangku\\AppData\\Local\\Temp\\easy_install-cd
5klju2\\asp-0.1.2.4\\distribute-0.6.16.tar.gz'

Diarizing WAV file: ValueError: Input must be 1- or 2-d.

I am using pycasp with CUDA 5.0 on Ubuntu 12.04LTS (GeForce GTX 650). I am trying to test out pycasp using the Diarizer example by diarizing a 65 minute 16 bit, 8khz wav file.

First, I try to convert the wav to htk, I create a config.mfcc:

SOURCEKIND = WAVEFORM
SOURCEFORMAT = WAVE
SOURCERATE = 625
TARGETKIND = MFCC_0
TARGETRATE = 100000.0
WINDOWSIZE = 250000.0
USEHAMMING = T
PREEMCOEF = 0.97
NUMCHANS = 20
CEPLIFTER = 22
NUMCEPS = 12

Then i run:
HCopy -C config.mfcc test.wav test.htk
This completes successfully.

I then set diarizer.cfg as follows:

[Diarizer]
basename = IS1008a
mfcc_feats = /home/jltest/test.htk
output_cluster = /home/jltest/test.rttm
gmm_output = IS.gmm

em_iterations = 3
initial_clusters = 16
M_mfcc = 5

KL_ntop = 3
num_seg_iters_init = 1
num_seg_iters = 1
seg_length = 250

After running python cluster.py, I get:

size of each cluster: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10]
size of each cluster: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10]
size of each cluster: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10]
size of each cluster: [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10]
size of each cluster: [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 15]
size of each cluster: [5, 5, 5, 5, 5, 10, 10, 10, 15, 10]
size of each cluster: [5, 5, 5, 5, 10, 10, 15, 10, 15]
size of each cluster: [5, 5, 5, 10, 10, 15, 10, 20]
size of each cluster: [5, 5, 5, 10, 10, 20, 25]
size of each cluster: [5, 5, 5, 20, 25, 20]
size of each cluster: [5, 5, 20, 25, 25]
size of each cluster: [5, 20, 25, 30]
size of each cluster: [20, 30, 30]
size of each cluster: [30, 50]
size of each cluster: [80]
=== Total clustering time: 85.4342420101
=== Final size of each cluster: [80]
...Writing out RTTM file...
DONE writing RTTM file
Traceback (most recent call last):
File "cluster.py", line 707, in
diarizer.write_to_GMM(gmmfile)
File "cluster.py", line 203, in write_to_GMM
g_covar = np.diag(g_covar_full)
File "/usr/lib/python2.7/dist-packages/numpy/lib/twodim_base.py", line 292, in diag
raise ValueError("Input must be 1- or 2-d.")
ValueError: Input must be 1- or 2-d.

The file IS.gmm is created with the following:

Number of clusters: 1
Cluster 0
Number of Gaussians: 80

Any ideas on the issue I'm running into? I was hoping to get the RTTM cluster file.

Thank you!

Issue when install

i got this issue when i run install command
urllib.error.HTTPError: HTTP Error 403: SSL is required

unable to "from gmm_specializer.gmm import *"

Hi,

after
import pycasp
i did
from gmm_specializer.gmm import *

but the following error gives:

No configuration file ~/.asp_config.yml found.
Configuration key cuda_device_id not found
Configuration key autotune not found
Configuration key template_path not found
Configuration key name_of_backend_to_use not found
ERROR: You asked for a GMM specializer backend that is not supported. Currently GMM specializer only supports CUDA and Cilk backends.

How do i solve this ?

codepy.toolchain.ToolchainGuessError: unknown compiler

I'm trying to install this on OS X. When I try to run the tests script, I'm getting the below:

Traceback (most recent call last):
  File "tests/gmm_test.py", line 4, in <module>
    from gmm_specializer.gmm import GMM 
  File "/usr/local/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 61, in <module>
    class GMM(object):
  File "/usr/local/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 69, in GMM
    platform = PlatformDetector()
  File "/usr/local/lib/python2.7/site-packages/asp-0.1.2.4-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/usr/local/lib/python2.7/site-packages/asp-0.1.2.4-py2.7.egg/asp/jit/asp_module.py", line 342, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/usr/local/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 433, in guess_toolchain
    raise ToolchainGuessError("unknown compiler")
codepy.toolchain.ToolchainGuessError: unknown compiler

Anyone have any idea which setting I'm missing?

pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory

First thanks for this very promising project! I am having some issues getting the tests to work.

The installation worked smoothly and I got no error message. But when I try to run the tests I get this (see full version at the bottom):

pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory

I am using OsX 10.10.4 and python 2.7. I wonder whether this is an issue due to changes in OsX compilers. This is my current:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

And here the full output of the tests:

  File "tests/gmm_test.py", line 4, in <module>
    from gmm_specializer.gmm import GMM 
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 61, in <module>
    class GMM(object):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 69, in GMM
    platform = PlatformDetector()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/jit/asp_module.py", line 352, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 415, in guess_toolchain
    result, version, stderr = call_capture_output([kwargs["cc"], "--version"])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 197, in call_capture_output
    return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 54, in call_capture_output
    % ( " ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "tests/svm_test.py", line 4, in <module>
    from svm_specializer.svm import * 
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/svm_specializer/svm.py", line 77, in <module>
    class SVM(object):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/svm_specializer/svm.py", line 84, in SVM
    platform = PlatformDetector()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/jit/asp_module.py", line 352, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 415, in guess_toolchain
    result, version, stderr = call_capture_output([kwargs["cc"], "--version"])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 197, in call_capture_output
    return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 54, in call_capture_output
    % ( " ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "tests/svm_gmm_test.py", line 1, in <module>
    from gmm_specializer.gmm import *
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 61, in <module>
    class GMM(object):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 69, in GMM
    platform = PlatformDetector()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/jit/asp_module.py", line 352, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 415, in guess_toolchain
    result, version, stderr = call_capture_output([kwargs["cc"], "--version"])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 197, in call_capture_output
    return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 54, in call_capture_output
    % ( " ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory

No module named 'asp'

\gmm-master\gmm-master\gmm_specializer\gmm.py", line 4, in
from asp.config import PlatformDetector, ConfigReader
ModuleNotFoundError: No module named 'asp'

I keep getting this error and I can't find a solution for it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.