Unverified Commit 1db42ad9 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

piper-tts: 1.3.0 -> 1.4.1; wyoming-piper: 2.2.1 -> 2.2.2;...

piper-tts: 1.3.0 -> 1.4.1; wyoming-piper: 2.2.1 -> 2.2.2; python3Packages.pysilero-vad: 3.2.0 -> 3.3.0 (#488912)
parents 42f9365f 9e7d1ba2
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2db7493..675c64b 100644
index 04dd613..7374d25 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,93 +4,133 @@
@@ -4,94 +4,134 @@
 cmake_minimum_required(VERSION 3.26)
 project(piper LANGUAGES C CXX)
 
@@ -16,9 +16,7 @@ index 2db7493..675c64b 100644
-# Install location for espeak-ng
-set(ESPEAKNG_BUILD_DIR ${CMAKE_BINARY_DIR}/espeak_ng)
-set(ESPEAKNG_INSTALL_DIR ${CMAKE_BINARY_DIR}/espeak_ng-install)
+# Try to find espeak-ng using pkg-config, if available
+find_package(PkgConfig QUIET)
 
-
-if(WIN32)
-    # Special handling for Windows
-    set(ESPEAKNG_STATIC_LIB ${ESPEAKNG_INSTALL_DIR}/lib/espeak-ng.lib)
@@ -26,10 +24,8 @@ index 2db7493..675c64b 100644
-else()
-    set(ESPEAKNG_STATIC_LIB ${ESPEAKNG_INSTALL_DIR}/lib/libespeak-ng.a)
-    set(UCD_STATIC_LIB ${ESPEAKNG_BUILD_DIR}/src/espeak_ng_external-build/src/ucd-tools/libucd.a)
+if (PKG_CONFIG_FOUND)
+    pkg_check_modules(ESPEAKNG QUIET espeak-ng)
 endif()
 
-endif()
-
-ExternalProject_Add(espeak_ng_external
-    GIT_REPOSITORY https://github.com/espeak-ng/espeak-ng.git
-    GIT_TAG 212928b394a96e8fd2096616bfd54e17845c48f6  # 2025-Mar-22
@@ -48,6 +44,7 @@ index 2db7493..675c64b 100644
-        -DEXTRA_ru:BOOL=ON
-        # Need to explicitly add ucd include directory for CI
-        "-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64 -I${ESPEAKNG_BUILD_DIR}/src/espeak_ng_external/src/ucd-tools/src/include"
-        "-DCMAKE_CXX_FLAGS=-D_FILE_OFFSET_BITS=64 -I${ESPEAKNG_BUILD_DIR}/src/espeak_ng_external/src/ucd-tools/src/include"
-    BUILD_BYPRODUCTS
-        ${ESPEAKNG_STATIC_LIB}
-        ${UCD_STATIC_LIB}
@@ -78,8 +75,14 @@ index 2db7493..675c64b 100644
-if(WIN32)
-    # Fix dll thunk issue (__imp_SYMBOL not found)
-    target_compile_definitions(espeakbridge PRIVATE LIBESPEAK_NG_EXPORT)
 
-    # Fix .dll suffix
+# Try to find espeak-ng using pkg-config, if available
+find_package(PkgConfig QUIET)
+
+if (PKG_CONFIG_FOUND)
+    pkg_check_modules(ESPEAKNG QUIET espeak-ng)
+endif()
+
+
+if (ESPEAKNG_FOUND)
+    message(STATUS "Found system espeak-ng via pkg-config")
+
@@ -93,7 +96,8 @@ index 2db7493..675c64b 100644
+        ${ESPEAKNG_LIBRARIES}
+        ${UCD_STATIC_LIB}
+    )
+
 
-    # Fix .dll suffix
     set_target_properties(espeakbridge PROPERTIES
         PREFIX ""
-        SUFFIX ".pyd"
@@ -107,6 +111,7 @@ index 2db7493..675c64b 100644
 else()
-    set_target_properties(espeakbridge PROPERTIES
-        PREFIX ""
+
+    # Install location for espeak-ng
+    set(ESPEAKNG_BUILD_DIR ${CMAKE_BINARY_DIR}/espeak_ng)
+    set(ESPEAKNG_INSTALL_DIR ${CMAKE_BINARY_DIR}/espeak_ng-install)
@@ -138,6 +143,7 @@ index 2db7493..675c64b 100644
+            -DEXTRA_ru:BOOL=ON
+            # Need to explicitly add ucd include directory for CI
+            "-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64 -I${ESPEAKNG_BUILD_DIR}/src/espeak_ng_external/src/ucd-tools/src/include"
+            "-DCMAKE_CXX_FLAGS=-D_FILE_OFFSET_BITS=64 -I${ESPEAKNG_BUILD_DIR}/src/espeak_ng_external/src/ucd-tools/src/include"
+        BUILD_BYPRODUCTS
+            ${ESPEAKNG_STATIC_LIB}
+            ${UCD_STATIC_LIB}
@@ -154,10 +160,9 @@ index 2db7493..675c64b 100644
+    )
+
+    add_dependencies(espeakbridge espeak_ng_external)
+    target_link_libraries(espeakbridge
+    target_link_libraries(espeakbridge PRIVATE
+        ${ESPEAKNG_STATIC_LIB}
+        ${UCD_STATIC_LIB}
+        Python::SABIModule
+    )
+    target_include_directories(espeakbridge PRIVATE
+        ${ESPEAKNG_INSTALL_DIR}/include
+2 −2
Original line number Diff line number Diff line
@@ -29,14 +29,14 @@ in

python3Packages.buildPythonApplication rec {
  pname = "piper-tts";
  version = "1.3.0";
  version = "1.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "OHF-Voice";
    repo = "piper1-gpl";
    tag = "v${version}";
    hash = "sha256-WDMIXsbUzJ5XnA/KUVUPQKZzkqrXagzAOrhFtLR4fGk=";
    hash = "sha256-V/ESZMUT1PXxHNN7H2ckTBVOQRRf4c/L2GNtnkXvNpA=";
  };

  patches = [
+2 −2
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@

python3Packages.buildPythonApplication (finalAttrs: {
  pname = "wyoming-piper";
  version = "2.1.2";
  version = "2.2.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rhasspy";
    repo = "wyoming-piper";
    tag = "v${finalAttrs.version}";
    hash = "sha256-j6QvGChAkASKdD+4XqIwC6UWdhi5oMDfYmSk6kvRrNE=";
    hash = "sha256-pk6HAzl0A8R5szI7d6ZFOQI5akkzWb0Nb/WuxKdIwg8=";
  };

  build-system = with python3Packages; [
+12 −4
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@
  stdenv,

  # build-system
  setuptools,
  cmake,
  ninja,
  scikit-build-core,

  # tests
  pytestCheckHook,
@@ -13,17 +15,23 @@

buildPythonPackage (finalAttrs: {
  pname = "pysilero-vad";
  version = "3.2.0";
  version = "3.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rhasspy";
    repo = "pysilero-vad";
    tag = "v${finalAttrs.version}";
    hash = "sha256-cqjuU5JtsL+Fp3m3uzz8flrJEyn+JDUMWsXU0Ioh87U=";
    hash = "sha256-S0PDtooVmy09i2fE40ZhaPIKfOTqXQS/rs7dwtm0+pQ=";
  };

  build-system = [ setuptools ];
  build-system = [
    cmake
    ninja
    scikit-build-core
  ];

  dontUseCmakeConfigure = true;

  nativeCheckInputs = [ pytestCheckHook ];