Unverified Commit faa7d81b authored by Martin Weinelt's avatar Martin Weinelt
Browse files

python310Packages.piper-phonemize: init

Python bindings for phonemization library used by the Piper text to
speech system.
parent 14329c27
Loading
Loading
Loading
Loading
+3 −16
Original line number Diff line number Diff line
@@ -37,11 +37,6 @@ stdenv.mkDerivation rec {
    hash = "sha256-cMer7CSLOXv3jc9huVA3Oy5cjXjOX9XuEXpIWau1BNQ=";
  };

  outputs = [
    "out"
    "dev"
  ];

  nativeBuildInputs = [
    cmake
    pkg-config
@@ -52,17 +47,9 @@ stdenv.mkDerivation rec {
    onnxruntime
  ];

  ainstallPhase = ''
    runHook preInstall
    
    install -d $out/lib
    install ./libpiper_phonemize.so $out/lib

    install -d $dev/include/piper_phonemize
    install -D ../src/*.hpp $dev/include
    
    runHook postInstall
  '';
  passthru = {
    espeak-ng = espeak-ng';
  };

  meta = with lib; {
    description = "C++ library for converting text to phonemes for Piper";
+34 −0
Original line number Diff line number Diff line
{ buildPythonPackage
, onnxruntime-native
, piper-phonemize-native
, pybind11
, setuptools
}:

buildPythonPackage {
  inherit (piper-phonemize-native) pname version src;
  format = "pyproject";

  nativeBuildInputs = [
    pybind11
    setuptools
  ];

  buildInputs = [
    onnxruntime-native
    piper-phonemize-native
    piper-phonemize-native.espeak-ng
  ];

  pythonImportsCheck = [
    "piper_phonemize"
  ];

  # no tests
  doCheck = false;

  meta = {
    description = "Phonemization libary used by Piper text to speech system";
    inherit (piper-phonemize-native.meta) homepage license maintainers;
  };
}
+5 −0
Original line number Diff line number Diff line
@@ -7965,6 +7965,11 @@ self: super: with self; {

  pipenv-poetry-migrate = callPackage ../development/python-modules/pipenv-poetry-migrate { };

  piper-phonemize = callPackage ../development/python-modules/piper-phonemize {
    onnxruntime-native = pkgs.onnxruntime;
    piper-phonemize-native = pkgs.piper-phonemize;
  };

  piper-train = callPackage ../development/python-modules/piper-train { };

  pip-api = callPackage ../development/python-modules/pip-api { };