mikex86 / deepspeech-java-bindings Goto Github PK
View Code? Open in Web Editor NEWJava Bindings for the C++ library DeepSpeech
License: GNU General Public License v3.0
Java Bindings for the C++ library DeepSpeech
License: GNU General Public License v3.0
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
@mikex86 would you be able to publish the built jar in Release tab?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.