forked from mozilla/DeepSpeech
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes mozilla#2353
- Loading branch information
Alexandre Lissy
committed
Sep 17, 2019
1 parent
2bf8161
commit 5ef0117
Showing
17 changed files
with
297 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
THIS=$(dirname "$0") | ||
|
||
pushd ${THIS} | ||
source ../tests.sh | ||
|
||
npm install $(get_npm_package_url) | ||
npm install | ||
|
||
node ./index.js --audio $HOME/DeepSpeech/audio/2830-3980-0043.wav \ | ||
--lm $HOME/DeepSpeech/models/lm.binary \ | ||
--trie $HOME/DeepSpeech/models/trie \ | ||
--model $HOME/DeepSpeech/models/output_graph.pbmm \ | ||
--alphabet $HOME/DeepSpeech/models/alphabet.txt | ||
|
||
node ./index.js --audio $HOME/DeepSpeech/audio/4507-16021-0012.wav \ | ||
--lm $HOME/DeepSpeech/models/lm.binary \ | ||
--trie $HOME/DeepSpeech/models/trie \ | ||
--model $HOME/DeepSpeech/models/output_graph.pbmm \ | ||
--alphabet $HOME/DeepSpeech/models/alphabet.txt | ||
|
||
node ./index.js --audio $HOME/DeepSpeech/audio/8455-210777-0068.wav \ | ||
--lm $HOME/DeepSpeech/models/lm.binary \ | ||
--trie $HOME/DeepSpeech/models/trie \ | ||
--model $HOME/DeepSpeech/models/output_graph.pbmm \ | ||
--alphabet $HOME/DeepSpeech/models/alphabet.txt | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
THIS=$(dirname "$0") | ||
|
||
pushd ${THIS} | ||
source ../tests.sh | ||
|
||
pip install --user $(get_python_wheel_url "$1") | ||
pip install --user -r requirements.txt | ||
|
||
pulseaudio & | ||
|
||
python mic_vad_streaming.py \ | ||
--model $HOME/DeepSpeech/models/output_graph.pbmm \ | ||
--alphabet $HOME/DeepSpeech/models/alphabet.txt \ | ||
--lm $HOME/DeepSpeech/models/lm.binary \ | ||
--trie $HOME/DeepSpeech/models/trie \ | ||
--file $HOME/DeepSpeech/audio/2830-3980-0043.wav | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
THIS=$(dirname "$0") | ||
|
||
pushd ${THIS} | ||
source ../tests.sh | ||
|
||
npm install $(get_npm_package_url) | ||
npm install | ||
|
||
ln -s $HOME/DeepSpeech/models models | ||
|
||
node index.js $HOME/DeepSpeech/audio/2830-3980-0043.wav | ||
node index.js $HOME/DeepSpeech/audio/8455-210777-0068.wav | ||
node index.js $HOME/DeepSpeech/audio/4507-16021-0012.wav | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
THIS=$(dirname "$0") | ||
|
||
source ../../taskcluster/tc-tests-utils.sh | ||
|
||
DEP_TASK_ID=$(curl -s https://queue.taskcluster.net/v1/task/${TASK_ID} | python -c 'import json; import sys; print(" ".join(json.loads(sys.stdin.read())["dependencies"]));') | ||
|
||
get_python_wheel_url() | ||
{ | ||
local this_python_version=$1 | ||
|
||
extract_python_versions "${this_python_version}" "pyver" "pyver_pkg" "py_unicode_type" "pyconf" "pyalias" | ||
|
||
echo "$(get_python_pkg_url "${pyver_pkg}" "${py_unicode_type}" "deepspeech" https://queue.taskcluster.net/v1/task/${DEP_TASK_ID}/artifacts/public)" | ||
} | ||
|
||
get_npm_package_url() | ||
{ | ||
echo "https://queue.taskcluster.net/v1/task/${DEP_TASK_ID}/artifacts/public/deepspeech-${DS_VERSION}.tgz" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
THIS=$(dirname "$0") | ||
|
||
pushd ${THIS} | ||
source ../tests.sh | ||
|
||
pip install --user $(get_python_wheel_url "$1") | ||
pip install --user -r requirements.txt | ||
|
||
python audioTranscript_cmd.py \ | ||
--audio $HOME/DeepSpeech/audio/2830-3980-0043.wav \ | ||
--aggressive 0 \ | ||
--model $HOME/DeepSpeech/models/ | ||
|
||
python audioTranscript_cmd.py \ | ||
--audio $HOME/DeepSpeech/audio/2830-3980-0043.wav \ | ||
--aggressive 0 \ | ||
--model $HOME/DeepSpeech/models/ \ | ||
--stream | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
$if: '(event.event != "push") && (event.event != "tag")' | ||
then: | ||
taskId: ${taskcluster.taskId} | ||
provisionerId: ${taskcluster.docker.provisionerId} | ||
workerType: ${taskcluster.docker.workerType} | ||
taskGroupId: ${taskcluster.taskGroupId} | ||
schedulerId: ${taskcluster.schedulerId} | ||
dependencies: | ||
$map: { $eval: build.dependencies } | ||
each(b): | ||
$eval: as_slugid(b) | ||
created: { $fromNow: '0 sec' } | ||
deadline: { $fromNow: '1 day' } | ||
expires: { $fromNow: '7 days' } | ||
|
||
extra: | ||
github: | ||
{ $eval: taskcluster.github_events.pull_request } | ||
|
||
routes: | ||
- "notify.irc-channel.${notifications.irc}.on-exception" | ||
- "notify.irc-channel.${notifications.irc}.on-failed" | ||
|
||
scopes: [ | ||
"queue:route:notify.irc-channel.*" | ||
] | ||
|
||
payload: | ||
maxRunTime: { $eval: to_int(build.maxRunTime) } | ||
image: ${build.docker_image} | ||
|
||
env: | ||
DEEPSPEECH_MODEL: "https://github.com/lissyx/DeepSpeech/releases/download/tc-0.6.0/models.tar.gz" | ||
DEEPSPEECH_AUDIO: "https://github.com/mozilla/DeepSpeech/releases/download/v0.4.1/audio-0.4.1.tar.gz" | ||
PIP_DEFAULT_TIMEOUT: "60" | ||
|
||
command: | ||
- "/bin/bash" | ||
- "--login" | ||
- "-cxe" | ||
- $let: | ||
extraSystemSetup: { $eval: strip(str(build.system_setup)) } | ||
in: > | ||
apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq -y install git sox sudo && ${extraSystemSetup} && | ||
adduser --system --home ${system.homedir.linux} ${system.username} && | ||
cd ${system.homedir.linux} && | ||
echo -e "#!/bin/bash\nset -xe\n env && id && mkdir ~/DeepSpeech/ && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && wget -O - $DEEPSPEECH_MODEL | tar -C ~/DeepSpeech/ -xzvf - && wget -O - $DEEPSPEECH_AUDIO | tar -C ~/DeepSpeech/ -xzvf - " > /tmp/clone.sh && chmod +x /tmp/clone.sh && | ||
sudo -H -u ${system.username} /bin/bash /tmp/clone.sh && | ||
sudo -H -u ${system.username} --preserve-env /bin/bash ${build.args.tests_cmdline} | ||
|
||
artifacts: | ||
"public": | ||
type: "directory" | ||
path: "/tmp/artifacts/" | ||
expires: { $fromNow: '7 days' } | ||
|
||
metadata: | ||
name: ${build.metadata.name} | ||
description: ${build.metadata.description} | ||
owner: ${event.head.user.email} | ||
source: ${event.head.repo.url} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "node:10" | ||
dependencies: | ||
- "node-package-cpu" | ||
system_setup: | ||
> | ||
apt-get -qq -y install ffmpeg | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/ffmpeg_vad_streaming/test.sh" | ||
metadata: | ||
name: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v10.x" | ||
description: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v10.x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "node:8" | ||
dependencies: | ||
- "node-package-cpu" | ||
system_setup: | ||
> | ||
apt-get -qq -y install ffmpeg | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/ffmpeg_vad_streaming/test.sh" | ||
metadata: | ||
name: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v8.x" | ||
description: "DeepSpeech examples: ffmpeg VAD Streaming NodeJS v8.x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "python:3.6" | ||
dependencies: | ||
- "linux-amd64-cpu-opt" | ||
system_setup: | ||
> | ||
apt-get -qq -y install portaudio19-dev pulseaudio | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/mic_vad_streaming/test.sh 3.6.0:m" | ||
metadata: | ||
name: "DeepSpeech examples: mic VAD streaming Py3.6" | ||
description: "DeepSpeech examples: mic VAD streaming Python 3.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "python:3.7" | ||
dependencies: | ||
- "linux-amd64-cpu-opt" | ||
system_setup: | ||
> | ||
apt-get -qq -y install portaudio19-dev pulseaudio | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/mic_vad_streaming/test.sh 3.7.0:m" | ||
metadata: | ||
name: "DeepSpeech examples: mic VAD streaming Py3.7" | ||
description: "DeepSpeech examples: mic VAD streaming Python 3.7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "node:10" | ||
dependencies: | ||
- "node-package-cpu" | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/nodejs_wav/test.sh" | ||
metadata: | ||
name: "DeepSpeech examples: NodeJS WAV NodeJS v10.x" | ||
description: "DeepSpeech examples: NodeJS WAV NodeJS v10.x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "node:8" | ||
dependencies: | ||
- "node-package-cpu" | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/nodejs_wav/test.sh" | ||
metadata: | ||
name: "DeepSpeech examples: NodeJS WAV NodeJS v8.x" | ||
description: "DeepSpeech examples: NodeJS WAV NodeJS v8.x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "python:3.5" | ||
dependencies: | ||
- "linux-amd64-cpu-opt" | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/vad_transcriber/test.sh 3.5.0:m" | ||
metadata: | ||
name: "DeepSpeech examples: VAD transcriber Py3.5" | ||
description: "DeepSpeech examples: VAD transcriberaming Python 3.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "python:3.6" | ||
dependencies: | ||
- "linux-amd64-cpu-opt" | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/vad_transcriber/test.sh 3.6.0:m" | ||
metadata: | ||
name: "DeepSpeech examples: VAD transcriber Py3.6" | ||
description: "DeepSpeech examples: VAD transcriberaming Python 3.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build: | ||
template_file: examples-base.tyml | ||
docker_image: "python:3.7" | ||
dependencies: | ||
- "linux-amd64-cpu-opt" | ||
args: | ||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/examples/vad_transcriber/test.sh 3.7.0:m" | ||
metadata: | ||
name: "DeepSpeech examples: VAD transcriber Py3.7" | ||
description: "DeepSpeech examples: VAD transcriberaming Python 3.7" |