Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audio/py-vosk: New port: Vosk: Offline open source speech recognition…
… toolkit (Py + App)
- Loading branch information
Showing
6 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |