Skip to content

Commit 1884467

Browse files
committed
audio/kaldi-vosk: New port: Kaldi speech recognition toolkit
This is a fork of audio/kaldi to support audio/vosk-api.
1 parent 4df77d7 commit 1884467

File tree

6 files changed

+903
-0
lines changed

6 files changed

+903
-0
lines changed

‎audio/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@
318318
SUBDIR += juke
319319
SUBDIR += julius
320320
SUBDIR += kaldi
321+
SUBDIR += kaldi-vosk
321322
SUBDIR += kapitonov-plugins-pack-lv2
322323
SUBDIR += kid3
323324
SUBDIR += klystrack

‎audio/kaldi-vosk/Makefile‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
PORTNAME= kaldi # kaldi-vosk is for audio/vosk-api
2+
PORTVERSION= g20231219
3+
CATEGORIES= audio # machine-learning
4+
PKGNAMESUFFIX= -vosk
5+
6+
MAINTAINER= yuri@FreeBSD.org
7+
COMMENT= Kaldi speech recognition toolkit
8+
WWW= https://kaldi-asr.org/
9+
10+
LICENSE= APACHE20
11+
12+
LIB_DEPENDS= libcblas.so:math/cblas \
13+
libfst.so:math/openfst-vosk \
14+
liblapack.so:math/lapack
15+
16+
USES= cmake compiler:c++17-lang localbase:ldflags python:build
17+
18+
USE_GITHUB= yes
19+
GH_ACCOUNT= alphacep
20+
GH_TAGNAME= 2b69aed # the vosk branch
21+
22+
LDFLAGS+= -lcblas -llapack
23+
24+
CMAKE_ON= BUILD_SHARED_LIBS
25+
CMAKE_OFF= KALDI_BUILD_TEST
26+
CMAKE_ARGS= -DPython_EXECUTABLE=${PYTHON_CMD} \
27+
-DKALDI_VERSION=${PORTVERSION}
28+
29+
post-extract:
30+
@${FIND} ${WRKSRC} -name "*.orig" -delete
31+
32+
.include <bsd.port.mk>

‎audio/kaldi-vosk/distinfo‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
TIMESTAMP = 1703217904
2+
SHA256 (alphacep-kaldi-g20231219-2b69aed_GH0.tar.gz) = 6f73be6576e1bd5f995f594c4f70a2691129f3f349b4bb41d87a2cecd4373dd7
3+
SIZE (alphacep-kaldi-g20231219-2b69aed_GH0.tar.gz) = 12223539
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
- correct the path of the test executables
2+
3+
--- cmake/Utils.cmake.orig 2023-12-16 02:01:44 UTC
4+
+++ cmake/Utils.cmake
5+
@@ -41,7 +41,7 @@ macro(add_kaldi_test_executable)
6+
COMMAND ${kaldi_test_exe_NAME}
7+
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
8+
# list(APPEND KALDI_TEST_EXECUTABLES ${kaldi_test_exe_NAME})
9+
- install(TARGETS ${kaldi_test_exe_NAME} RUNTIME DESTINATION testbin)
10+
+ install(TARGETS ${kaldi_test_exe_NAME} RUNTIME DESTINATION share/kaldi/testbin)
11+
12+
unset(kaldi_test_exe_NAME)
13+
unset(kaldi_test_exe_SOURCES)

‎audio/kaldi-vosk/pkg-descr‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Kaldi is a toolkit for speech recognition, intended for use by speech
2+
recognition researchers and professionals.

0 commit comments

Comments
 (0)