about summary refs log tree commit diff
path: root/pkgs/applications/audio/ekho/default.nix
blob: c0cde8aaf9a1ee0d46d3e72173b8bf26b0f0e95e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, autoconf
, automake
, libtool
, libsndfile
, libpulseaudio
, espeak-ng
, sonic
, utf8cpp
, AudioUnit
}:

stdenv.mkDerivation rec {
  pname = "ekho";
  version = "9.0";

  src = fetchFromGitHub {
    owner = "hgneng";
    repo = "ekho";
    rev = "v${version}";
    hash = "sha256-VYN9tR3BJXd3UA0V5vqQJNItJe1e1knZ+S7tLeaeYYk=";
  };

  preConfigure = ''
    ./autogen.sh
  '';

  CXXFLAGS = [
    "-O0"
    "-I${lib.getDev utf8cpp}/include/utf8cpp"
  ];

  nativeBuildInputs = [ pkg-config autoconf automake libtool ];

  buildInputs = [ libsndfile libpulseaudio espeak-ng sonic utf8cpp ]
    ++ lib.optionals stdenv.isDarwin [ AudioUnit ];

  meta = with lib; {
    description = "Chinese text-to-speech software";
    homepage = "http://www.eguidedog.net/ekho.php";
    longDescription = ''
      Ekho (余音) is a free, open source and multilingual text-to-speech (TTS)
      software. It supports Cantonese (Chinese dialect spoken in Hong Kong and
      part of Guangdong province), Mandarin (standard Chinese), Zhaoan Hakka
      (a dialect in Taiwan), Tibetan, Ngangien (an ancient Chinese before
      Yuan Dynasty) and Korean (in trial).
    '';
    license = licenses.gpl2Plus;
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [ aaronjheng ];
  };
}