forked from pool/python-SpeechRecognition
Accepting request 603624 from devel:languages:python:misc
Move back the package to d:l:p to try to submit it to Factory again OBS-URL: https://build.opensuse.org/request/show/603624 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SpeechRecognition?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
3.8.1.tar.gz
Normal file
3
3.8.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:82d3313db383409ddaf3e42625fb0c3518231a1feb5e2ed5473b10b3d5ece7bd
|
||||
size 125426650
|
||||
66
fix-readme.patch
Normal file
66
fix-readme.patch
Normal file
@@ -0,0 +1,66 @@
|
||||
Index: speech_recognition-3.8.1/README.rst
|
||||
===================================================================
|
||||
--- speech_recognition-3.8.1.orig/README.rst
|
||||
+++ speech_recognition-3.8.1/README.rst
|
||||
@@ -270,9 +270,7 @@ To hack on this library, first make sure
|
||||
|
||||
- Most of the library code lives in ``speech_recognition/__init__.py``.
|
||||
- Examples live under the ``examples/`` `directory <https://github.com/Uberi/speech_recognition/tree/master/examples>`__, and the demo script lives in ``speech_recognition/__main__.py``.
|
||||
-- The FLAC encoder binaries are in the ``speech_recognition/`` `directory <https://github.com/Uberi/speech_recognition/tree/master/speech_recognition>`__.
|
||||
- Documentation can be found in the ``reference/`` `directory <https://github.com/Uberi/speech_recognition/tree/master/reference>`__.
|
||||
-- Third-party libraries, utilities, and reference material are in the ``third-party/`` `directory <https://github.com/Uberi/speech_recognition/tree/master/third-party>`__.
|
||||
|
||||
To install/reinstall the library locally, run ``python setup.py install`` in the project `root directory <https://github.com/Uberi/speech_recognition>`__.
|
||||
|
||||
@@ -301,41 +299,6 @@ Testing is also done automatically by Tr
|
||||
python -m flake8 --ignore=E501,E701 speech_recognition tests examples setup.py # ignore errors for long lines and multi-statement lines
|
||||
python -m rstcheck README.rst reference/*.rst # ensure RST is well-formed
|
||||
|
||||
-FLAC Executables
|
||||
-~~~~~~~~~~~~~~~~
|
||||
-
|
||||
-The included ``flac-win32`` executable is the `official FLAC 1.3.2 32-bit Windows binary <http://downloads.xiph.org/releases/flac/flac-1.3.2-win.zip>`__.
|
||||
-
|
||||
-The included ``flac-linux-x86`` and ``flac-linux-x86_64`` executables are built from the `FLAC 1.3.2 source code <http://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz>`__ with `Manylinux <https://github.com/pypa/manylinux>`__ to ensure that it's compatible with a wide variety of distributions.
|
||||
-
|
||||
-The built FLAC executables should be bit-for-bit reproducible. To rebuild them, run the following inside the project directory on a Debian-like system:
|
||||
-
|
||||
-.. code:: bash
|
||||
-
|
||||
- # download and extract the FLAC source code
|
||||
- cd third-party
|
||||
- sudo apt-get install --yes docker.io
|
||||
-
|
||||
- # build FLAC inside the Manylinux i686 Docker image
|
||||
- tar xf flac-1.3.2.tar.xz
|
||||
- sudo docker run --tty --interactive --rm --volume "$(pwd):/root" quay.io/pypa/manylinux1_i686:latest bash
|
||||
- cd /root/flac-1.3.2
|
||||
- ./configure LDFLAGS=-static # compiler flags to make a static build
|
||||
- make
|
||||
- exit
|
||||
- cp flac-1.3.2/src/flac/flac ../speech_recognition/flac-linux-x86 && sudo rm -rf flac-1.3.2/
|
||||
-
|
||||
- # build FLAC inside the Manylinux x86_64 Docker image
|
||||
- tar xf flac-1.3.2.tar.xz
|
||||
- sudo docker run --tty --interactive --rm --volume "$(pwd):/root" quay.io/pypa/manylinux1_x86_64:latest bash
|
||||
- cd /root/flac-1.3.2
|
||||
- ./configure LDFLAGS=-static # compiler flags to make a static build
|
||||
- make
|
||||
- exit
|
||||
- cp flac-1.3.2/src/flac/flac ../speech_recognition/flac-linux-x86_64 && sudo rm -r flac-1.3.2/
|
||||
-
|
||||
-The included ``flac-mac`` executable is extracted from `xACT 2.39 <http://xact.scottcbrown.org/>`__, which is a frontend for FLAC 1.3.2 that conveniently includes binaries for all of its encoders. Specifically, it is a copy of ``xACT 2.39/xACT.app/Contents/Resources/flac`` in ``xACT2.39.zip``.
|
||||
-
|
||||
Authors
|
||||
-------
|
||||
|
||||
@@ -374,9 +337,3 @@ Copyright 2014-2017 `Anthony Zhang (Uber
|
||||
SpeechRecognition is made available under the 3-clause BSD license. See ``LICENSE.txt`` in the project's `root directory <https://github.com/Uberi/speech_recognition>`__ for more information.
|
||||
|
||||
For convenience, all the official distributions of SpeechRecognition already include a copy of the necessary copyright notices and licenses. In your project, you can simply **say that licensing information for SpeechRecognition can be found within the SpeechRecognition README, and make sure SpeechRecognition is visible to users if they wish to see it**.
|
||||
-
|
||||
-SpeechRecognition distributes source code, binaries, and language files from `CMU Sphinx <http://cmusphinx.sourceforge.net/>`__. These files are BSD-licensed and redistributable as long as copyright notices are correctly retained. See ``speech_recognition/pocketsphinx-data/*/LICENSE*.txt`` and ``third-party/LICENSE-Sphinx.txt`` for license details for individual parts.
|
||||
-
|
||||
-SpeechRecognition distributes source code and binaries from `PyAudio <http://people.csail.mit.edu/hubert/pyaudio/>`__. These files are MIT-licensed and redistributable as long as copyright notices are correctly retained. See ``third-party/LICENSE-PyAudio.txt`` for license details.
|
||||
-
|
||||
-SpeechRecognition distributes binaries from `FLAC <https://xiph.org/flac/>`__ - ``speech_recognition/flac-win32.exe``, ``speech_recognition/flac-linux-x86``, and ``speech_recognition/flac-mac``. These files are GPLv2-licensed and redistributable, as long as the terms of the GPL are satisfied. The FLAC binaries are an `aggregate <https://www.gnu.org/licenses/gpl-faq.html#MereAggregation>`__ of `separate programs <https://www.gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins>`__, so these GPL restrictions do not apply to the library or your programs that use the library, only to FLAC itself. See ``LICENSE-FLAC.txt`` for license details.
|
||||
53
python-SpeechRecognition.changes
Normal file
53
python-SpeechRecognition.changes
Normal file
@@ -0,0 +1,53 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 3 09:48:57 UTC 2018 - alarrosa@suse.com
|
||||
|
||||
- Add fix-readme.patch to keep clear that the flac binaries and third-party
|
||||
source files are removed and are not used by the python-SpeechRecognition
|
||||
package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 5 09:38:06 UTC 2018 - alarrosa@suse.com
|
||||
|
||||
- Update to version 3.8.1
|
||||
* Snowboy hotwords support for highly efficient, performant listening.
|
||||
This is implemented as the snowboy_configuration parameter of
|
||||
recognizer_instance.listen.
|
||||
* Configurable Pocketsphinx models - you can now specify your own acoustic
|
||||
parameters, language model, and phoneme dictionary, using the language
|
||||
parameter of recognizer_instance.recognize_sphinx.
|
||||
* audio_data_instance.get_segment(start_ms=None, end_ms=None) is a new method
|
||||
that can be called on any AudioData instance to get a segment of the audio
|
||||
starting at start_ms and ending at end_ms. This is really useful when you
|
||||
want to get, say, only the first five seconds of some audio.
|
||||
* The stopper function returned by listen_in_background now accepts one
|
||||
parameter, wait_for_stop (defaulting to True for backwards compatibility),
|
||||
which determines whether the function will wait for the background thread
|
||||
to fully shutdown before returning. One advantage is that if wait_for_stop
|
||||
is False, you can call the stopper function from any thread!
|
||||
* New example, demonstrating how to simultaneously listen to and recognize
|
||||
speech with the threaded producer/consumer pattern: threaded_workers.py.
|
||||
* Various improvements and bugfixes:
|
||||
* Python 3 style type annotations in library documentation.
|
||||
* recognize_google_cloud now uses the v1 rather than the beta API.
|
||||
* recognize_google_cloud now returns timestamp info when the show_all
|
||||
parameter is True.
|
||||
* recognize_bing won't time out as often on credential requests, due to a
|
||||
longer default timeout.
|
||||
* recognize_google_cloud timeouts respect
|
||||
recognizer_instance.operation_timeout now.
|
||||
* Any recognizers using FLAC audio were broken inside Linux on Docker -
|
||||
this is now fixed.
|
||||
* Various documentation and lint fixes.
|
||||
* Lots of small build system improvements.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 15 16:20:51 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Added python-SpeechRecognition-common-en-US package to install the
|
||||
pocketsphinx-data directory in a common place for python2 and python3
|
||||
packages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 4 17:54:27 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Initial release of python-SpeechRecognition 3.7.1
|
||||
97
python-SpeechRecognition.spec
Normal file
97
python-SpeechRecognition.spec
Normal file
@@ -0,0 +1,97 @@
|
||||
#
|
||||
# spec file for package python-SpeechRecognition
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define justpython python
|
||||
Name: python-SpeechRecognition
|
||||
Version: 3.8.1
|
||||
Release: 0
|
||||
# Note: The sources include third party code with different licenses.
|
||||
# We remove all those before building so it's not installed in the
|
||||
# generated packages.
|
||||
License: BSD-3-Clause
|
||||
Summary: Library for performing speech recognition, with support for several engines
|
||||
Url: https://github.com/Uberi/speech_recognition#readme
|
||||
Group: Development/Languages/Python
|
||||
Source: https://github.com/Uberi/speech_recognition/archive/%{version}.tar.gz
|
||||
Patch0: fix-readme.patch
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
Requires: flac
|
||||
Requires: python-PyAudio
|
||||
Requires: python-oauth2client
|
||||
Requires: %{justpython}-SpeechRecognition-common-en-US
|
||||
Recommends: python-google-api-python-client
|
||||
Recommends: python-pocketsphinx-python
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
SpeechRecognition Library for performing speech recognition, with support for several engines and APIs, online and offline.
|
||||
|
||||
The Speech recognition engine/API supports CMU Sphinx (works offline), Google Speech Recognition,
|
||||
Google Cloud Speech API, Wit.ai, Microsoft Bing Voice Recognition, Houndify API and
|
||||
IBM Speech to Text
|
||||
|
||||
%package -n python-SpeechRecognition-common-en-US
|
||||
Summary: Common files for en-US language model support in python-speech_recognition
|
||||
|
||||
%description -n python-SpeechRecognition-common-en-US
|
||||
SpeechRecognition Library for performing speech recognition, with support for
|
||||
several engines and APIs, online and offline.
|
||||
|
||||
The Speech recognition engine/API supports CMU Sphinx (works offline), Google
|
||||
Speech Recognition, Google Cloud Speech API, Wit.ai, Microsoft Bing Voice
|
||||
Recognition, Houndify API and IBM Speech to Text.
|
||||
|
||||
This package contains the data for en-US language model to be used by
|
||||
pocketsphinx from python-SpeechRecognition.
|
||||
|
||||
%prep
|
||||
%setup -q -n speech_recognition-%{version}
|
||||
%patch0 -p1
|
||||
rm -Rf third-party
|
||||
rm speech_recognition/flac-*
|
||||
rm LICENSE-FLAC.txt
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
mkdir -p %{buildroot}%{_datadir}/speech_recognition
|
||||
cp -Ra speech_recognition/pocketsphinx-data %{buildroot}%{_datadir}/speech_recognition/
|
||||
%python_expand rm -Rf %{buildroot}%{$python_sitelib}/speech_recognition/pocketsphinx-data
|
||||
%python_expand ln -s %{_datadir}/speech_recognition/pocketsphinx-data %{buildroot}%{$python_sitelib}/speech_recognition/
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/*
|
||||
%dir %{_datadir}/speech_recognition/
|
||||
%dir %{_datadir}/speech_recognition/pocketsphinx-data
|
||||
|
||||
%files -n python-SpeechRecognition-common-en-US
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/speech_recognition/pocketsphinx-data/en-US
|
||||
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user