at 18.03-beta 47 lines 858 B view raw
1{ stdenv 2, fetchurl 3, sphinxbase 4, pkgconfig 5, python27 # >= 2.6 6, swig2 # 2.0 7}: 8 9stdenv.mkDerivation rec { 10 name = "pocketsphinx-5prealpha"; 11 12 src = fetchurl { 13 url = "mirror://sourceforge/cmusphinx/${name}.tar.gz"; 14 sha256 = "1n9yazzdgvpqgnfzsbl96ch9cirayh74jmpjf7svs4i7grabanzg"; 15 }; 16 17 propagatedBuildInputs = [ sphinxbase ]; 18 19 nativeBuildInputs = [ pkgconfig ]; 20 buildInputs = [ python27 swig2 ]; 21 22 meta = { 23 description = "Voice recognition library written in C"; 24 homepage = http://cmusphinx.sourceforge.net; 25 license = stdenv.lib.licenses.free; 26 platforms = stdenv.lib.platforms.linux; 27 }; 28} 29 30/* Example usage: 31 32 331. 34 35$ cat << EOF > vocabulary.txt 36oh mighty computer /1e-40/ 37hello world /1e-30/ 38EOF 39 402. 41 42$ pocketsphinx_continuous -inmic yes -kws vocabulary.txt 2> /dev/null 43# after you say "hello world": 44hello world 45... 46 47*/