Use scoped name for npm package
This commit is contained in:
parent
c31df0fd4c
commit
50de377953
@ -151,7 +151,7 @@ You can download the JS bindings using ``npm``\ :
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
npm install mozilla_voice_stt
|
npm install @mozilla-voice/stt
|
||||||
|
|
||||||
Please note that as of now, we support:
|
Please note that as of now, we support:
|
||||||
- Node.JS versions 4 to 13.
|
- Node.JS versions 4 to 13.
|
||||||
@ -163,7 +163,7 @@ Alternatively, if you're using Linux and have a supported NVIDIA GPU, you can in
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
npm install mozilla_voice_stt_cuda
|
npm install @mozilla-voice/stt-cuda
|
||||||
|
|
||||||
See the `release notes <https://github.com/mozilla/DeepSpeech/releases>`_ to find which GPUs are supported. Please ensure you have the required `CUDA dependency <#cuda-dependency>`_.
|
See the `release notes <https://github.com/mozilla/DeepSpeech/releases>`_ to find which GPUs are supported. Please ensure you have the required `CUDA dependency <#cuda-dependency>`_.
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ NODE_BUILD_TOOL ?= node-pre-gyp
|
|||||||
NODE_ABI_TARGET ?=
|
NODE_ABI_TARGET ?=
|
||||||
NODE_BUILD_VERBOSE ?= --verbose
|
NODE_BUILD_VERBOSE ?= --verbose
|
||||||
NPM_TOOL ?= npm
|
NPM_TOOL ?= npm
|
||||||
PROJECT_NAME ?= mozilla_voice_stt
|
PROJECT_NAME ?= @mozilla-voice/stt
|
||||||
PROJECT_VERSION ?= $(shell cat ../../training/deepspeech_training/VERSION | tr -d '\n')
|
PROJECT_VERSION ?= $(shell cat ../../training/deepspeech_training/VERSION | tr -d '\n')
|
||||||
NPM_ROOT ?= $(shell npm root)
|
NPM_ROOT ?= $(shell npm root)
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ really-clean: clean clean-npm-pack
|
|||||||
|
|
||||||
package.json: package.json.in
|
package.json: package.json.in
|
||||||
sed \
|
sed \
|
||||||
-e 's/$$(PROJECT_NAME)/$(PROJECT_NAME)/' \
|
-e 's`$$(PROJECT_NAME)`$(PROJECT_NAME)`' \
|
||||||
-e 's/$$(PROJECT_VERSION)/$(PROJECT_VERSION)/' \
|
-e 's/$$(PROJECT_VERSION)/$(PROJECT_VERSION)/' \
|
||||||
package.json.in > package.json && cat package.json
|
package.json.in > package.json && cat package.json
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ then:
|
|||||||
DEEPSPEECH_AUDIO: "https://github.com/mozilla/DeepSpeech/releases/download/v0.4.1/audio-0.4.1.tar.gz"
|
DEEPSPEECH_AUDIO: "https://github.com/mozilla/DeepSpeech/releases/download/v0.4.1/audio-0.4.1.tar.gz"
|
||||||
PIP_DEFAULT_TIMEOUT: "60"
|
PIP_DEFAULT_TIMEOUT: "60"
|
||||||
EXAMPLES_CLONE_URL: "https://github.com/mozilla/DeepSpeech-examples"
|
EXAMPLES_CLONE_URL: "https://github.com/mozilla/DeepSpeech-examples"
|
||||||
EXAMPLES_CHECKOUT_TARGET: "master"
|
EXAMPLES_CHECKOUT_TARGET: "nodejs-scoped-name"
|
||||||
|
|
||||||
command:
|
command:
|
||||||
- "/bin/bash"
|
- "/bin/bash"
|
||||||
|
@ -7,4 +7,4 @@ source $(dirname "$0")/tc-tests-utils.sh
|
|||||||
mkdir -p ${TASKCLUSTER_ARTIFACTS} || true
|
mkdir -p ${TASKCLUSTER_ARTIFACTS} || true
|
||||||
|
|
||||||
# NodeJS package
|
# NodeJS package
|
||||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/mozilla_voice_stt*.tgz ${TASKCLUSTER_ARTIFACTS}/
|
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/mozilla-voice-stt*.tgz ${TASKCLUSTER_ARTIFACTS}/
|
||||||
|
@ -14,7 +14,7 @@ package_libdeepspeech_as_zip "libmozilla_voice_stt.zip"
|
|||||||
|
|
||||||
if [ -d ${DS_ROOT_TASK}/DeepSpeech/ds/wheels ]; then
|
if [ -d ${DS_ROOT_TASK}/DeepSpeech/ds/wheels ]; then
|
||||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/wheels/* ${TASKCLUSTER_ARTIFACTS}/
|
cp ${DS_ROOT_TASK}/DeepSpeech/ds/wheels/* ${TASKCLUSTER_ARTIFACTS}/
|
||||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/mozilla_voice_stt*.tgz ${TASKCLUSTER_ARTIFACTS}/
|
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/mozilla-voice-stt*.tgz ${TASKCLUSTER_ARTIFACTS}/
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ -f ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/wrapper.tar.gz ]; then
|
if [ -f ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/wrapper.tar.gz ]; then
|
||||||
|
@ -133,9 +133,9 @@ do_deepspeech_nodejs_build()
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
if [ "${rename_to_gpu}" = "--cuda" ]; then
|
if [ "${rename_to_gpu}" = "--cuda" ]; then
|
||||||
make -C native_client/javascript clean npm-pack PROJECT_NAME=mozilla_voice_stt_cuda
|
make -C native_client/javascript clean npm-pack PROJECT_NAME="@mozilla-voice/stt-cuda"
|
||||||
else
|
else
|
||||||
make -C native_client/javascript clean npm-pack PROJECT_NAME=mozilla_voice_stt
|
make -C native_client/javascript clean npm-pack PROJECT_NAME="@mozilla-voice/stt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tar -czf native_client/javascript/wrapper.tar.gz \
|
tar -czf native_client/javascript/wrapper.tar.gz \
|
||||||
@ -165,9 +165,9 @@ do_deepspeech_npm_package()
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
if [ "${package_option}" = "--cuda" ]; then
|
if [ "${package_option}" = "--cuda" ]; then
|
||||||
make -C native_client/javascript clean npm-pack PROJECT_NAME=mozilla_voice_stt_cuda
|
make -C native_client/javascript clean npm-pack PROJECT_NAME="@mozilla-voice/stt-cuda"
|
||||||
elif [ "${package_option}" = "--tflite" ]; then
|
elif [ "${package_option}" = "--tflite" ]; then
|
||||||
make -C native_client/javascript clean npm-pack PROJECT_NAME=mozilla_voice_stt_tflite
|
make -C native_client/javascript clean npm-pack PROJECT_NAME="@mozilla-voice/stt-tflite"
|
||||||
else
|
else
|
||||||
make -C native_client/javascript clean npm-pack
|
make -C native_client/javascript clean npm-pack
|
||||||
fi
|
fi
|
||||||
|
@ -7,8 +7,8 @@ get_dep_npm_pkg_url()
|
|||||||
{
|
{
|
||||||
local all_deps="$(curl -s https://community-tc.services.mozilla.com/api/queue/v1/task/${TASK_ID} | python -c 'import json; import sys; print(" ".join(json.loads(sys.stdin.read())["dependencies"]));')"
|
local all_deps="$(curl -s https://community-tc.services.mozilla.com/api/queue/v1/task/${TASK_ID} | python -c 'import json; import sys; print(" ".join(json.loads(sys.stdin.read())["dependencies"]));')"
|
||||||
|
|
||||||
# We try "mozilla_voice_stt_tflite" and "mozilla_voice_stt_cuda" first and if we don't find it we try "mozilla_voice_stt"
|
# We try "mozilla-voice-stt-tflite" and "mozilla-voice-stt-cuda" first and if we don't find it we try "mozilla-voice-stt"
|
||||||
for pkg_basename in "mozilla_voice_stt_tflite" "mozilla_voice_stt_cuda" "mozilla_voice_stt"; do
|
for pkg_basename in "mozilla-voice-stt-tflite" "mozilla-voice-stt-cuda" "mozilla-voice-stt"; do
|
||||||
local deepspeech_pkg="${pkg_basename}-${DS_VERSION}.tgz"
|
local deepspeech_pkg="${pkg_basename}-${DS_VERSION}.tgz"
|
||||||
for dep in ${all_deps}; do
|
for dep in ${all_deps}; do
|
||||||
local has_artifact=$(curl -s https://community-tc.services.mozilla.com/api/queue/v1/task/${dep}/artifacts | python -c 'import json; import sys; has_artifact = True in [ e["name"].find("'${deepspeech_pkg}'") > 0 for e in json.loads(sys.stdin.read())["artifacts"] ]; print(has_artifact)')
|
local has_artifact=$(curl -s https://community-tc.services.mozilla.com/api/queue/v1/task/${dep}/artifacts | python -c 'import json; import sys; has_artifact = True in [ e["name"].find("'${deepspeech_pkg}'") > 0 for e in json.loads(sys.stdin.read())["artifacts"] ]; print(has_artifact)')
|
||||||
|
@ -22,5 +22,5 @@ fi;
|
|||||||
|
|
||||||
if [ -f ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/wrapper.tar.gz ]; then
|
if [ -f ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/wrapper.tar.gz ]; then
|
||||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/wrapper.tar.gz ${TASKCLUSTER_ARTIFACTS}/
|
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/wrapper.tar.gz ${TASKCLUSTER_ARTIFACTS}/
|
||||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/mozilla_voice_stt*.tgz ${TASKCLUSTER_ARTIFACTS}/
|
cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/javascript/mozilla-voice-stt*.tgz ${TASKCLUSTER_ARTIFACTS}/
|
||||||
fi;
|
fi;
|
||||||
|
Loading…
Reference in New Issue
Block a user