nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 buildInputs = [ pkgconfig python27 swig2 ];
20
21 meta = {
22 description = "Voice recognition library written in C";
23 homepage = http://cmusphinx.sourceforge.net;
24 license = stdenv.lib.licenses.free;
25 platforms = stdenv.lib.platforms.linux;
26 };
27}
28
29/* Example usage:
30
31
321.
33
34$ cat << EOF > vocabulary.txt
35oh mighty computer /1e-40/
36hello world /1e-30/
37EOF
38
392.
40
41$ pocketsphinx_continuous -inmic yes -kws vocabulary.txt 2> /dev/null
42# after you say "hello world":
43hello world
44...
45
46*/