Date: Sat, 23 Dec 2023 04:32:46 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: e91fa19c8681 - main - audio/py-vosk: New port: Vosk: Offline open source speech recognition toolkit (Py + App) Message-ID: <202312230432.3BN4Wkhs087352@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=e91fa19c86810f4dd8c282c1fccf4005ae709810 commit e91fa19c86810f4dd8c282c1fccf4005ae709810 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-12-23 04:32:07 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-12-23 04:32:07 +0000 audio/py-vosk: New port: Vosk: Offline open source speech recognition toolkit (Py + App) --- audio/Makefile | 1 + audio/py-vosk/Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ audio/py-vosk/distinfo | 3 +++ audio/py-vosk/pkg-descr | 5 +++++ audio/py-vosk/pkg-message | 11 +++++++++++ audio/py-vosk/pkg-plist | 23 +++++++++++++++++++++++ 6 files changed, 86 insertions(+) diff --git a/audio/Makefile b/audio/Makefile index e37afa659ad6..8ed60cdd1d35 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -671,6 +671,7 @@ SUBDIR += py-spotipy SUBDIR += py-tagpy SUBDIR += py-torchaudio + SUBDIR += py-vosk SUBDIR += py-wavio SUBDIR += py-webrtcvad SUBDIR += py-zita-audiotools diff --git a/audio/py-vosk/Makefile b/audio/py-vosk/Makefile new file mode 100644 index 000000000000..e9050e2fceea --- /dev/null +++ b/audio/py-vosk/Makefile @@ -0,0 +1,43 @@ +PORTNAME= vosk +DISTVERSIONPREFIX= v +DISTVERSION= 0.3.45-20231214 +CATEGORIES= audio # machine-learning +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Vosk: Offline open source speech recognition toolkit (Py + App) +WWW= https://alphacephei.com/vosk/ + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/../COPYING + +PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0:devel/py-cffi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}srt>0:multimedia/py-srt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}websockets>0:devel/py-websockets@${PY_FLAVOR} +BUILD_DEPENDS= ${PY_DEPENDS} +RUN_DEPENDS= ${PY_DEPENDS} \ + vosk-api>0:audio/vosk-api + +USES= python +USE_PYTHON= distutils concurrent # autoplist is broken + +USE_GITHUB= yes +GH_ACCOUNT= alphacep +GH_PROJECT= vosk-api +GH_TAGNAME= aba8497 + +WRKSRC_SUBDIR= python + +NO_ARCH= yes + +post-patch: + @${REINPLACE_CMD} \ + -e ' \ + s|elif sys.platform == "linux":|elif sys.platform == "linux" or sys.platform.startswith("freebsd"):|; \ + s|dlldir = .*|dlldir = "${LOCALBASE}/lib"| \ + ' \ + ${WRKSRC}/vosk/__init__.py + +.include <bsd.port.mk> diff --git a/audio/py-vosk/distinfo b/audio/py-vosk/distinfo new file mode 100644 index 000000000000..249f5640785e --- /dev/null +++ b/audio/py-vosk/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/py-vosk/pkg-descr b/audio/py-vosk/pkg-descr new file mode 100644 index 000000000000..1b0d41d856d5 --- /dev/null +++ b/audio/py-vosk/pkg-descr @@ -0,0 +1,5 @@ +Vosk is an offline open source speech recognition toolkit. It enables speech +recognition for 20+ languages and dialects - English, Indian English, German, +French, Spanish, Portuguese, Chinese, Russian, Turkish, Vietnamese, Italian, +Dutch, Catalan, Arabic, Greek, Farsi, Filipino, Ukrainian, Kazakh, Swedish, +Japanese, Esperanto, Hindi, Czech, Polish. More to come. diff --git a/audio/py-vosk/pkg-message b/audio/py-vosk/pkg-message new file mode 100644 index 000000000000..f45df23db8a2 --- /dev/null +++ b/audio/py-vosk/pkg-message @@ -0,0 +1,11 @@ +[ +{ type: install + message: <<EOM +You installed vosk, an open source speech recognition toolkit. + +In order to transcribe the audio file with speech please run this command: +$ vosk-transcriber -i speech-audio.mp4 -o text-transcription.txt + +EOM +} +] diff --git a/audio/py-vosk/pkg-plist b/audio/py-vosk/pkg-plist new file mode 100644 index 000000000000..aed36c99e31b --- /dev/null +++ b/audio/py-vosk/pkg-plist @@ -0,0 +1,23 @@ +bin/vosk-transcriber +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/PKG-INFO +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/SOURCES.txt +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/dependency_links.txt +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/entry_points.txt +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/not-zip-safe +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/requires.txt +%%PYTHON_SITELIBDIR%%/vosk-0.3.46-py%%PYTHON_VER%%.egg-info/top_level.txt +%%PYTHON_SITELIBDIR%%/vosk/__init__.py +%%PYTHON_SITELIBDIR%%/vosk/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/vosk/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/vosk/__pycache__/vosk_cffi%%PYTHON_EXT_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/vosk/__pycache__/vosk_cffi%%PYTHON_EXT_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__init__.py +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__pycache__/cli%%PYTHON_EXT_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__pycache__/cli%%PYTHON_EXT_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__pycache__/transcriber%%PYTHON_EXT_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/__pycache__/transcriber%%PYTHON_EXT_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/vosk/transcriber/cli.py +%%PYTHON_SITELIBDIR%%/vosk/transcriber/transcriber.py +%%PYTHON_SITELIBDIR%%/vosk/vosk_cffi.py
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312230432.3BN4Wkhs087352>