diff --git a/doc/BUILDING.rst b/doc/BUILDING.rst index 0bc598bd..02eeb812 100644 --- a/doc/BUILDING.rst +++ b/doc/BUILDING.rst @@ -193,9 +193,9 @@ Please refer to TensorFlow documentation on how to setup the environment to buil Using the library from Android project ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We provide uptodate and tested ``libdeepspeech`` usable as an ``AAR`` package, +We provide up-to-date and tested STT usable as an ``AAR`` package, for Android versions starting with 7.0 to 11.0. The package is published on -`JCenter `_, +`JCenter `_, and the ``JCenter`` repository should be available by default in any Android project. Please make sure your project is setup to pull from this repository. You can then include the library by just adding this line to your @@ -203,7 +203,7 @@ You can then include the library by just adding this line to your .. code-block:: - implementation 'deepspeech.mozilla.org:libdeepspeech:VERSION@aar' + implementation 'voice.mozilla.org:stt:VERSION@aar' Building ``libmozilla_voice_stt.so`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -220,17 +220,17 @@ Or (ARM64): bazel build --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic --config=android --config=android_arm64 --define=runtime=tflite --action_env ANDROID_NDK_API_LEVEL=21 --cxxopt=-std=c++14 --copt=-D_GLIBCXX_USE_C99 //native_client:libmozilla_voice_stt.so -Building ``libdeepspeech.aar`` +Building ``libmozillavoicestt.aar`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In the unlikely event you have to rebuild the JNI bindings, source code is -available under the ``libdeepspeech`` subdirectory. Building depends on shared +available under the ``libmozillavoicestt`` subdirectory. Building depends on shared object: please ensure to place ``libmozilla_voice_stt.so`` into the -``libdeepspeech/libs/{arm64-v8a,armeabi-v7a,x86_64}/`` matching subdirectories. +``libmozillavoicestt/libs/{arm64-v8a,armeabi-v7a,x86_64}/`` matching subdirectories. Building the bindings is managed by ``gradle`` and should be limited to issuing -``./gradlew libdeepspeech:build``, producing an ``AAR`` package in -``./libdeepspeech/build/outputs/aar/``. +``./gradlew libmozillavoicestt:build``, producing an ``AAR`` package in +``./libmozillavoicestt/build/outputs/aar/``. Please note that you might have to copy the file to a local Maven repository and adapt file naming (when missing, the error message should states what diff --git a/native_client/dotnet/MozillaVoiceSttClient/MozillaVoiceStt.cs b/native_client/dotnet/MozillaVoiceSttClient/MozillaVoiceStt.cs index dc881fcc..a331e393 100644 --- a/native_client/dotnet/MozillaVoiceSttClient/MozillaVoiceStt.cs +++ b/native_client/dotnet/MozillaVoiceSttClient/MozillaVoiceStt.cs @@ -3,8 +3,8 @@ using MozillaVoiceSttClient.Extensions; using System; using System.IO; -using MozillaVoiceStt.Enums; -using MozillaVoiceStt.Models; +using MozillaVoiceSttClient.Enums; +using MozillaVoiceSttClient.Models; namespace MozillaVoiceSttClient { diff --git a/native_client/dotnet/MozillaVoiceSttWPF/App.xaml.cs b/native_client/dotnet/MozillaVoiceSttWPF/App.xaml.cs index 973046b8..6404f50b 100644 --- a/native_client/dotnet/MozillaVoiceSttWPF/App.xaml.cs +++ b/native_client/dotnet/MozillaVoiceSttWPF/App.xaml.cs @@ -1,6 +1,6 @@ using CommonServiceLocator; using MozillaVoiceStt.WPF.ViewModels; -using MozillaVoiceStt.Interfaces; +using MozillaVoiceSttClient.Interfaces; using GalaSoft.MvvmLight.Ioc; using System.Windows; @@ -19,8 +19,8 @@ namespace MozillaVoiceSttWPF try { //Register instance of Mozilla Voice STT - MozillaVoiceSttClient.Model client = - new MozillaVoiceSttClient.Model("deepspeech-0.8.0-models.pbmm"); + MozillaVoiceSttClient.MozillaVoiceSttModel client = + new MozillaVoiceSttClient.MozillaVoiceSttModel("deepspeech-0.8.0-models.pbmm"); SimpleIoc.Default.Register(() => client); SimpleIoc.Default.Register(); diff --git a/native_client/java/app/build.gradle b/native_client/java/app/build.gradle index c6ff276e..abf1fd62 100644 --- a/native_client/java/app/build.gradle +++ b/native_client/java/app/build.gradle @@ -4,7 +4,7 @@ android { compileSdkVersion 27 defaultConfig { - applicationId "org.mozilla.voice.stt" + applicationId "org.mozilla.voice.sttapp" minSdkVersion 21 targetSdkVersion 27 versionName androidGitVersion.name() diff --git a/native_client/java/app/src/androidTest/java/org/mozilla/voice/stt/ExampleInstrumentedTest.java b/native_client/java/app/src/androidTest/java/org/mozilla/voice/sttapp/ExampleInstrumentedTest.java similarity index 84% rename from native_client/java/app/src/androidTest/java/org/mozilla/voice/stt/ExampleInstrumentedTest.java rename to native_client/java/app/src/androidTest/java/org/mozilla/voice/sttapp/ExampleInstrumentedTest.java index a122b24a..01ddafb9 100644 --- a/native_client/java/app/src/androidTest/java/org/mozilla/voice/stt/ExampleInstrumentedTest.java +++ b/native_client/java/app/src/androidTest/java/org/mozilla/voice/sttapp/ExampleInstrumentedTest.java @@ -1,4 +1,4 @@ -package org.mozilla.voice.stt; +package org.mozilla.voice.sttapp; import android.content.Context; import android.support.test.InstrumentationRegistry; @@ -21,6 +21,6 @@ public class ExampleInstrumentedTest { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); - assertEquals("org.mozilla.voice.stt", appContext.getPackageName()); + assertEquals("org.mozilla.voice.sttapp", appContext.getPackageName()); } } diff --git a/native_client/java/app/src/main/AndroidManifest.xml b/native_client/java/app/src/main/AndroidManifest.xml index aa5ba8cd..1ef6e3a2 100644 --- a/native_client/java/app/src/main/AndroidManifest.xml +++ b/native_client/java/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="org.mozilla.voice.sttapp"> ${TASKCLUSTER_TMP_DIR}/stderr) + phrase_pbmodel_nolm=$(MozillaVoiceSttConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name} --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} 2>${TASKCLUSTER_TMP_DIR}/stderr) set -e assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" set +e - phrase_pbmodel_nolm=$(DeepSpeechConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name} --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} --extended yes 2>${TASKCLUSTER_TMP_DIR}/stderr) + phrase_pbmodel_nolm=$(MozillaVoiceSttConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name} --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} --extended yes 2>${TASKCLUSTER_TMP_DIR}/stderr) set -e assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" set +e - phrase_pbmodel_nolm=$(DeepSpeechConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} 2>${TASKCLUSTER_TMP_DIR}/stderr) + phrase_pbmodel_nolm=$(MozillaVoiceSttConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} 2>${TASKCLUSTER_TMP_DIR}/stderr) set -e assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" set +e - phrase_pbmodel_withlm=$(DeepSpeechConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} --scorer ${TASKCLUSTER_TMP_DIR}/kenlm.scorer --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} 2>${TASKCLUSTER_TMP_DIR}/stderr) + phrase_pbmodel_withlm=$(MozillaVoiceSttConsole.exe --model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} --scorer ${TASKCLUSTER_TMP_DIR}/kenlm.scorer --audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} 2>${TASKCLUSTER_TMP_DIR}/stderr) set -e assert_working_ldc93s1_lm "${phrase_pbmodel_withlm}" "$?" } diff --git a/taskcluster/tc-build-utils.sh b/taskcluster/tc-build-utils.sh index 9fb67232..f91f1f8f 100755 --- a/taskcluster/tc-build-utils.sh +++ b/taskcluster/tc-build-utils.sh @@ -341,5 +341,6 @@ do_deepspeech_ios_framework_build() xcodeArch="arm64" ;; esac + xcodebuild -workspace mozilla_voice_stt.xcworkspace -list xcodebuild -workspace mozilla_voice_stt.xcworkspace -scheme mozilla_voice_stt_test -configuration Release -arch "${xcodeArch}" -sdk "${iosSDK}" -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO } diff --git a/taskcluster/tc-dotnet-utils.sh b/taskcluster/tc-dotnet-utils.sh index f1ccdfad..df5fe303 100755 --- a/taskcluster/tc-dotnet-utils.sh +++ b/taskcluster/tc-dotnet-utils.sh @@ -18,10 +18,10 @@ install_nuget() mkdir -p "${TASKCLUSTER_TMP_DIR}/ds/" nuget_pkg_url=$(get_dep_nuget_pkg_url "${nuget}") - console_pkg_url=$(get_dep_nuget_pkg_url "DeepSpeechConsole.exe") + console_pkg_url=$(get_dep_nuget_pkg_url "MozillaVoiceSttConsole.exe") ${WGET} -O - "${nuget_pkg_url}" | gunzip > "${TASKCLUSTER_TMP_DIR}/${PROJECT_NAME}.${DS_VERSION}.nupkg" - ${WGET} -O - "${console_pkg_url}" | gunzip > "${TASKCLUSTER_TMP_DIR}/ds/DeepSpeechConsole.exe" + ${WGET} -O - "${console_pkg_url}" | gunzip > "${TASKCLUSTER_TMP_DIR}/ds/MozillaVoiceSttConsole.exe" nuget sources add -Name repo -Source $(cygpath -w "${TASKCLUSTER_TMP_DIR}/repo/") @@ -37,7 +37,7 @@ install_nuget() nuget install NAudio cp NAudio*/lib/net35/NAudio.dll ${TASKCLUSTER_TMP_DIR}/ds/ cp ${PROJECT_NAME}.${DS_VERSION}/build/libmozilla_voice_stt.so ${TASKCLUSTER_TMP_DIR}/ds/ - cp ${PROJECT_NAME}.${DS_VERSION}/lib/net46/DeepSpeechClient.dll ${TASKCLUSTER_TMP_DIR}/ds/ + cp ${PROJECT_NAME}.${DS_VERSION}/lib/net46/MozillaVoiceSttClient.dll ${TASKCLUSTER_TMP_DIR}/ds/ ls -hal ${TASKCLUSTER_TMP_DIR}/ds/ diff --git a/taskcluster/win-package.sh b/taskcluster/win-package.sh index 9ebcc469..c729b824 100755 --- a/taskcluster/win-package.sh +++ b/taskcluster/win-package.sh @@ -14,7 +14,7 @@ package_libdeepspeech_as_zip "libmozilla_voice_stt.zip" cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/dotnet/*.nupkg ${TASKCLUSTER_ARTIFACTS}/ -cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/dotnet/DeepSpeechConsole/bin/x64/Release/DeepSpeechConsole.exe ${TASKCLUSTER_ARTIFACTS}/ +cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/dotnet/MozillaVoiceSttConsole/bin/x64/Release/MozillaVoiceSttConsole.exe ${TASKCLUSTER_ARTIFACTS}/ if [ -d ${DS_ROOT_TASK}/DeepSpeech/ds/wheels ]; then cp ${DS_ROOT_TASK}/DeepSpeech/ds/wheels/* ${TASKCLUSTER_ARTIFACTS}/