├── .gitmodules ├── README.md ├── cmusphinx-en-us-5.2 ├── README ├── feat.params ├── feature_transform ├── mdef ├── means ├── mixture_weights ├── noisedict ├── transition_matrices └── variances ├── en-us-phone.lm.dmp ├── helloworld.wav ├── pocketsphinx_batch ├── pocketsphinx_continuous ├── pocketsphinx_mdef_convert ├── ps_shortcut.sh └── setup.sh /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pocketsphinx"] 2 | path = pocketsphinx 3 | url = https://github.com/cmusphinx/pocketsphinx 4 | [submodule "sphinxbase"] 5 | path = sphinxbase 6 | url = https://github.com/cmusphinx/sphinxbase 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Make sure to have run ```sudo apt-get install bison libtool autoconf swig``` 2 | 3 | Now run ```bash setup.sh``` 4 | 5 | This should download and build all the things necessary to use pocketsphinx 6 | 7 | To test pocketsphinx for phoneme extraction, try the following command 8 | 9 | ```bash ps_shortcut.sh helloworld.wav``` 10 | 11 | Note, this file *must* be 16kHz. You can perform this conversion using sox, like 12 | 13 | ```sox in.wav -b 16 out.wav rate 16k``` 14 | 15 | More details can be seen at http://cmusphinx.sourceforge.net/wiki/phonemerecognition 16 | 17 | Example output from ```bash ps_shortcut.sh helloworld.wav``` 18 | 19 | SNIP 20 | 21 | ``` 22 | INFO: allphone_search.c(913): Hyp: SIL HH EH L OW W ER L D ER SIL HH 23 | SIL HH EH L OW W ER L D ER SIL HH 24 | SIL 0.040 0.070 1.000000 25 | HH 0.080 0.150 1.000000 26 | EH 0.160 0.230 1.000000 27 | L 0.240 0.330 1.000000 28 | OW 0.340 0.490 1.000000 29 | W 0.500 0.560 1.000000 30 | ER 0.570 0.720 1.000000 31 | L 0.730 0.820 1.000000 32 | D 0.830 0.900 1.000000 33 | ER 0.910 1.010 1.000000 34 | SIL 1.020 1.090 1.000000 35 | HH 1.100 1.400 1.000000 36 | ``` 37 | -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/README: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 2015 Alpha Cephei Inc. All rights 3 | * reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY ALPHA CEPHEI INC. ``AS IS'' AND. 18 | * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,. 19 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALPHA CEPHEI INC. 21 | * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT. 23 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,. 24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY. 25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT. 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE. 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ==================================================================== 30 | * 31 | */ 32 | 33 | This directory contains generic US english acoustic model trained with 34 | latest sphinxtrain. 35 | -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/feat.params: -------------------------------------------------------------------------------- 1 | -lowerf 130 2 | -upperf 6800 3 | -nfilt 25 4 | -transform dct 5 | -lifter 22 6 | -feat 1s_c_d_dd 7 | -agc none 8 | -cmn current 9 | -varnorm no 10 | -cmninit 40,3,-1 11 | -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/feature_transform: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/cmusphinx-en-us-5.2/feature_transform -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/means: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/cmusphinx-en-us-5.2/means -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/mixture_weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/cmusphinx-en-us-5.2/mixture_weights -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/noisedict: -------------------------------------------------------------------------------- 1 | SIL 2 | SIL 3 | SIL 4 | [BREATH] +BREATH+ 5 | [COUGH] +COUGH+ 6 | [NOISE] +NOISE+ 7 | [SMACK] +SMACK+ 8 | [UH] +UH+ 9 | [UM] +UM+ 10 | -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/transition_matrices: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/cmusphinx-en-us-5.2/transition_matrices -------------------------------------------------------------------------------- /cmusphinx-en-us-5.2/variances: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/cmusphinx-en-us-5.2/variances -------------------------------------------------------------------------------- /en-us-phone.lm.dmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/en-us-phone.lm.dmp -------------------------------------------------------------------------------- /helloworld.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kastnerkyle/ez-phones/1f7ad963a065a87b54301cf1304292dea4bd1cc3/helloworld.wav -------------------------------------------------------------------------------- /pocketsphinx_batch: -------------------------------------------------------------------------------- 1 | pocketsphinx/src/programs/pocketsphinx_batch -------------------------------------------------------------------------------- /pocketsphinx_continuous: -------------------------------------------------------------------------------- 1 | pocketsphinx/src/programs/pocketsphinx_continuous -------------------------------------------------------------------------------- /pocketsphinx_mdef_convert: -------------------------------------------------------------------------------- 1 | pocketsphinx/src/programs/pocketsphinx_mdef_convert -------------------------------------------------------------------------------- /ps_shortcut.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./pocketsphinx_continuous -infile $1 -hmm cmusphinx-en-us-5.2 -allphone en-us-phone.lm.dmp -time yes -backtrace yes -beam 1e-20 -pbeam 1e-20 -lw 2.0 3 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #sudo apt-get install bison libtool autoconf 3 | #git submodule add git@github.com:cmusphinx/pocketsphinx pocketsphinx 4 | #git submodule add git@github.com:cmusphinx/sphinxbase sphinxbase 5 | #http://cmusphinx.sourceforge.net/wiki/phonemerecognition 6 | #sox in.wav -b 16 out.wav rate 16k 7 | git submodule update --init --recursive 8 | 9 | pushd . 10 | cd sphinxbase 11 | # some versions do things with autogen, others configure... 12 | ./autogen.sh --without-swig-python 13 | ./configure --without-swig-python 14 | make 15 | popd 16 | 17 | pushd . 18 | cd pocketsphinx 19 | ./autogen.sh --without-swig-python 20 | ./configure --without-swig-python 21 | make 22 | popd 23 | --------------------------------------------------------------------------------