File tree Expand file tree Collapse file tree 6 files changed +579
-0
lines changed
test/apis/tensorflow/sound-classifier Expand file tree Collapse file tree 6 files changed +579
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ output=$(cd "$ROOT" && find . -type f \
128128! -path " ./.git/*" \
129129! -name " .*" \
130130! -name " *.bin" \
131+ ! -name " *.wav" \
131132-exec egrep -l " +$" {} \; )
132133if [[ $output ]]; then
133134 echo " File(s) have lines with trailing whitespace:"
@@ -147,6 +148,7 @@ output=$(cd "$ROOT" && find . -type f \
147148! -path " ./.git/*" \
148149! -name " .*" \
149150! -name " *.bin" \
151+ ! -name " *.wav" \
150152-print0 | \
151153xargs -0 -L1 bash -c ' test "$(tail -c 1 "$0")" && echo "No new line at end of $0"' || true)
152154if [[ $output ]]; then
@@ -166,6 +168,7 @@ output=$(cd "$ROOT" && find . -type f \
166168! -path " ./.git/*" \
167169! -name " .*" \
168170! -name " *.bin" \
171+ ! -name " *.wav" \
169172-print0 | \
170173xargs -0 -L1 bash -c ' test "$(tail -c 2 "$0")" || [ ! -s "$0" ] || echo "Multiple new lines at end of $0"' || true)
171174if [[ $output ]]; then
@@ -185,6 +188,7 @@ output=$(cd "$ROOT" && find . -type f \
185188! -path " ./.git/*" \
186189! -name " .*" \
187190! -name " *.bin" \
191+ ! -name " *.wav" \
188192-print0 | \
189193xargs -0 -L1 bash -c ' test "$(head -c 1 "$0")" || [ ! -s "$0" ] || echo "New line at beginning of $0"' || true)
190194if [[ $output ]]; then
Original file line number Diff line number Diff line change 1+ # Sound Classifier
2+
3+ Based on https://tfhub.dev/google/yamnet/1 .
4+
5+ Export the endpoint:
6+
7+ ``` bash
8+ export ENDPOINT=< API endpoint> # you can find this with `cortex get sound-classifier`
9+ ```
10+
11+ And then run the inference:
12+
13+ ``` bash
14+ curl $ENDPOINT -X POST -H " Content-type: application/octet-stream" --data-binary " @silence.wav"
15+ ```
You can’t perform that action at this time.
0 commit comments