1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

[WIP] Preinstall vosk so we can remove unneeded firstboot service

This commit is contained in:
j1nx
2021-01-28 14:11:04 +01:00
parent 607f7f7418
commit 16f6b8e187
15 changed files with 174 additions and 61 deletions

View File

@ -0,0 +1,43 @@
Metadata-Version: 2.1
Name: vosk
Version: 0.3.17
Summary: Offline open source speech recognition API based on Kaldi and Vosk
Home-page: https://github.com/alphacep/vosk-api
Author: Alpha Cephei Inc
Author-email: contact@alphacephei.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.5
Description-Content-Type: text/markdown
This is a Python module for Vosk.
Vosk is an offline open source speech recognition toolkit. It enables
speech recognition models for 17 languages and dialects - English, Indian
English, German, French, Spanish, Portuguese, Chinese, Russian, Turkish,
Vietnamese, Italian, Dutch, Catalan, Arabic, Greek, Farsi, Filipino.
Vosk models are small (50 Mb) but provide continuous large vocabulary
transcription, zero-latency response with streaming API, reconfigurable
vocabulary and speaker identification.
Vosk supplies speech recognition for chatbots, smart home appliances,
virtual assistants. It can also create subtitles for movies,
transcription for lectures and interviews.
Vosk scales from small devices like Raspberry Pi or Android smartphone to
big clusters.
# Documentation
For installation instructions, examples and documentation visit [Vosk
Website](https://alphacephei.com/vosk). See also our project on
[Github](https://github.com/alphacep/vosk-api).

View File

@ -0,0 +1,7 @@
vosk/__init__.py,sha256=ysaEVitPgA4GWu4UhQrXmltn3Jlb3ql34Zh12z0fCmM,65
vosk/_vosk.cpython-38-aarch64-linux-gnu.so,sha256=_jDXCqURdFpzF-tzA9Mt96CC3j3jugPqUfnrj3haicw,7684160
vosk/vosk.py,sha256=DsGcUqzBC7d9sSXoa2fYXfgnKO-pa-0__3U6z-UeAQk,3718
vosk-0.3.17.dist-info/METADATA,sha256=XT_g2qzqVP_LF1ohlaDHplTaWAWI62cybVfdPEUi2jc,1637
vosk-0.3.17.dist-info/WHEEL,sha256=Jx4-5BnxSuM-PzrRtSkXf3tgQrnNJxq0xf03F56B1aM,104
vosk-0.3.17.dist-info/top_level.txt,sha256=VyhCKFInHWKAvlbaAYoqHJ2Y35GrQNYA-Ul2CRc30Uk,5
vosk-0.3.17.dist-info/RECORD,,

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.36.2)
Root-Is-Purelib: false
Tag: cp38-cp38-linux_aarch64

View File

@ -0,0 +1,2 @@
from .vosk import KaldiRecognizer, Model, SpkModel, SetLogLevel

View File

@ -0,0 +1,116 @@
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.1
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise RuntimeError("Python 2.7 or later required")
# Import the low-level C/C++ module
if __package__ or "." in __name__:
from . import _vosk
else:
import _vosk
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
def _swig_setattr_nondynamic_instance_variable(set):
def set_instance_attr(self, name, value):
if name == "thisown":
self.this.own(value)
elif name == "this":
set(self, name, value)
elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
set(self, name, value)
else:
raise AttributeError("You cannot add instance attributes to %s" % self)
return set_instance_attr
def _swig_setattr_nondynamic_class_variable(set):
def set_class_attr(cls, name, value):
if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
set(cls, name, value)
else:
raise AttributeError("You cannot add class attributes to %s" % cls)
return set_class_attr
def _swig_add_metaclass(metaclass):
"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
def wrapper(cls):
return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
return wrapper
class _SwigNonDynamicMeta(type):
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
__setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
class Model(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, model_path):
_vosk.Model_swiginit(self, _vosk.new_Model(model_path))
__swig_destroy__ = _vosk.delete_Model
def vosk_model_find_word(self, word):
return _vosk.Model_vosk_model_find_word(self, word)
# Register Model in _vosk:
_vosk.Model_swigregister(Model)
class SpkModel(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, model_path):
_vosk.SpkModel_swiginit(self, _vosk.new_SpkModel(model_path))
__swig_destroy__ = _vosk.delete_SpkModel
# Register SpkModel in _vosk:
_vosk.SpkModel_swigregister(SpkModel)
class KaldiRecognizer(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
_vosk.KaldiRecognizer_swiginit(self, _vosk.new_KaldiRecognizer(*args))
__swig_destroy__ = _vosk.delete_KaldiRecognizer
def AcceptWaveform(self, data):
return _vosk.KaldiRecognizer_AcceptWaveform(self, data)
def Result(self):
return _vosk.KaldiRecognizer_Result(self)
def PartialResult(self):
return _vosk.KaldiRecognizer_PartialResult(self)
def FinalResult(self):
return _vosk.KaldiRecognizer_FinalResult(self)
# Register KaldiRecognizer in _vosk:
_vosk.KaldiRecognizer_swigregister(KaldiRecognizer)
def SetLogLevel(level):
return _vosk.SetLogLevel(level)