git: 059ad35947bb - main - audio/vosk-api: New port: Vosk: Offline open source speech recognition toolkit (API)

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 23 Dec 2023 04:32:45 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=059ad35947bb86dc1f4a7a842460929be458c520

commit 059ad35947bb86dc1f4a7a842460929be458c520
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-12-23 04:29:45 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-12-23 04:29:45 +0000

    audio/vosk-api: New port: Vosk: Offline open source speech recognition toolkit (API)
---
 audio/Makefile           |  1 +
 audio/vosk-api/Makefile  | 28 ++++++++++++++++++++++++++++
 audio/vosk-api/distinfo  |  3 +++
 audio/vosk-api/pkg-descr |  2 ++
 4 files changed, 34 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index 5c061fa88861..e37afa659ad6 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -849,6 +849,7 @@
     SUBDIR += volumeicon
     SUBDIR += vorbis-tools
     SUBDIR += vorbisgain
+    SUBDIR += vosk-api
     SUBDIR += vsound
     SUBDIR += vst3sdk
     SUBDIR += waon
diff --git a/audio/vosk-api/Makefile b/audio/vosk-api/Makefile
new file mode 100644
index 000000000000..33c36d2fab1c
--- /dev/null
+++ b/audio/vosk-api/Makefile
@@ -0,0 +1,28 @@
+PORTNAME=	vosk-api
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.3.45-20231214
+CATEGORIES=	audio # machine-learning
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Vosk: Offline open source speech recognition toolkit (API)
+WWW=		https://alphacephei.com/vosk/
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libfst.so:math/openfst-vosk \
+		libkaldi-base.so:audio/kaldi-vosk
+
+USES=		cmake compiler:c++17-lang localbase:ldflags
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	alphacep
+GH_TAGNAME=	aba8497
+
+CMAKE_ON=	BUILD_SHARED_LIBS
+
+PLIST_FILES=	include/vosk_api.h \
+		lib/libvosk.so
+
+.include <bsd.port.mk>
diff --git a/audio/vosk-api/distinfo b/audio/vosk-api/distinfo
new file mode 100644
index 000000000000..249f5640785e
--- /dev/null
+++ b/audio/vosk-api/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1702708668
+SHA256 (alphacep-vosk-api-v0.3.45-20231214-aba8497_GH0.tar.gz) = 347bb5f0ec72c8f07dcd80ca4ebec76946845116f085328e016fd46ad3adce82
+SIZE (alphacep-vosk-api-v0.3.45-20231214-aba8497_GH0.tar.gz) = 660047
diff --git a/audio/vosk-api/pkg-descr b/audio/vosk-api/pkg-descr
new file mode 100644
index 000000000000..c914159a4681
--- /dev/null
+++ b/audio/vosk-api/pkg-descr
@@ -0,0 +1,2 @@
+Kaldi is a toolkit for speech recognition, intended for use by speech
+recognition researchers and professionals.