GithubHelp home page GithubHelp logo

mikex86 / deepspeech-java-bindings Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 5.0 4.44 MB

Java Bindings for the C++ library DeepSpeech

License: GNU General Public License v3.0

Java 83.03% CMake 2.34% C++ 13.10% C 1.53%
java-bindings android speech-recognition deepspeech

deepspeech-java-bindings's People

Contributors

mikex86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deepspeech-java-bindings's Issues

need more instructions to build DeepSpeech-jni

I'm trying to follow the instructions to build the jni library.

Download libdeepspeech to libs/linux:

$ mkdir -p libs/linux && cd $_
$ wget -q https://github.com/mozilla/DeepSpeech/releases/download/v0.7.1/native_client.amd64.cpu.linux.tar.xz
$ tar -xf native_client.amd64.cpu.linux.tar.xz && rm native_client.amd64.cpu.linux.tar.xz
$ mv libdeepspeech.so libdeepspeech_cpu.so

Edit the CMakeLists.txt:

$ sed -i "s/set(CUDA_CONFIGURATION .*)/set(CUDA_CONFIGURATION FALSE)/" CMakeLists.txt
$ sed -i "s/set(PLATFORM .*)/set(PLATFORM linux)/" CMakeLists.txt

Run cmake build .

...That just seems to create a Makefile, so I run make and the compiler complains that it can't find <deepspeech.h>.

I've tried CXXFLAGS=-isystem\ libs/linux/ cmake build . but that just leads to more compiler errors:

[ 33%] Building CXX object CMakeFiles/deepspeech-jni.dir/org_mozilla_deepspeech_DeepSpeech.cpp.o
/home/runner/work/idear/idear/DeepSpeech-jni/org_mozilla_deepspeech_DeepSpeech.cpp: In function ‘jint Java_org_mozilla_deepspeech_DeepSpeech_nCreateModel(JNIEnv*, jclass, jstring, jlong, jlong, jstring, jlong, jobject)’:
/home/runner/work/idear/idear/DeepSpeech-jni/org_mozilla_deepspeech_DeepSpeech.cpp:14:48: error: invalid conversion from ‘unsigned int’ to ‘ModelState**’ [-fpermissive]
jint state = DS_CreateModel(modelPathCStr, static_cast(nCep),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/idear/idear/DeepSpeech-jni/org_mozilla_deepspeech_DeepSpeech.cpp:17:37: error: too many arguments to function ‘int DS_CreateModel(const char*, ModelState**)’
&ptr);
^
In file included from /home/runner/work/idear/idear/DeepSpeech-jni/org_mozilla_deepspeech_DeepSpeech.h:8:0,
from /home/runner/work/idear/idear/DeepSpeech-jni/org_mozilla_deepspeech_DeepSpeech.cpp:1:
libs/linux/deepspeech.h:97:5: note: declared here
int DS_CreateModel(const char* aModelPath,
^~~~~~~~~~~~~~

More logs here:
https://github.com/OpenASR/idear/runs/689408459?check_suite_focus=true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.