More rebranding, Java package, C++ impl
This commit is contained in:
parent
f33f0b382d
commit
95f122806e
@ -1,14 +1,14 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := deepspeech-prebuilt
|
||||
LOCAL_MODULE := stt-prebuilt
|
||||
LOCAL_SRC_FILES := $(TFDIR)/bazel-bin/native_client/libstt.so
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_CPP_EXTENSION := .cc .cxx .cpp
|
||||
LOCAL_MODULE := deepspeech
|
||||
LOCAL_MODULE := stt
|
||||
LOCAL_SRC_FILES := client.cc
|
||||
LOCAL_SHARED_LIBRARIES := deepspeech-prebuilt
|
||||
LOCAL_SHARED_LIBRARIES := stt-prebuilt
|
||||
LOCAL_LDFLAGS := -Wl,--no-as-needed
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
@ -114,9 +114,9 @@ cc_library(
|
||||
cc_library(
|
||||
name = "coqui_stt_bundle",
|
||||
srcs = [
|
||||
"deepspeech.cc",
|
||||
"stt.cc",
|
||||
"coqui-stt.h",
|
||||
"deepspeech_errors.cc",
|
||||
"stt_errors.cc",
|
||||
"modelstate.cc",
|
||||
"modelstate.h",
|
||||
"workspace_status.cc",
|
||||
@ -229,7 +229,7 @@ cc_binary(
|
||||
name = "generate_scorer_package",
|
||||
srcs = [
|
||||
"generate_scorer_package.cpp",
|
||||
"deepspeech_errors.cc",
|
||||
"stt_errors.cc",
|
||||
],
|
||||
copts = ["-std=c++11"],
|
||||
deps = [
|
||||
|
@ -16,7 +16,7 @@ include definitions.mk
|
||||
default: $(STT_BIN)
|
||||
|
||||
clean:
|
||||
rm -f deepspeech
|
||||
rm -f stt
|
||||
|
||||
$(STT_BIN): client.cc Makefile
|
||||
$(CXX) $(CFLAGS) $(CFLAGS_DEEPSPEECH) $(SOX_CFLAGS) client.cc $(LDFLAGS) $(SOX_LDFLAGS)
|
||||
|
@ -8,7 +8,7 @@ GRADLE ?= ./gradlew
|
||||
all: apk
|
||||
|
||||
clean: apk-clean
|
||||
rm -rf *.java jni/deepspeech_wrap.cpp
|
||||
rm -rf *.java jni/stt_wrap.cpp
|
||||
|
||||
apk-clean:
|
||||
$(GRADLE) clean
|
||||
@ -28,4 +28,4 @@ maven-bundle: apk
|
||||
$(GRADLE) zipMavenArtifacts
|
||||
|
||||
bindings: clean ds-swig
|
||||
$(DS_SWIG_ENV) swig -c++ -java -package ai.coqui.libstt -outdir libstt/src/main/java/ai/coqui/libstt/ -o jni/deepspeech_wrap.cpp jni/deepspeech.i
|
||||
$(DS_SWIG_ENV) swig -c++ -java -package ai.coqui.libstt -outdir libstt/src/main/java/ai/coqui/libstt/ -o jni/stt_wrap.cpp jni/stt.i
|
||||
|
@ -132,10 +132,10 @@ public class DeepSpeechActivity extends AppCompatActivity {
|
||||
this._tfliteModel = (EditText) findViewById(R.id.tfliteModel);
|
||||
this._audioFile = (EditText) findViewById(R.id.audioFile);
|
||||
|
||||
this._tfliteModel.setText("/sdcard/deepspeech/output_graph.tflite");
|
||||
this._tfliteModel.setText("/sdcard/stt/output_graph.tflite");
|
||||
this._tfliteStatus.setText("Ready, waiting ...");
|
||||
|
||||
this._audioFile.setText("/sdcard/deepspeech/audio.wav");
|
||||
this._audioFile.setText("/sdcard/stt/audio.wav");
|
||||
|
||||
this._startInference = (Button) findViewById(R.id.btnStartInference);
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">DeepSpeech</string>
|
||||
<string name="app_name">Coqui STT</string>
|
||||
</resources>
|
||||
|
@ -11,24 +11,24 @@ cmake_minimum_required(VERSION 3.4.1)
|
||||
# Gradle automatically packages shared libraries with your APK.
|
||||
|
||||
add_library( # Sets the name of the library.
|
||||
deepspeech-jni
|
||||
stt-jni
|
||||
|
||||
# Sets the library as a shared library.
|
||||
SHARED
|
||||
|
||||
# Provides a relative path to your source file(s).
|
||||
../jni/deepspeech_wrap.cpp )
|
||||
../jni/stt_wrap.cpp )
|
||||
|
||||
add_library( deepspeech-lib
|
||||
add_library( stt-lib
|
||||
SHARED
|
||||
IMPORTED )
|
||||
|
||||
set_target_properties( deepspeech-lib
|
||||
set_target_properties( stt-lib
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libstt.so )
|
||||
|
||||
add_custom_command( TARGET deepspeech-jni POST_BUILD
|
||||
add_custom_command( TARGET stt-jni POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libstt.so
|
||||
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libstt.so )
|
||||
@ -52,9 +52,9 @@ find_library( # Sets the name of the path variable.
|
||||
# build script, prebuilt third-party libraries, or system libraries.
|
||||
|
||||
target_link_libraries( # Specifies the target library.
|
||||
deepspeech-jni
|
||||
stt-jni
|
||||
|
||||
deepspeech-lib
|
||||
stt-lib
|
||||
|
||||
# Links the target library to the log library
|
||||
# included in the NDK.
|
||||
|
@ -6,8 +6,8 @@ package ai.coqui.libstt;
|
||||
public class DeepSpeechModel {
|
||||
|
||||
static {
|
||||
System.loadLibrary("deepspeech-jni");
|
||||
System.loadLibrary("deepspeech");
|
||||
System.loadLibrary("stt-jni");
|
||||
System.loadLibrary("stt");
|
||||
}
|
||||
|
||||
// FIXME: We should have something better than those SWIGTYPE_*
|
||||
|
@ -8,4 +8,4 @@ To update, please install SWIG (4.0 at least) and then run from native_client/ja
|
||||
|
||||
.. code-block::
|
||||
|
||||
swig -c++ -java -doxygen -package ai.coqui.libstt -outdir libstt/src/main/java/ai/coqui/libstt_doc -o jni/deepspeech_wrap.cpp jni/deepspeech.i
|
||||
swig -c++ -java -doxygen -package ai.coqui.libstt -outdir libstt/src/main/java/ai/coqui/libstt_doc -o jni/stt_wrap.cpp jni/stt.i
|
||||
|
Loading…
Reference in New Issue
Block a user