Package Details: python-deepspeech 0.9.3-1

Git Clone URL: https://aur.archlinux.org/deepspeech.git (read-only, click to copy)
Package Base: deepspeech
Description: DeepSpeech Python bindings
Upstream URL: https://github.com/mozilla/DeepSpeech
Keywords: deep-learning machine-learning neural-networks speech-recognition speech-to-text tensorflow
Licenses: MPL2
Submitter: onny
Maintainer: None
Last Packager: xantares
Votes: 1
Popularity: 0.000000
First Submitted: 2017-12-17 12:34 (UTC)
Last Updated: 2021-03-26 22:00 (UTC)

Latest Comments

1 2 Next › Last »

CyberShadow commented on 2022-01-28 18:54 (UTC)

Fails to build (in a clean chroot):

Analyzing: target //native_client:libdeepspeech.so (1 packages loaded, 0 targets configured)
INFO: Repository local_config_python instantiated at:
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/WORKSPACE:19:16: in <toplevel>
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/tensorflow/workspace.bzl:104:21: in tf_repositories
Repository rule python_configure defined at:
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl:294:35: in <toplevel>
INFO: Repository local_execution_config_python instantiated at:
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/WORKSPACE:19:16: in <toplevel>
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/tensorflow/workspace.bzl:93:27: in tf_repositories
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config
Repository rule local_python_configure defined at:
  /build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl:275:41: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_config_python':
   Traceback (most recent call last):
        File "/build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl", line 267, column 40, in _python_autoconf_impl
                _create_local_python_repository(repository_ctx)
        File "/build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl", line 212, column 41, in _create_local_python_repository
                python_include = _get_python_include(repository_ctx, python_bin)
        File "/build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl", line 152, column 21, in _get_python_include
                result = execute(
        File "/build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/remote_config/common.bzl", line 208, column 13, in execute
                fail(
Error in fail: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
INFO: Repository rules_java instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:269:6: in <toplevel>
  /build/.cache/bazel/_bazel_builduser/bf9596911d202c14854a83cbf4e00e79/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
  /build/.cache/bazel/_bazel_builduser/bf9596911d202c14854a83cbf4e00e79/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
ERROR: Analysis of target '//native_client:libdeepspeech.so' failed; build aborted: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
INFO: Elapsed time: 11.734s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (11 packages loaded, 11 targets configured)
FAILED: Build did NOT complete successfully (11 packages loaded, 11 targets configured)
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /var/lib/aurbuild/x86_64/aur/build

Pascoual commented on 2022-01-22 23:57 (UTC) (edited on 2022-01-23 23:20 (UTC) by Pascoual)

@Dukol

First step

While getting retry menu from pikaur(or equivalent), open another shell and edit this file line 150 :

vim ~/.cache/pikaur/build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl

And return the python include path directly

150 def _get_python_include(repository_ctx, python_bin):
151     """Gets the python include path."""
152     return "/usr/include/python3.10" <===============

Last step

touch ~/.cache/pikaur/build/deepspeech/src/DeepSpeech-0.9.3/tensorflow/.bazelversion

Run again the compilation replying R.

Why ? Because the script takes the first result line, but it's a warning message instead of the python include path. Better solution should be to take last line.

2nd step

Another step, you need to add 2 includes in

vim ~/.cache/bazel/_bazel_[YOUR_LOGIN]/38ab4218b6677428b773d4bd2ac83c14/external/com_google_absl/absl/synchronization/internal/graphcycles.cc

and add 2 includes :

42 #include "absl/base/internal/spinlock.h"                                        
 43                                                                                 
 44 #include <stdexcept>                                                            
 45 #include <limits>                                                               
 46                                                                                 
 47 // Do not use STL.   This module does not use standard memory allocation.
third step

The URL used to get ds-swig.tar.gz get a 404, need to be changed to git assets. Download git 0.9.3 asset file here : https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/ds-swig.linux.amd64.tar.gz

And serve it as https on a local web server with this code

from http.server import HTTPServer,SimpleHTTPRequestHandler                     
import ssl                                                                         

httpd = HTTPServer(('localhost', 443), SimpleHTTPRequestHandler)                
sslctx = ssl.SSLContext()                                                       
sslctx.check_hostname = False # If set to True, only the hostname that matches the certificate will be accepted
sslctx.load_cert_chain(certfile='certificate.pem', keyfile="private.pem")          
httpd.socket = sslctx.wrap_socket(httpd.socket, server_side=True)               
httpd.serve_forever()
mkdir -p api/index/v1/task/project.deepspeech.swig.linux.amd64.1a4c14945012f1282c2eddc174fb7674d5295de8.0/artifacts/public/
cd api/index/v1/task/project.deepspeech.swig.linux.amd64.1a4c14945012f1282c2eddc174fb7674d5295de8.0/artifacts/public/
wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/ds-swig.linux.amd64.tar.gz
cd -
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout private.pem -out certificate.pem
// remove check ssl validity for wget
echo "check-certificate = off" > ~/.wgetrc
// run the server
python3 server.py

DuKol commented on 2022-01-07 15:18 (UTC)

Hello, I get instantly the following error, even if python path is configured properly and other stuff as well:

ERROR: An error occurred during the fetch of repository 'local_execution_config_python': Traceback (most recent call last): File "/home/kolar/Sources/DeepSpeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl", line 212, column 41, in _create_local_python_repository python_include = _get_python_include(repository_ctx, python_bin) File "/home/kolar/Sources/DeepSpeech/src/DeepSpeech-0.9.3/tensorflow/third_party/py/python_configure.bzl", line 152, column 21, in _get_python_include result = execute( File "/home/kolar/Sources/DeepSpeech/src/DeepSpeech-0.9.3/tensorflow/third_party/remote_config/common.bzl", line 208, column 13, in execute fail( Error in fail: Problem getting python include path. <string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives <string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed? ERROR: Analysis of target '//native_client:libdeepspeech.so' failed; build aborted: Problem getting python include path. <string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives <string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?

flipmess commented on 2021-04-11 23:32 (UTC) (edited on 2021-04-11 23:40 (UTC) by flipmess)

hi, i get this error while compiling with bazel3:

...
pip install --quiet numpy wheel==0.33.6 setuptools==45.0.0
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 224, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 347, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 216, in _attempt_to_pin_criterion
    satisfied = all(
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 217, in <genexpr>
    self._p.is_satisfied_by(r, candidate)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 95, in is_satisfied_by
    return requirement.is_satisfied_by(candidate)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/requirements.py", line 102, in is_satisfied_by
    return spec.contains(candidate.version, prereleases=True)
  File "/usr/lib/python3.9/site-packages/packaging/specifiers.py", line 790, in contains
    item = parse(item)
  File "/usr/lib/python3.9/site-packages/packaging/version.py", line 57, in parse
    return Version(version)
  File "/usr/lib/python3.9/site-packages/packaging/version.py", line 296, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object
make: *** [Makefile:47: bindings] Error 2
make: Leaving directory '/home/flipmess/.cache/yay/deepspeech/src/DeepSpeech-0.9.3/native_client/ctcdecode'
==> ERROR: A failure occurred in build().
    Aborting...
error making: deepspeech

tobil commented on 2021-02-03 12:24 (UTC)

I get with current manjaro

mkdir -p /home/leo/.cache/yay/deepspeech/src/DeepSpeech-0.9.3/native_client/ds-swig
wget -O - ""https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.linux.amd64.1a4c14945012f1282c2eddc174fb7674d5295de8.0/artifacts/public/ds-swig.tar.gz"" | tar -C /home/leo/.cache/yay/deepspeech/src/DeepSpeech-0.9.3/native_client/ds-swig -zxf -
--2021-02-03 13:22:51--  https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.linux.amd64.1a4c14945012f1282c2eddc174fb7674d5295de8.0/artifacts/public/ds-swig.tar.gz
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving community-tc.services.mozilla.com (community-tc.services.mozilla.com)... 34.102.144.36
Connecting to community-tc.services.mozilla.com (community-tc.services.mozilla.com)|34.102.144.36|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-02-03 13:22:51 ERROR 404: Not Found.


gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
make: *** [definitions.mk:235: /home/leo/.cache/yay/deepspeech/src/DeepSpeech-0.9.3/native_client/ds-swig/bin/swig] Error 2

pix3l commented on 2020-11-05 11:00 (UTC)

ERROR: The project you're trying to build requires Bazel 3.1.0 (specified in /mnt/magazyn/archlinux/aur-deepspeech/src/DeepSpeech-0.9.0/tensorflow/.bazelversion), but it wasn't found in /usr/bin

I've bazel 3.7.0-1, shouldn't that be enough?

BTW, shouldn't it be linked against system-wide TensorFlow (and potentially use optimized build for nVidia CUDA or AMD ROCm?

xantares commented on 2020-09-07 17:19 (UTC)

should be ok now

pomputer commented on 2020-08-26 13:33 (UTC) (edited on 2020-08-26 13:36 (UTC) by pomputer)

Build failed with:

c++  -std=c++11 -o deepspeech pkg-config --cflags sox -fopenmp client.cc -Wl,--no-as-needed -Wl,-rpath,\$ORIGIN -L/tmp/patrick-tmp/deepspeech/src/DeepSpeech-0.8.2/tensorflow/bazel-bin/native_client  -ldeepspeech  -lsox -Wl,-no-undefined
/usr/bin/ld: cannot find -ldeepspeech
collect2: error: ld returned 1 exit status
make: *** [Makefile:22: deepspeech] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

kinoe commented on 2020-01-11 10:38 (UTC) (edited on 2020-01-11 10:38 (UTC) by kinoe)

Build here failed with:

WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files: /var/tmp/pamac-build-kinoe/deepspeech/src/tensorflow/tools/bazel.rc

FATAL: Could not find system javabase. Ensure JAVA_HOME is set, or javac is on your PATH. Traceback (most recent call last): File "configure.py", line 1455, in <module> main() File "configure.py", line 1346, in main check_bazel_version('0.5.4') File "configure.py", line 459, in check_bazel_version curr_version = run_shell(['bazel', '--batch', 'version']) File "configure.py", line 154, in run_shell output = subprocess.check_output(cmd) File "/usr/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['bazel', '--batch', 'version']' returned non-zero exit status 36.

==> ERROR: An error happened in build (). Aborting ... Error making: deepspeech