From 946b05b6437c89b5725f5debc2d0a7571af81e01 Mon Sep 17 00:00:00 2001 From: gyroing Date: Mon, 8 Sep 2025 20:08:58 +0330 Subject: [PATCH] Add PiperTTS recipe (#12905) --- .../pipertts/pipertts-1.0.recipe | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 app-accessibility/pipertts/pipertts-1.0.recipe diff --git a/app-accessibility/pipertts/pipertts-1.0.recipe b/app-accessibility/pipertts/pipertts-1.0.recipe new file mode 100644 index 000000000..b136a0c62 --- /dev/null +++ b/app-accessibility/pipertts/pipertts-1.0.recipe @@ -0,0 +1,66 @@ +SUMMARY="An offline text-to-speech program using the NCNN library" +DESCRIPTION="Piper TTS is an offline text-to-speech program using the NCNN library \ +to provide natural, Human-like voices. Different voice models can be downloaded from \ +https://huggingface.co/gyroing/PiperTTS-NCNN-Models/tree/main." +HOMEPAGE="https://github.com/gyroing/PiperTTS-HaikuOS/" +COPYRIGHT="2025 GYROING" +LICENSE="BSD (3-clause)" +REVISION="1" +srcGitRev="abd4330345769f2ceda1592612931aa64a711e5c" +SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="cffafc6d1ea3a013f3117554b29a7913c7c1894407387bfa497f6606bdc5d264" +SOURCE_DIR="PiperTTS-HaikuOS-$srcGitRev" +srcGitRev_2="d7df277f9cc15a00b19877ab75b287ade42a22ab" +SOURCE_URI_2="https://github.com/Tencent/ncnn/archive/$srcGitRev_2.tar.gz" +CHECKSUM_SHA256_2="989bb0f7b8a00c24b3b297cdc7f23c6932a5676731c7dda24ea29dfc8eae4668" +SOURCE_DIR_2="ncnn-$srcGitRev_2" + +ARCHITECTURES="x86_64" + +PROVIDES=" + pipertts = $portVersion + cmd:pipertts = $portVersion + " +REQUIRES=" + haiku + cmd:espeak + lib:libgomp + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc + cmd:make + " + +BUILD() +{ + NCNN_INSTALL_DIR="$buildDir/ncnn-install" + cd $sourceDir2 + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Release \ + -DNCNN_VULKAN=OFF \ + -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_BENCHMARK=OFF \ + -DNCNN_PYTHON=OFF \ + -DNCNN_BUILD_TESTS=OFF \ + -DNCNN_BUILD_TOOLS=OFF \ + -DCMAKE_INSTALL_PREFIX=$NCNN_INSTALL_DIR .. + make $jobArgs + make install + + cd $sourceDir + g++ pipertts.cpp piper_ncnn_impl.cpp \ + -o pipertts -lbe -lmedia -fopenmp \ + -lncnn -I$NCNN_INSTALL_DIR/include/ncnn \ + -L$NCNN_INSTALL_DIR/lib +} + +INSTALL() +{ + mkdir -p $binDir + cp pipertts $binDir/ +}