Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Code Samples for new v1p1beta1 features #118

Merged
merged 53 commits into from
Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b823117
MicrophoneStreamTest, and basic .ava tests-
Jun 8, 2018
53cd4f0
Just cosmetic, removed some notes, added note about Event style for t…
Jun 11, 2018
d13734f
removed .test, cleaned up yaaarghs
Jun 12, 2018
709638b
Cleaned up test within MicStream.js, .ava tests forthcoming
Jun 13, 2018
a27324c
Merge branch 'master' into master
JustinBeckwith Jun 13, 2018
6c452f7
Pruned down to core streaming function, yaargs rebuilt, .ava upcoming
Jun 14, 2018
b6add2d
Merge branch 'master' of https://github.com/CallistoCF/nodejs-speech
Jun 14, 2018
6f44c0c
newest .ava test, just makes sure yaargs loads, comments addressed
Jun 15, 2018
9e0bf4c
Added Readme
CallistoCF Jul 17, 2018
ad8007c
BetaFeatures for Test, fixed from yesterday
Jul 18, 2018
3e77731
Updated Readme
CallistoCF Jul 18, 2018
3504280
Updated Readme, fixed old paths used in testing
CallistoCF Jul 18, 2018
2974091
Updated Readme again
CallistoCF Jul 18, 2018
be3869f
Updated Yaargs Examples to fit readme
CallistoCF Jul 18, 2018
0fbba57
Fixed Diarization bug
Jul 19, 2018
554af87
Merge branch 'BetaFeatures' of https://github.com/CallistoCF/nodejs-s…
Jul 19, 2018
0cad177
Merge branch 'master' into BetaFeatures
CallistoCF Jul 20, 2018
e0caf82
Merge branch 'master' of https://github.com/CallistoCF/nodejs-speech …
Jul 20, 2018
950844e
Speech Fixes
Jul 23, 2018
c365046
Merge branch 'BetaFeatures' of https://github.com/CallistoCF/nodejs-s…
Jul 23, 2018
27b42dc
fixing eslint settings to merge
Jul 23, 2018
e583e2e
eslint again
Jul 23, 2018
c3840eb
testing lint quick fix
Jul 23, 2018
054e7f8
more ESlint shennanigans
Jul 23, 2018
b3174dd
cleaned up region tags
Jul 23, 2018
37ae0a6
Removed audiochannelGCS
Jul 23, 2018
3c5ae14
Removed Comments, also multiChannel GCS
CallistoCF Jul 24, 2018
da0736f
Removed Comments, GCS MultiChannel
CallistoCF Jul 24, 2018
44d6502
Removed multi Audio Channel
CallistoCF Jul 24, 2018
45418b2
Added mono-channel multi Language file to sample
CallistoCF Jul 24, 2018
6b793e0
removed old console.log
CallistoCF Jul 24, 2018
24cdc11
fixed todos and filename -> fileName
CallistoCF Jul 24, 2018
5487a88
removed docstrings
CallistoCF Jul 24, 2018
7852924
removed enableWordTimeOffsets in WordLvlConfidence
CallistoCF Jul 24, 2018
10bad72
rebuild
Jul 25, 2018
720f8fa
fixed space
Jul 25, 2018
3a18194
Merge branch 'master' into BetaFeatures
CallistoCF Jul 25, 2018
b6fee39
fixed package.lock for node8 circleCI
Jul 26, 2018
b0b0748
Attempted fix for circleCI node 8
Jul 26, 2018
701088b
attempted mime-types fix
Jul 26, 2018
0f4ea7a
possible mime/CLI fix
Jul 31, 2018
832b91d
Merged Latest package chore stuff, for circleCI
Jul 31, 2018
9e67988
Merge branch 'master' into BetaFeatures
JustinBeckwith Jul 31, 2018
e0f9d1d
all outstanding comments, except eslint issue
Jul 31, 2018
e95c8b3
Merge branch 'BetaFeatures' of https://github.com/CallistoCF/nodejs-s…
Jul 31, 2018
cde3b24
confidence test fix
Jul 31, 2018
0331ea0
fixed eslinting in betaFeatures.js
Jul 31, 2018
0340b1e
eslint again
Jul 31, 2018
b024d2e
Fixed MultiChannel transcribe
Jul 31, 2018
f2d15c7
multiChannelGCS test
Jul 31, 2018
1808096
Updated readme
Jul 31, 2018
ed26504
updated readme, scaffolding
Jul 31, 2018
7cf0fa3
readme again
Jul 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{

This comment was marked as spam.

This comment was marked as spam.

// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/samples/betaFeatures.js"
}
]
}
12 changes: 12 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,34 @@
Ace Nassri <anassri@google.com>
Alexander Fenster <fenster@google.com>
Ali Ijaz Sheikh <ofrobots@google.com>
Chris Frater <cfrater@cfrater-macbookpro.roam.corp.google.com>
Chris Frater <chrisfrater@gmail.com>
Chris Frater <chrisfrater@google.com>
Christopher Wilcox <crwilcox@google.com>
Christopher Wilcox <git@crwilcox.com>
DPE bot <dpebot@google.com>
Dan Aharon <daharon@google.com>
Daniel Ruf <DanielRuf@users.noreply.github.com>
Daryush Laqab <dalaqab@google.com>
Dave Gramlich <callmehiphop@gmail.com>
Eric Uldall <ericuldall@gmail.com>
Ernest Landrito <landrito@google.com>
Gus Class <class@google.com>
Jason Dobry <jdobry@google.com>
Jerjou <jerjou@users.noreply.github.com>
Jonathan Lui <jonathanlui@google.com>
Jun Mukai <mukai@google.com>
Justin Beckwith <justin.beckwith@gmail.com>
Luke Sneeringer <lukesneeringer@google.com>
Philippe Sultan <philippe.sultan@gmail.com>
Pierre Fritsch <PierreFritsch@users.noreply.github.com>
Puneith Kaul <puneith@google.com>
Rebecca Taylor <remilytaylor@gmail.com>
Shahin <happyhuman@users.noreply.github.com>
Song Wang <songwang@google.com>
Stephen Sawchuk <sawchuk@gmail.com>
Tim Swast <swast@google.com>
cfrater <cfrater@cfrater-macbookpro.roam.corp.google.com>
greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
renovate[bot] <renovate[bot]@users.noreply.github.com>
wanacode <wanacode@users.noreply.github.com>
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# [Google Cloud Speech API: Node.js Client](https://github.com/googleapis/nodejs-speech)
Expand Down Expand Up @@ -145,4 +147,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-speech/blob/master/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/speech/latest/
[product-docs]: https://cloud.google.com/speech/docs
[shell_img]: //gstatic.com/cloudssh/images/open-btn.png
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
Empty file modified package-lock.json
100644 → 100755
Empty file.
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,36 @@
"Ace Nassri <anassri@google.com>",
"Alexander Fenster <fenster@google.com>",
"Ali Ijaz Sheikh <ofrobots@google.com>",
"Chris Frater <cfrater@cfrater-macbookpro.roam.corp.google.com>",
"Chris Frater <chrisfrater@gmail.com>",
"Chris Frater <chrisfrater@google.com>",
"Christopher Wilcox <crwilcox@google.com>",
"Christopher Wilcox <git@crwilcox.com>",
"DPE bot <dpebot@google.com>",
"Dan Aharon <daharon@google.com>",
"Daniel Ruf <DanielRuf@users.noreply.github.com>",
"Daryush Laqab <dalaqab@google.com>",
"Dave Gramlich <callmehiphop@gmail.com>",
"Eric Uldall <ericuldall@gmail.com>",
"Ernest Landrito <landrito@google.com>",
"Gus Class <class@google.com>",
"Jason Dobry <jdobry@google.com>",
"Jerjou <jerjou@users.noreply.github.com>",
"Jonathan Lui <jonathanlui@google.com>",
"Jun Mukai <mukai@google.com>",
"Justin Beckwith <justin.beckwith@gmail.com>",
"Luke Sneeringer <lukesneeringer@google.com>",
"Philippe Sultan <philippe.sultan@gmail.com>",
"Pierre Fritsch <PierreFritsch@users.noreply.github.com>",
"Puneith Kaul <puneith@google.com>",
"Rebecca Taylor <remilytaylor@gmail.com>",
"Shahin <happyhuman@users.noreply.github.com>",
"Song Wang <songwang@google.com>",
"Stephen Sawchuk <sawchuk@gmail.com>",
"Tim Swast <swast@google.com>",
"cfrater <cfrater@cfrater-macbookpro.roam.corp.google.com>",
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",
"renovate[bot] <renovate[bot]@users.noreply.github.com>",
"wanacode <wanacode@users.noreply.github.com>"
],
"scripts": {
Expand Down
62 changes: 59 additions & 3 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# Google Cloud Speech API: Node.js Samples
Expand Down Expand Up @@ -78,9 +80,12 @@ __Usage:__ `node recognize.v1p1beta1.js --help`
recognize.v1p1beta1.js <command>
Commands:
recognize.v1p1beta1.js sync-model <filename> <model> Detects speech in a local audio file using provided model.
recognize.v1p1beta1.js sync-model-gcs <gcsUri> <model> Detects speech in an audio file located in a Google Cloud
Storage bucket using provided model.
recognize.v1p1beta1.js sync-model <filename> <model> Detects speech in a local audio file using provided model.
recognize.v1p1beta1.js sync-model-gcs <gcsUri> <model> Detects speech in an audio file located in a Google Cloud
Storage bucket using provided model.
recognize.v1p1beta1.js sync-auto-punctuation <filename> Detects speech in a local audio file with auto punctuation.
recognize.v1p1beta1.js sync-metadata <filename> Detects speech in a local audio file with metadata.
recognize.v1p1beta1.js sync-enhanced-model <filename> Detects speech in a local audio file using an enhanced model.
Options:
--version Show version number [boolean]
Expand All @@ -92,12 +97,63 @@ Options:
Examples:
node recognize.v1p1beta1.js sync-model ./resources/Google_Gnome.wav video -e LINEAR16 -r 16000
node recognize.v1p1beta1.js sync-model-gcs gs://gcs-test-data/Google_Gnome.wav phone_call -e FLAC -r 16000
node recognize.v1p1beta1.js sync-auto-punctuation ./resources/commercial_mono.wav
node recognize.v1p1beta1.js sync-metadata ./resources/commercial_mono.wav
node recognize.v1p1beta1.js sync-enhanced-model ./resources/commercial_mono.wav
For more information, see https://cloud.google.com/speech/docs
```

[recognize.v1p1beta1_1_docs]: https://cloud.google.com/speech/docs
[recognize.v1p1beta1_1_code]: recognize.v1p1beta1.js

[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_img]: //gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/README.md

### Speech Recognition betaFeatures

View the [source code][betaFeatures_code].

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/betaFeatures.js,samples/README.md)

__Usage:__ `node betaFeatures.js --help`

```
betaFeatures.js <command>
Commands:
betaFeatures.js Diarization Isolate distinct speakers in an audio file
betaFeatures.js DiarizationGCS Isolate distinct speakers in an audio file located in a Google Cloud
Storage bucket.
betaFeatures.js multiChannelTranscribe Differentiates input by audio channel in local audio file.
betaFeatures.js multiChannelTranscribeGCS Differentiates input by audio channe from GCS audio file.
betaFeatures.js multiLanguageTranscribe Transcribes multiple languages from local audio file.
betaFeatures.js multiLanguageTranscribeGCS Transcribes multiple languages from GCS audio file.
betaFeatures.js wordLevelConfidence Detects word level confidence from local audio file.
betaFeatures.js wordLevelConfidenceGCS Detects word level confidence from GCS audio file.
Options:
--version Show version number [boolean]
--speechFile, -f [string]
--gcsUri, -u [string]
--help Show help [boolean]
Examples:
node betaFeatures.js Diarization -f ./resources/commercial_mono.wav
node betaFeatures.js DiarizationGCS -u gs://cloud-samples-tests/speech/commercial_mono.wav
node betaFeatures.js multiChannelTranscribe -f ./resources/commercial_stereo.wav
node betaFeatures.js multiChannelTranscribeGCS -u gs://cloud-samples-tests/speech/commercial_stereo.wav
node betaFeatures.js multiLanguageTranscribe -f ./resources/multi.wav
node betaFeatures.js multiLanguageTranscribeGCS -u gs://nodejs-docs-samples/multi_mono.wav
node betaFeatures.js wordLevelConfidence -f ./resources/brooklyn.flac
node betaFeatures.js wordLevelConfidenceGCS -u gs://cloud-samples-tests/speech/brooklyn.flac
For more information, see https://cloud.google.com/speech/docs
```

[betaFeatures_docs]: https://cloud.google.com/speech/docs
[betaFeatures_code]: recognize.v1p1beta1.js

[shell_img]: //gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/README.md
Loading