readalongs / soundswallower Goto Github PK
View Code? Open in Web Editor NEWAn even smaller speech recognizer / force aligner
License: Other
An even smaller speech recognizer / force aligner
License: Other
There is no good reason to compile to WebAssembly and run under Node.js aside from testing, and doing so makes everything more complicated and prevents us from easily packaging SoundSwallower as an ES6 module (though maybe that bug is fixed: emscripten-core/emscripten#17915)
Still, there isn't any good reason to do it. SoundSwallower is always used via Python for offline, command-line, etc, and this makes sense since all the code stuff for manipulating speech data and models is there anyway.
The problem is that we need to test the JavaScript code, and Node.js is pretty useful for that. There are I think like 15 different solutions for providing an automated test environment that looks like the browser, all of them have cutsey names and probably icons too, and I have no clue.
So probably I should figure this out.
There are most certainly large parts of the code that just shouldn't be written in C.
An obvious candidate is the JSGF parser, which can be reimplented with Jison http://zaa.ch/jison/ or PEG.js https://pegjs.org/ (yes, as far as I know, there isn't a JSGF parser written in JavaScript already, and yes, despite its name, you can't just parse JSGF as JavaScript)
It would be interesting to reimplement the FSG search as well. The HMM/GMM implementations would remain in C, obviously.
This requires linear algebra routines to be enabled everywhere (#10) and two-pass alignment to be implemented (#9).
Once we have that, we should think about how to do this. At the very least we should have an explicit "enrollment" mode that does force-alignment from a known text or finite-state grammar.
Detail:
(.env) Hobbes:build kal$ soundswallower --model /Volumes/experiments/en-es/en/phonetic-1000/model_parameters/en-lss-02.cd_ptm_1000 --dict /Volumes/experiments/en-es/en/etc/en-lss-02.dic --align-text "i am good thank you" ~/wav/i_am_good_thank_you.wav
INFO:root:Setting sample rate to 24000
INFO:root:Increasing FFT size to 1024 for sample rate 24000
ERROR: "pocketsphinx.c", line 594: No search module is selected, did you forget to specify a language model or grammar?
Traceback (most recent call last):
File "/Users/kal/dev/other/SoundSwallower/.env/bin/soundswallower", line 33, in <module>
sys.exit(load_entry_point('soundswallower', 'console_scripts', 'soundswallower')())
File "/Users/kal/dev/other/SoundSwallower/py/soundswallower/cli.py", line 152, in main
_, file_align = decoder.decode_file(input_file)
File "_soundswallower.pyx", line 732, in _soundswallower.Decoder.decode_file
self.start_utt()
File "_soundswallower.pyx", line 413, in _soundswallower.Decoder.start_utt
raise RuntimeError, "Failed to start utterance processing"
RuntimeError: Failed to start utterance processing
However when using a JSGF, it does fine:
$ soundswallower --model /Volumes/experiments/en-es/en/phonetic-1000/model_parameters/en-lss-02.cd_ptm_1000 --dict /Volumes/experiments/en-es/en/etc/en-lss-02.dic ~/wav/i_am_good_thank_you.wav -g i_am_good_thank_you.jsgf
INFO:root:Setting sample rate to 24000
INFO:root:Increasing FFT size to 1024 for sample rate 24000
[[{"id": "i", "start": 0.0, "end": 0.2}, {"id": "am", "start": 0.2, "end": 0.37}, {"id": "good", "start": 0.37, "end": 0.75}, {"id": "thank", "start": 0.75, "end": 1.18}, {"id": "you", "start": 1.18, "end": 1.46}]]
I got one e-mail about not being able to install ReadAlongs Studio with Python 3.11 on Windows 11 because the compiler was not installed. lxml and soundswallower were the issues.
It would be nice to include Python 3.12 at the same time if that's feasible already.
Let's add the files to get proper type hinting, etc, when using SoundSwallower from TypeScript. I guess these are those magical .d files :)
Somebody already did this for PocketSphinx, though it needs to be updated: https://github.com/cmusphinx/pocketsphinx-rs
Evidently it will not be "batteries included" like the Python, as that is not very rusty.
This is a good stepping stone to rewriting the whole library in Rust, which is a good idea (though it will probably make it less smol, at least at first).
First of all because it has a couple of layers of historical cruft around it ... you pass a config_t
which then gets "parsed" into a separate parameters structure, which then gets "parsed" into actual parameters.
But more importantly because everything is directed from this top-level configuration, so once you have configured it, it will only give you one particular kind of features. This in particular makes the case where we'd like to do visualization (using power-spectrum, mel-spectrum, or smoothed spectrum) and also recognition (using MFCC) at the same time non-possible.
Also there are like 5 kinds of VTLN, none of which we use, and probably none of which we will ever use.
And finally because the code which does the buffering and windowing is just utter trash (and I should know because I wrote it).
Python 3.12.1
Ubuntu 22.04.3
$ pip install soundswallower
Collecting soundswallower
Using cached soundswallower-0.6.0.tar.gz (10.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/home/joa125/u/miniconda3/envs/ras-py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/joa125/u/miniconda3/envs/ras-py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/joa125/u/miniconda3/envs/ras-py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "/home/joa125/u/miniconda3/envs/ras-py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/joa125/u/miniconda3/envs/ras-py312/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 994, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/gpfs/fs3c/nrc/ict/portage/u/joa125/tmp/pip-build-env-2oqu8f8y/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/gpfs/fs3c/nrc/ict/portage/u/joa125/tmp/pip-build-env-2oqu8f8y/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/gpfs/fs3c/nrc/ict/portage/u/joa125/tmp/pip-build-env-2oqu8f8y/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2191, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
For force alignment we are not actually doing live recognition, but the API inherited from PocketSphinx still assumes this. We need a better one, which:
Hi,
I'm trying to build a Python package on an Arm board (Raspberry Pi 3b) but it keeps failing with the below error.
Any idea how I can debug it and try to solve it? Thanks
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/zavalyshyn/SoundSwallower
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: soundswallower
Building wheel for soundswallower (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpwtugxr1s_in_process.py build_wheel /tmp/tmpnzbnnqdm
cwd: /tmp/pip-req-build-1cursi7w
Complete output (56 lines):
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-1cursi7w/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/tmpwtugxr1s_in_process.py", line 280, in <module>
main()
File "/tmp/tmpwtugxr1s_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmpwtugxr1s_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-c4y_864f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-c4y_864f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-c4y_864f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(code, locals())
File "<string>", line 4, in <module>
File "/tmp/pip-build-env-c4y_864f/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 632, in setup
env = cmkr.configure(
File "/tmp/pip-build-env-c4y_864f/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 302, in configure
cmd.append(f"{prefix}_NumPy_INCLUDE_DIRS:PATH=" + np.get_include())
AttributeError: module 'numpy' has no attribute 'get_include'
----------------------------------------
ERROR: Failed building wheel for soundswallower
Failed to build soundswallower
ERROR: Could not build wheels for soundswallower which use PEP 517 and cannot be installed directly
A requirements.txt
with scikit-build
it in is all that's needed to populate the venv with everything it needs
We should be able to just do this since we suport JSGF, etc: https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API
As stated above!
It's not totally clear how to do this from inside the source tree. Maybe we need to use scikit-build?
Alternately we can just compile libsoundswallower statically (but as PIC) and link it into the Python module. This seems like it might be the best idea.
Then we need to set up the whole thing to compile for manylinux: https://github.com/pypa/manylinux
This maybe has some hints https://thomastrapp.com/blog/building-a-pypi-package-for-a-modern-cpp-project/#packaging-a-precompiled-module-for-pypi
It would be great to be able to easily get both word and phonetic timings/alignments -- perhaps as a two pass process, first to get which pronunciations and word timings, and then a second pass for phone timings. In general, it would be great to get phonetic alignments, but getting word AND phonetic alignments with some sort of sensible relationship would be superb.
We've done some of this by doing a second pass the pronunciation, using "phoneme words" with single-phone pronunciations, but that doesn't account for word-phone-position features in the clustering (b, i, m ,s) when using cd models.
Another issue that came up with that approach is that the word boundaries and the phoneme boundary timings didn't align, due to differences in the search. It would be possible to do a phonetic decode within the word boundary, or to adjust to word boundaries after the phonetic pass...
It seems that this is possible, so we should do it.
For efficiency, and also for improved alignment in some situations, it is useful to use only the context-independent phones from an existing acoustic model. At a minimum this means simply disabling the CD phones in the mdef object. However, we should also be able to disable the cross-word triphone handling in the search.
Considering that this code already exists somewhere in the guts of the browser, it is pretty silly to compile it separately into WebAssembly. Unfortunately, there isn't actually any API to access it from JavaScript, so we are stuck having to do our own VAD for endpointing.
The problem with the WebRTC code used in PocketSphinx5 is:
For these reasons the ideal solution is, horror of horrors, something very much like the -remove_silence
option in PocketSphinx that was the whole reason for creating SoundSwallower in the first place (because I was so seriously annoyed at it removing data from the input, making force-alignment useless). Of course, it has to be done in a way that makes endpointing optional and doesn't break the batch-mode API. So, specifically:
Internally we can either use the WebRTC method based on log-spectra or the PocketSphinx 5prealpha method.
Text-format model definitions are bigger on disk but they actually compress down much smaller (600k vs 900k for the default en-us model using default gzip settings) which is what matters when serving on the web.
We may wish to use JSON in the future but for now at least we can make the code smaller...
Currently we have to punt on the linear algebra routines by default because not everybody has BLAS and LAPACK, and the "lite" versions are somewhat out of date and don't compile properly to JavaScript, among other things.
Solutions do exist! First we should update the "lite" ones and strip them down to the bare essentials. For JavaScript we can use emlapack. And we can optionally use a system LAPACK, but this should not be on by default as it is an external dependency.
We should follow this change we've done everywhere else, and rename the default branch main
.
If we named this "SoundSwallow" we could make a cute bird logo for it :D
The PocketSphinx API uses incomplete types everywhere to do very strict data hiding. This is conceptually very nice but in reality we don't care, because we want this library to be small enough that everybody can just have their own copy of it and not bother with ABI compatibility. Also we're going to compile it to JavaScript anyway.
Basically this means that pocketsphinx_internal.h and friends should move to the public include directory.
The acoustic model format has diverged somewhat from CMU Sphinx, and is expected to diverge further. Supporting multiple model formats is not consistent with the goal of making the smallest possible library, so we require a converter to be able to use publically available models. Currently this means:
mixture_weights
to sendump
feat_params
to JSONIn the future it may mean (but this is not in the scope of this issue):
Instead of command-line switches (there are too many of them) we should use JSON, or Python dictionaries, as the case may be, to configure the recognizer. Also, we need to stop parsing strings as floats internally to the code, this should only be done when we first read the configuration.
The VAD implementation is poorly thought-out because it messes up the time alignments in the output. Requiring people to use the continuous API doesn't really fix this problem, and isn't what we want for a lot of use cases (force alignment, for instance).
It should be disabled pending some kind of fix to get the alignments right in the output.
Summary:
on 864bc85
macOS 12.3.1 (Monterey)
CMake Error at include/soundswallower/cmake_install.cmake:41 (file):
file INSTALL cannot find
"/Users/kal/dev/other/SoundSwallower/include/soundswallower/matrix.h": No
such file or directory.
Call Stack (most recent call first):
cmake_install.cmake:51 (include)
Detail:
Hobbes:other kal$ git clone https://github.com/ReadAlongs/SoundSwallower.git
Cloning into 'SoundSwallower'...
remote: Enumerating objects: 2564, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 2564 (delta 8), reused 17 (delta 6), pack-reused 2545
Receiving objects: 100% (2564/2564), 42.25 MiB | 8.51 MiB/s, done.
Resolving deltas: 100% (1664/1664), done.
Hobbes:SoundSwallower kal$ open README.md
Hobbes:SoundSwallower kal$ mkdir build
Hobbes:SoundSwallower kal$ cd build
Hobbes:build kal$ cmake ..
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/kal/dev/other/SoundSwallower/build
Hobbes:build kal$ make
Scanning dependencies of target soundswallower
[ 0%] Building C object src/CMakeFiles/soundswallower.dir/acmod.c.o
[ 1%] Building C object src/CMakeFiles/soundswallower.dir/bin_mdef.c.o
[ 2%] Building C object src/CMakeFiles/soundswallower.dir/bio.c.o
[ 3%] Building C object src/CMakeFiles/soundswallower.dir/bitvec.c.o
[ 4%] Building C object src/CMakeFiles/soundswallower.dir/blkarray_list.c.o
[ 5%] Building C object src/CMakeFiles/soundswallower.dir/case.c.o
[ 6%] Building C object src/CMakeFiles/soundswallower.dir/ckd_alloc.c.o
[ 6%] Building C object src/CMakeFiles/soundswallower.dir/cmd_ln.c.o
[ 7%] Building C object src/CMakeFiles/soundswallower.dir/cmn.c.o
[ 8%] Building C object src/CMakeFiles/soundswallower.dir/cmn_live.c.o
[ 9%] Building C object src/CMakeFiles/soundswallower.dir/dict2pid.c.o
[ 10%] Building C object src/CMakeFiles/soundswallower.dir/dict.c.o
[ 11%] Building C object src/CMakeFiles/soundswallower.dir/err.c.o
/Users/kal/dev/other/SoundSwallower/src/err.c:169:19: warning: variable 'oldfp' set but not used [-Wunused-but-set-variable]
FILE *newfp, *oldfp;
^
1 warning generated.
[ 12%] Building C object src/CMakeFiles/soundswallower.dir/feat.c.o
[ 12%] Building C object src/CMakeFiles/soundswallower.dir/fe_interface.c.o
[ 13%] Building C object src/CMakeFiles/soundswallower.dir/fe_sigproc.c.o
[ 14%] Building C object src/CMakeFiles/soundswallower.dir/fe_warp_affine.c.o
[ 15%] Building C object src/CMakeFiles/soundswallower.dir/fe_warp.c.o
[ 16%] Building C object src/CMakeFiles/soundswallower.dir/fe_warp_inverse_linear.c.o
[ 17%] Building C object src/CMakeFiles/soundswallower.dir/fe_warp_piecewise_linear.c.o
[ 18%] Building C object src/CMakeFiles/soundswallower.dir/filename.c.o
[ 18%] Building C object src/CMakeFiles/soundswallower.dir/fsg_history.c.o
[ 19%] Building C object src/CMakeFiles/soundswallower.dir/fsg_lextree.c.o
[ 20%] Building C object src/CMakeFiles/soundswallower.dir/fsg_model.c.o
[ 21%] Building C object src/CMakeFiles/soundswallower.dir/fsg_search.c.o
[ 22%] Building C object src/CMakeFiles/soundswallower.dir/genrand.c.o
[ 23%] Building C object src/CMakeFiles/soundswallower.dir/glist.c.o
[ 24%] Building C object src/CMakeFiles/soundswallower.dir/hash_table.c.o
[ 25%] Building C object src/CMakeFiles/soundswallower.dir/heap.c.o
[ 25%] Building C object src/CMakeFiles/soundswallower.dir/hmm.c.o
[ 26%] Building C object src/CMakeFiles/soundswallower.dir/jsgf.c.o
[ 27%] Building C object src/CMakeFiles/soundswallower.dir/jsgf_parser.c.o
[ 28%] Building C object src/CMakeFiles/soundswallower.dir/jsgf_scanner.c.o
[ 29%] Building C object src/CMakeFiles/soundswallower.dir/listelem_alloc.c.o
[ 30%] Building C object src/CMakeFiles/soundswallower.dir/logmath.c.o
[ 31%] Building C object src/CMakeFiles/soundswallower.dir/mdef.c.o
[ 31%] Building C object src/CMakeFiles/soundswallower.dir/mmio.c.o
[ 32%] Building C object src/CMakeFiles/soundswallower.dir/ms_gauden.c.o
[ 33%] Building C object src/CMakeFiles/soundswallower.dir/ms_mgau.c.o
[ 34%] Building C object src/CMakeFiles/soundswallower.dir/ms_senone.c.o
[ 35%] Building C object src/CMakeFiles/soundswallower.dir/pio.c.o
/Users/kal/dev/other/SoundSwallower/src/pio.c:77:1: warning: unused function 'guess_comptype' [-Wunused-function]
guess_comptype(char const *file, int32 *ispipe, int32 *isgz)
^
1 warning generated.
[ 36%] Building C object src/CMakeFiles/soundswallower.dir/pocketsphinx.c.o
[ 37%] Building C object src/CMakeFiles/soundswallower.dir/profile.c.o
[ 37%] Building C object src/CMakeFiles/soundswallower.dir/ps_lattice.c.o
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1181:15: warning: unused variable 'n_used' [-Wunused-variable]
int32 n_used;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1182:15: warning: variable 'to_is_fil' set but not used [-Wunused-but-set-variable]
int16 to_is_fil;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1247:19: warning: variable 'w1_is_fil' set but not used [-Wunused-but-set-variable]
int16 w1_is_fil;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1196:22: warning: unused variable 'n_used' [-Wunused-variable]
int32 bprob, n_used;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1274:22: warning: unused variable 'n_used' [-Wunused-variable]
int32 bprob, n_used;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1322:17: warning: unused variable 'lback' [-Wunused-variable]
int lback;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1380:22: warning: unused variable 'n_used' [-Wunused-variable]
int32 bprob, n_used;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1497:15: warning: unused variable 'n_used' [-Wunused-variable]
int32 n_used;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1568:15: warning: unused variable 'n_used' [-Wunused-variable]
int32 n_used;
^
/Users/kal/dev/other/SoundSwallower/src/ps_lattice.c:1638:19: warning: unused variable 'n_used' [-Wunused-variable]
int32 n_used;
^
10 warnings generated.
[ 38%] Building C object src/CMakeFiles/soundswallower.dir/ps_mllr.c.o
[ 39%] Building C object src/CMakeFiles/soundswallower.dir/ptm_mgau.c.o
[ 40%] Building C object src/CMakeFiles/soundswallower.dir/s2_semi_mgau.c.o
[ 41%] Building C object src/CMakeFiles/soundswallower.dir/strfuncs.c.o
[ 42%] Building C object src/CMakeFiles/soundswallower.dir/tmat.c.o
[ 43%] Building C object src/CMakeFiles/soundswallower.dir/vector.c.o
[ 43%] Building C object src/CMakeFiles/soundswallower.dir/yin.c.o
[ 44%] Linking C static library libsoundswallower.a
[ 44%] Built target soundswallower
Scanning dependencies of target test_subvq
[ 45%] Building C object tests/CMakeFiles/test_subvq.dir/test_subvq.c.o
[ 46%] Linking C executable test_subvq
[ 46%] Built target test_subvq
Scanning dependencies of target test_strfuncs
[ 47%] Building C object tests/CMakeFiles/test_strfuncs.dir/test_strfuncs.c.o
[ 48%] Linking C executable test_strfuncs
[ 48%] Built target test_strfuncs
Scanning dependencies of target test_readfile
[ 49%] Building C object tests/CMakeFiles/test_readfile.dir/test_readfile.c.o
[ 50%] Linking C executable test_readfile
[ 50%] Built target test_readfile
Scanning dependencies of target test_ptm_mgau
[ 50%] Building C object tests/CMakeFiles/test_ptm_mgau.dir/test_ptm_mgau.c.o
[ 51%] Linking C executable test_ptm_mgau
[ 51%] Built target test_ptm_mgau
Scanning dependencies of target test_pitch
[ 52%] Building C object tests/CMakeFiles/test_pitch.dir/test_pitch.c.o
[ 53%] Linking C executable test_pitch
[ 53%] Built target test_pitch
Scanning dependencies of target test_log_int16
[ 54%] Building C object tests/CMakeFiles/test_log_int16.dir/test_log_int16.c.o
[ 54%] Linking C executable test_log_int16
[ 54%] Built target test_log_int16
Scanning dependencies of target test_listelem_alloc
[ 55%] Building C object tests/CMakeFiles/test_listelem_alloc.dir/test_listelem_alloc.c.o
[ 56%] Linking C executable test_listelem_alloc
[ 56%] Built target test_listelem_alloc
Scanning dependencies of target test_hash_iter
[ 57%] Building C object tests/CMakeFiles/test_hash_iter.dir/test_hash_iter.c.o
[ 58%] Linking C executable test_hash_iter
[ 58%] Built target test_hash_iter
Scanning dependencies of target test_log_shifted
[ 59%] Building C object tests/CMakeFiles/test_log_shifted.dir/test_log_shifted.c.o
[ 60%] Linking C executable test_log_shifted
[ 60%] Built target test_log_shifted
Scanning dependencies of target test_filename
[ 61%] Building C object tests/CMakeFiles/test_filename.dir/test_filename.c.o
[ 61%] Linking C executable test_filename
[ 61%] Built target test_filename
Scanning dependencies of target test_bitvec
[ 61%] Building C object tests/CMakeFiles/test_bitvec.dir/test_bitvec.c.o
[ 62%] Linking C executable test_bitvec
[ 62%] Built target test_bitvec
Scanning dependencies of target test_fsg
[ 63%] Building C object tests/CMakeFiles/test_fsg.dir/test_fsg.c.o
[ 64%] Linking C executable test_fsg
[ 64%] Built target test_fsg
Scanning dependencies of target test_fe
[ 65%] Building C object tests/CMakeFiles/test_fe.dir/test_fe.c.o
[ 65%] Linking C executable test_fe
[ 65%] Built target test_fe
Scanning dependencies of target test_lineiter
[ 66%] Building C object tests/CMakeFiles/test_lineiter.dir/test_lineiter.c.o
[ 67%] Linking C executable test_lineiter
[ 67%] Built target test_lineiter
Scanning dependencies of target test_case
[ 68%] Building C object tests/CMakeFiles/test_case.dir/test_case.c.o
[ 69%] Linking C executable test_case
[ 69%] Built target test_case
Scanning dependencies of target test_display_hash
[ 70%] Building C object tests/CMakeFiles/test_display_hash.dir/test_display_hash.c.o
[ 71%] Linking C executable test_display_hash
[ 71%] Built target test_display_hash
Scanning dependencies of target test_dict
[ 71%] Building C object tests/CMakeFiles/test_dict.dir/test_dict.c.o
[ 72%] Linking C executable test_dict
[ 72%] Built target test_dict
Scanning dependencies of target test_build_directory
[ 73%] Building C object tests/CMakeFiles/test_build_directory.dir/test_build_directory.c.o
[ 74%] Linking C executable test_build_directory
[ 74%] Built target test_build_directory
Scanning dependencies of target test_cmdln_parse_r
[ 75%] Building C object tests/CMakeFiles/test_cmdln_parse_r.dir/test_cmdln_parse_r.c.o
[ 76%] Linking C executable test_cmdln_parse_r
[ 76%] Built target test_cmdln_parse_r
Scanning dependencies of target test_feat_fe
[ 77%] Building C object tests/CMakeFiles/test_feat_fe.dir/test_feat_fe.c.o
[ 78%] Linking C executable test_feat_fe
[ 78%] Built target test_feat_fe
Scanning dependencies of target test_ckd_alloc_catch
[ 79%] Building C object tests/CMakeFiles/test_ckd_alloc_catch.dir/test_ckd_alloc_catch.c.o
/Users/kal/dev/other/SoundSwallower/tests/test_ckd_alloc_catch.c:12:7: warning: variable 'alloc1' set but not used [-Wunused-but-set-variable]
int *alloc1;
^
1 warning generated.
[ 79%] Linking C executable test_ckd_alloc_catch
[ 79%] Built target test_ckd_alloc_catch
Scanning dependencies of target test_heap
[ 80%] Building C object tests/CMakeFiles/test_heap.dir/test_heap.c.o
[ 81%] Linking C executable test_heap
[ 81%] Built target test_heap
Scanning dependencies of target test_acmod_grow
[ 82%] Building C object tests/CMakeFiles/test_acmod_grow.dir/test_acmod_grow.c.o
[ 83%] Linking C executable test_acmod_grow
[ 83%] Built target test_acmod_grow
Scanning dependencies of target test_delete_hash
[ 84%] Building C object tests/CMakeFiles/test_delete_hash.dir/test_delete_hash.c.o
[ 85%] Linking C executable test_delete_hash
[ 85%] Built target test_delete_hash
Scanning dependencies of target test_bit_encode
[ 86%] Building C object tests/CMakeFiles/test_bit_encode.dir/test_bit_encode.c.o
[ 87%] Linking C executable test_bit_encode
[ 87%] Built target test_bit_encode
Scanning dependencies of target test_feat_live
[ 88%] Building C object tests/CMakeFiles/test_feat_live.dir/test_feat_live.c.o
[ 89%] Linking C executable test_feat_live
[ 89%] Built target test_feat_live
Scanning dependencies of target test_log_int8
[ 90%] Building C object tests/CMakeFiles/test_log_int8.dir/test_log_int8.c.o
[ 91%] Linking C executable test_log_int8
[ 91%] Built target test_log_int8
Scanning dependencies of target test_feat
[ 92%] Building C object tests/CMakeFiles/test_feat.dir/test_feat.c.o
[ 93%] Linking C executable test_feat
[ 93%] Built target test_feat
Scanning dependencies of target test_dict2pid
[ 94%] Building C object tests/CMakeFiles/test_dict2pid.dir/test_dict2pid.c.o
[ 95%] Linking C executable test_dict2pid
[ 95%] Built target test_dict2pid
Scanning dependencies of target test_ckd_alloc_fail
[ 96%] Building C object tests/CMakeFiles/test_ckd_alloc_fail.dir/test_ckd_alloc_fail.c.o
/Users/kal/dev/other/SoundSwallower/tests/test_ckd_alloc_fail.c:12:7: warning: variable 'alloc1' set but not used [-Wunused-but-set-variable]
int *alloc1;
^
1 warning generated.
[ 97%] Linking C executable test_ckd_alloc_fail
[ 97%] Built target test_ckd_alloc_fail
Scanning dependencies of target test_jsgf
[ 97%] Building C object tests/CMakeFiles/test_jsgf.dir/test_jsgf.c.o
[ 98%] Linking C executable test_jsgf
[ 98%] Built target test_jsgf
Scanning dependencies of target test_acmod
[ 99%] Building C object tests/CMakeFiles/test_acmod.dir/test_acmod.c.o
[100%] Linking C executable test_acmod
[100%] Built target test_acmod
Hobbes:build kal$ make test
Running tests...
Test project /Users/kal/dev/other/SoundSwallower/build
Start 1: lcase1
1/39 Test #1: lcase1 ........................... Passed 0.08 sec
Start 2: lcase2
2/39 Test #2: lcase2 ........................... Passed 0.00 sec
Start 3: lcase3
3/39 Test #3: lcase3 ........................... Passed 0.00 sec
Start 4: ucase1
4/39 Test #4: ucase1 ........................... Passed 0.00 sec
Start 5: ucase2
5/39 Test #5: ucase2 ........................... Passed 0.00 sec
Start 6: strcmp1
6/39 Test #6: strcmp1 .......................... Passed 0.00 sec
Start 7: strcmp2
7/39 Test #7: strcmp2 .......................... Passed 0.00 sec
Start 8: strcmp3
8/39 Test #8: strcmp3 .......................... Passed 0.00 sec
Start 9: nextword
9/39 Test #9: nextword ......................... Passed 0.05 sec
Start 10: str2words
10/39 Test #10: str2words ........................ Passed 0.00 sec
Start 11: string_join
11/39 Test #11: string_join ...................... Passed 0.00 sec
Start 12: string_trim
12/39 Test #12: string_trim ...................... Passed 0.00 sec
Start 13: fread_line
13/39 Test #13: fread_line ....................... Passed 0.00 sec
Start 14: bit_encode
14/39 Test #14: bit_encode ....................... Passed 0.10 sec
Start 15: bitvec
15/39 Test #15: bitvec ........................... Passed 0.34 sec
Start 16: ckd_alloc_catch
16/39 Test #16: ckd_alloc_catch .................. Passed 0.10 sec
Start 17: ckd_alloc_fail
17/39 Test #17: ckd_alloc_fail ................... Passed 0.05 sec
Start 18: build_directory
18/39 Test #18: build_directory .................. Passed 0.05 sec
Start 19: filename
19/39 Test #19: filename ......................... Passed 0.25 sec
Start 20: hash_iter
20/39 Test #20: hash_iter ........................ Passed 0.09 sec
Start 21: heap
21/39 Test #21: heap ............................. Passed 0.05 sec
Start 22: lineiter
22/39 Test #22: lineiter ......................... Passed 0.05 sec
Start 23: listelem_alloc
23/39 Test #23: listelem_alloc ................... Passed 0.05 sec
Start 24: log_int16
24/39 Test #24: log_int16 ........................ Passed 0.07 sec
Start 25: log_int8
25/39 Test #25: log_int8 ......................... Passed 0.05 sec
Start 26: log_shifted
26/39 Test #26: log_shifted ...................... Passed 0.05 sec
Start 27: readfile
27/39 Test #27: readfile ......................... Passed 0.05 sec
Start 28: acmod
28/39 Test #28: acmod ............................ Passed 1.89 sec
Start 29: acmod_grow
29/39 Test #29: acmod_grow ....................... Passed 0.90 sec
Start 30: dict2pid
30/39 Test #30: dict2pid ......................... Passed 0.22 sec
Start 31: dict
31/39 Test #31: dict ............................. Passed 0.20 sec
Start 32: fe
32/39 Test #32: fe ............................... Passed 0.05 sec
Start 33: feat_fe
33/39 Test #33: feat_fe .......................... Passed 0.06 sec
Start 34: feat_live
34/39 Test #34: feat_live ........................ Passed 0.05 sec
Start 35: ptm_mgau
35/39 Test #35: ptm_mgau ......................... Passed 0.57 sec
Start 36: subvq
36/39 Test #36: subvq ............................ Passed 0.05 sec
Start 37: jsgf
37/39 Test #37: jsgf ............................. Passed 1.01 sec
Start 38: fsg
38/39 Test #38: fsg .............................. Passed 0.33 sec
Start 39: pitch
39/39 Test #39: pitch ............................ Passed 0.07 sec
100% tests passed, 0 tests failed out of 39
Total Test time (real) = 6.92 sec
Hobbes:build kal$ make install
[ 44%] Built target soundswallower
[ 46%] Built target test_subvq
[ 48%] Built target test_strfuncs
[ 50%] Built target test_readfile
[ 51%] Built target test_ptm_mgau
[ 53%] Built target test_pitch
[ 54%] Built target test_log_int16
[ 56%] Built target test_listelem_alloc
[ 58%] Built target test_hash_iter
[ 60%] Built target test_log_shifted
[ 61%] Built target test_filename
[ 62%] Built target test_bitvec
[ 64%] Built target test_fsg
[ 65%] Built target test_fe
[ 67%] Built target test_lineiter
[ 69%] Built target test_case
[ 71%] Built target test_display_hash
[ 72%] Built target test_dict
[ 74%] Built target test_build_directory
[ 76%] Built target test_cmdln_parse_r
[ 78%] Built target test_feat_fe
[ 79%] Built target test_ckd_alloc_catch
[ 81%] Built target test_heap
[ 83%] Built target test_acmod_grow
[ 85%] Built target test_delete_hash
[ 87%] Built target test_bit_encode
[ 89%] Built target test_feat_live
[ 91%] Built target test_log_int8
[ 93%] Built target test_feat
[ 95%] Built target test_dict2pid
[ 97%] Built target test_ckd_alloc_fail
[ 98%] Built target test_jsgf
[100%] Built target test_acmod
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libsoundswallower.a
-- Installing: /usr/local/include/acmod.h
-- Installing: /usr/local/include/bin_mdef.h
-- Installing: /usr/local/include/bio.h
-- Installing: /usr/local/include/bitvec.h
-- Installing: /usr/local/include/blkarray_list.h
-- Installing: /usr/local/include/byteorder.h
-- Installing: /usr/local/include/case.h
-- Installing: /usr/local/include/ckd_alloc.h
-- Installing: /usr/local/include/cmd_ln.h
-- Installing: /usr/local/include/cmdln_macro.h
-- Installing: /usr/local/include/cmn.h
-- Installing: /usr/local/include/dict2pid.h
-- Installing: /usr/local/include/dict.h
-- Installing: /usr/local/include/err.h
-- Installing: /usr/local/include/feat.h
-- Installing: /usr/local/include/fe.h
-- Installing: /usr/local/include/fe_internal.h
-- Installing: /usr/local/include/fe_type.h
-- Installing: /usr/local/include/fe_warp_affine.h
-- Installing: /usr/local/include/fe_warp.h
-- Installing: /usr/local/include/fe_warp_inverse_linear.h
-- Installing: /usr/local/include/fe_warp_piecewise_linear.h
-- Installing: /usr/local/include/filename.h
-- Installing: /usr/local/include/fsg_history.h
-- Installing: /usr/local/include/fsg_lextree.h
-- Installing: /usr/local/include/fsg_model.h
-- Installing: /usr/local/include/fsg_search_internal.h
-- Installing: /usr/local/include/genrand.h
-- Installing: /usr/local/include/glist.h
-- Installing: /usr/local/include/hash_table.h
-- Installing: /usr/local/include/heap.h
-- Installing: /usr/local/include/hmm.h
-- Installing: /usr/local/include/jsgf.h
-- Installing: /usr/local/include/jsgf_internal.h
-- Installing: /usr/local/include/listelem_alloc.h
-- Installing: /usr/local/include/logmath.h
CMake Error at include/soundswallower/cmake_install.cmake:41 (file):
file INSTALL cannot find
"/Users/kal/dev/other/SoundSwallower/include/soundswallower/matrix.h": No
such file or directory.
Call Stack (most recent call first):
cmake_install.cmake:51 (include)
make: *** [install] Error 1
Hobbes:build kal$
Add whatever needs to be done to get this to compile directly with Emscripten
The alignment search currently doesn't really do the right thing, because it does a state-level alignment only (slow!) and because it doesn't accept silence/noise between words.
This API is fine but it needs to Do What I Mean, which is to do FSG-based "alignment" first then use the resulting coarse alignments to do phone and state level alignments.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.